Is $f(x)$ uniformly continuous? $f:\mathbb R\to[0,\infty )$ is continuous such that $g(x)={(f(x))}^2$ is uniformly continuous. Then prove that $f(x)$ is uniformly continuous.
I've tried to use the following method:
$$
|(f(x))^2-(f(y))^2|\lt2B \epsilon \ \Rightarrow \ |f(x)-f(y)|\lt {2B\epsilon\over|f(x)+f(y)|} \ \Rightarrow \ |f(x)-f(y)|\lt \epsilon
$$
whenever $|x-y|<\delta$. But this method is only effective when $|f(x)|>B>0$. But by definition, $f(x)$ may be zero. Now what will be the easiest method to solve this.  
 A: For starters, define $h:[0,\infty) \to [0,\infty)$ as $h(x) = \sqrt x$. 
My first claim is that $h$ is uniformly continuous. There are many ways to see this. Intuitively, for a fixed $\varepsilon$, the worst $\delta$ will be at $x=0$. One approach is to split the domain. 
First consider $h$ restricted to the domain $[0,1]$. Then it's continuous over a compact domain. Therefore uniformly continuous. Then, consider $h$ restricted to $[1,\infty)$, it has a bounded derivative. Which implies uniformly continuous.  Lastly, show that you can can "paste" uniformly continuous functions together to get a uniformly continuous function. Just pick the larger $\delta$. 
For my second claim, I need to show that the composition of uniformly continuous functions is continuous. This is just $\varepsilon$-$\delta$. Nothing special. 
Now note that I haven't even mentioned $f$ yet. All in need is that $g$ is uniformly continuous, and $h \circ g = f.$ Then by combining my first and second claim, I see that $f$ itself is uniformly continuous. 
I'm also pretty sure that you'd have to do almost the same work to finish the argument you proposed in the post. But this way you get two other handy results. 
A: If possible , let, f is not uniformly continuous.Then there exists a Cauchy sequence {$x_n$} in $\mathbb R$ such that {$f(x_n)$} is not a Cauchy sequence.
(If not, i.e  for every Cauchy sequence {$x_n$}, {$f(x_n)$} is a cauchy sequence, then f is uniformly continuous, which contradicts our hypothesis)
So there exists $\epsilon > 0$ corresponding to a natural number $m$ such that,
$|f(x_i)-f(x_j)|\ge\sqrt{\epsilon}$$....\forall i,j\ge m$
$\Rightarrow f(x_i)+f(x_j)\ge|f(x_i)-f(x_j)|\ge\sqrt\epsilon$ [since $f(x_i), f(x_j)\ge 0$]
$\Rightarrow |(f(x_i))^2-(f(x_j))^2|=|f(x_i)-f(x_j)||f(x_i)+f(x_j)|\ge{\sqrt\epsilon}{\sqrt\epsilon}=\epsilon$......$\forall i,j\ge m$
$\Rightarrow |(f(x_i))^2-(f(x_j))^2|\ge\epsilon$......$\forall i,j\ge m$
$\Rightarrow${$(f(x_n))^2$} is not a Cauchy sequence. That is, there exists a Cauchy sequence {$x_n$} such that {$(f(x_n))^2$} is not a Cauchy sequence, Hence {$(f(x_n))^2$} is not uniformly continuous which is a contradiction. So, $f$ must be uniformly continuous.
