$f:\mathbb{R}\rightarrow [0,\infty)$ is continuous and $f^2$ is uniformly continuous then f is uniformly continuous

55 Views Asked by At

Let $f$ be a continuous function from $\mathbb{R}$ to $[0,\infty)$ and $g(x)= f(x)^2$ is uniformly continuous. Then I want to prove that $f$ is uniformly continuous. I would like to mention one thing that is $f(x)^2=f(x)f(x)$, not the composition $f\circ f$.

My approach: Since $f(x)\geq 0$ we have $f(x)=\sqrt{g(x)}$. Now for any arbitrary $x,y\in \mathbb{R}$ we have $f(x)+f(y)=m$ and therefore $f(x)-f(y)= \frac{g(x)-g(y)}{m)}$ this gives that $f$ is uniformly continuous.