Continuous map from connected subset of R^n to one of the real zero of an odd degree polynomial whose coefficients are polynoms of the variables Let take a real multivariate polynomial $P(x_1, \ldots, x_n, y)$ such as the degree of P relatively to the variable $y$ is odd. Thus, for each $X = x_1,\ldots,x_n \in\mathbb{R}^n$, the univariate polynomial $P(X, y) \in \mathbb{R}[y]$ has at least one real zero.
Given a compact connected subset $A$ of $\mathbb{R}^n$, Is it possible to construct a continuous map $\phi: A \rightarrow \mathbb{R} $ such that for all $X \in A, P(X, \phi(X)) = 0$ (so namely the map $\phi$ choose one of the real roots of the polynomial $P(X,.)$ )?
Remark 
The continuous dependence of the (complex) roots to the coefficients made me thought that it may be possible.
If we have no singularity then we can apply the implicit functions theorem to obtain  a non-empty primary set where this function is defined, then take the closure of that set (and extend the definition of $\phi$ on the cluse) to get a close(by construction) and open( by applying the IFT) subset of $A$ and thus be good by connection.
But what append when singularities occur? I tend to think that if there are not that much, we can get rid of them by extending by continuity the function constructed on the non-singular points.
 A: This won't work. Consider $P(x,y)=y^3-y+x$ and let $A$ be an interval $[-R,R]$, with $R\gg 1$. Then initially, at $x=0$, our polynomial has three zeros, but the second and third will disappear as we increase $x$. So we'd have to take the smallest zero, but this doesn't work either (when we make $x$ small), for the same reason.
A: The set $\newcommand{\bR}{\mathbb{R}}$ $\newcommand{\bx}{\boldsymbol{x}}$
$$ Z:=\bigl\{ \;(\bx,y)\in\bR^n\times \bR;\;\; P(\bx,y)=0\,\bigr\}, $$
is semialgebraic and  the natural projection $\pi: Z\to\bR^n$, $(\bx,y)\mapsto \bx$ is a  continuous semialgebraic map. 
You are asking whether this map admis sections defined over arbitrary  compact subsets  $A\subset \bR^n$.  As Christian Remling shows in his example, this  may not be possible. Still there is something you can say in general.
Using a bit of real algebraic geometry you can show that for any $R>0$ the cube $C_R=[-R,R]^n\subset \bR^n$ admits a (semialgebraic)  triangulation with the property  that   the fibration  defined  by $\pi$ is locally trivial over the  (relative) interior of any face of this triangulation. In particular, it admits continuous semialgebraic  sections defined over the (relative) interiors of the faces of the triangulation.
