Which continuous functions are polynomials? Suppose $f \in C(\mathbb{R}^n)$, the space of continuous $\mathbb{R}$-valued functions on $\mathbb{R}^n$.  Are there conditions on $f$ that guarantee it is the pullback of a polynomial under some homeomorphism?  That is, when can I find $\phi:\mathbb{R}^n \to \mathbb{R}^n$ such that $f \circ \phi \in \mathbb{R}[x_1,\ldots, x_n]$?  I have tried playing around with the implicit function theorem but haven't gotten far.  It feels like I may be missing something very obvious.
Some related questions:


*

*A necessary condition in the case of $n = 1$ is that $f$ cannot attain the same value infinitely many times (since a polynomial has only finitely many roots).  Is this sufficient?

*What if we replace $\mathbb{R}$ by $\mathbb{C}$?  

*What if we look at smooth functions instead?

*What about the complex analytic case?

 A: Since I can't leave comments I'm writing this here.  I think this question is made difficult by the condition that $\phi$ is just required homeomorphism versus say a diffeomorphism.
In the case n = 1 you can certainly come up with continuous functions that are not differentiable on a discrete set but can be pulled back to yield a polynomial.  As a baby example consider the function $f$ that is $\sqrt{x}$ on the positive reals and x on the negative reals.  Consider the homeomorphism that is $x^2$ on the positive reals and x on the negative reals, then $f$ pulls back to the polynomial $x$.
I don't think its sufficient that $f$ doesn't attain the same value infinitely many times.  I don't have a counterexample but I think a candidate might be contained in this article.1 The gist is that there are functions everywhere continuous and strictly monotonic but with derivative 0 almost everywhere.
I think you'd have more luck using the implicit function theorem if you required $\phi$ to be a diffeomorphism.  Also I believe its true that 'most' continuous function from $\mathbb{R} \to \mathbb{R}$ are not very nice (nonwhere differential) so a more tractable question might be the same question but requiring $f$ to be smooth.
If you replace $\mathbb{R}$ with $\mathbb{C}$ and impose $f$ and $\phi$ both be holomorphic then I think it suffices that $f^{(n)}$ vanish for all sufficiently large $n$ because you can recover $f$ from its Taylor series.
1Hisashi Okamoto. Marcus Wunsch. "A geometric construction of continuous, strictly increasing singular functions." Proc. Japan Acad. Ser. A Math. Sci. 83 (7) 114 - 118, July 2007. https://doi.org/10.3792/pjaa.83.114
