Which continuous functions are polynomials? I posted this on the new math.SE website but didn't get much of a response, so I am reposting it here.
Suppose $f$ is a continuous $\mathbb{R}$-valued function on $\mathbb{R}^n$.  What type of conditions on $f$ guarantee it is a polynomial up to homeomorphism. That is, when can I find a homeomorphism $\phi:\mathbb{R}^n \to \mathbb{R}^n$ such that $\phi^* f = f \circ \phi \in \mathbb{R}[x_1,\ldots, x_n]$?
Some related questions:


*

*A necessary condition in the case of $n = 1$ is that point inverse images of $f$ must be finite (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 and diffeomorphism instead?  (I tried playing around with the implicit function theorem but didn't get anywhere).

*What about the complex analytic case?


I'm not quite sure how to tag this, so feel free to edit them.
 A: I'm going to go out on a limb and make a partial conjecture based on Tom Goodwillie's comment.  A function $f:\mathbb{R}^n \to \mathbb{R}$ is topologically conjugate to a polynomial $p(x)$ only if it is topologically conjugate to a continuous function $q(x0$ of finite type which is nowhere constant.  By "finite type" I mean that there is a tiling of $\mathbb{R}^n$ by finitely many convex regions, such that the restriction of $q(x)$ to each region is non-constant and either linear or of the form $1/\phi(x)+c$, where $\phi$ is linear and $c$ is constant.
In this version of the answer, I'm going out on a limb for a second time.  I first conjectured that $q$ should simply be linear on each convex piece, and Richard Borcherds quickly found a counterexample to that in two variables.
I don't mean this to be a sufficient condition, since clearly it is not sufficient when $n=1$.  A "finite type" function in the above sense can be bounded, while a polynomial cannot be bounded.  Maybe it is a sufficient condition as a topological characterization of rational functions with no poles.  For polynomials specifically, there are strong restrictions on the behavior at infinity, but per Richard's example, they are somewhat looser than I first thought.
There is a relevant pair of results due to Whitney and Goresky.  Whitney proved that every analytic variety in $\mathbb{R}^n$ is a Whitney stratified space.  Goresky proved that every Whitney stratified space in $\mathbb{R}^n$ is supported on a piecewise smooth triangulation (but not necessarily one which is finite type).  It is easy to ride roughshod over subtleties as I already did, but these results seem like a good way to get started with the problem.
The smooth and complex cases of the problem seem more complicated for various reasons.
