I have a simple question.
If $f:\mathbb{S}^{2}\rightarrow\mathbb{R}$ is a non-constant continuous function, can we represent it as a composition $f=p\varphi$, where $\varphi:\mathbb{S}^{2}\rightarrow\mathbb{R}^{3}$ is an embedding and $p:\mathbb{R}^{3}\rightarrow\mathbb{R}$ is the projection onto the $x$-axis? If the answer is negative, what about the case of a Morse function $f$?
Remark. For the torus $\mathbb{T}^{2}$ this fails to be true - it is enough to take $f$ constant in the complement of a small open disk.
This is impossible even for Morse functions. To construct an example take the (standard) universal cover $S^2\to RP^2$ and compose it with a Morse function $RP^2\to R$. It is a nice and elementary exercise to see that the composition $f: S^2\to R$ cannot be realized as a composition of an embedding $S^2\to R^3$ with the projection $R^3\to R$. Hint: consider the pair of antipodal points $x, -x\in S^2$ where $f$ attains its maximum.