Non-constant continuous map from $\mathbb{R}P^2$ to $\mathbb{R}$ Give an example of non-constant continuous map from $\mathbb{R}P^2$ to $\mathbb{R}$.
My attempt: Since $\mathbb{R}P^2$ is closed unit disc with antipodal points of the boundary identified. I will restrict the projection map from $\mathbb{R}^2$ to $\mathbb{R}$ to closed unit disc. then can i use this to get the required map. 
 A: Try $[x : y : z] \mapsto \frac{x^2}{x^2+y^2+z^2}.$
A: Let $\overline{\mathbb{D}}$ denote the closed unit disc in $\mathbb{C}$ and consider the map $f : \overline{\mathbb{D}} \to \overline{\mathbb{D}}$ given by $f(z) = z^2$. If $z, w \in \partial\overline{\mathbb{D}}$ are antipodal points, then $f(z) = f(w)$ so the map descends to a map $\hat{f} : \mathbb{RP}^2 \to \overline{\mathbb{D}}$ satisfying $\hat{f}([z]) = f(z)$. The map $|\hat{f}|$ is then a continuous non-constant map $\mathbb{RP}^2 \to \mathbb{R}$.
A: The following works for any manifold: Let $U \subset M$ be an open set homeomorphic to the unit disk $B$ in $\mathbb R^n$ via a homeomorphism $\varphi : U\to B$. Then define $f : M\to \mathbb R$, 
$$f(x) = \begin{cases} \max\{-|\varphi (x)|+1/2, 0\} & \text{if }x\in U, \\ 0 &\text{if } x\notin U.\end{cases}$$
(That is, find a continuous nonconstant function on $B$ with compact support and then extend the function on $M$ and setting other points to be zero)
A: Indentify $\mathbb{R}^2$ by $\mathbb{C}$ and consider the map $\nu\colon \mathbb{C}\longrightarrow \mathbb{R}$ which takes $z$ to its norm $\nu(z)=|z|$.
