Continuous function defined in spheres

81 Views Asked by At

Let $f:\mathbb{R}^n\rightarrow\mathbb{R}$ be a continuous function. Show that $\phi:[0,+\infty)\rightarrow\mathbb{R}$ defined as $\phi(r)=\sup_{||x||=r}\{f(x)\}$ is continuous. I'm aware of $f\colon \mathbb{R}^n \rightarrow \mathbb{R}$ continuous, $\phi (r) = \sup_{|x| =r} f(x)$ is continuous, but I would like a different proof, and besides I believe the first answer has a mistake and the second is incomplete.

My attempt: By compactness of $\{||x||=r\}$, $\phi$ is clearly well defined. Let $r\in (0,+\infty),\,\epsilon>0$.

Then there exists $x_r\in \mathbb{R},||x_r||=r, \phi(r)=\sup_{||x||=r}\{f(x)\}=f(x_r)$. So there exists $\delta_0>0$ such that $|f(x_r)-f(x)|<\epsilon$. Now, if we take $\delta = \delta_0$, then for $\forall l, |l-r|<\delta$, let $x_l$ be such that $\phi(l)=f(x_l)$ and take $x = \frac{l}{r}x_r$. Then clearly $||x-x_r|| = |l-r|<\delta_0$, so $|f(x_r)-f(x)|<\epsilon$.

Assume $f(x_r)\geq f(x_l)$. Then $f(x_r)\geq f(x_l)\geq f(x)$, so $|f(x_r)-f(x_l)|<\epsilon$

My problem is if $f(x_r)< f(x_l)$, any tips?