this is the real question.1I saw this question like if f is from R to infinity and continuous if g(x)=$f^2(x)$ if g(x) is uniformly continuous so is f(x) $f^2(x)=f(x)*f(x)$
My Thought:
1)for sequence $x_n$ and $y_n$ are like $d(x_n,y_n)$ tends to 0 then $d(g(x_n),g(y_n))$ tends to 0 as g is uniformly continuous .considering usual metric of R(real line) $|g(x)-g(y)|=|f^2(x) -f^2(y)|=|f(x)-f(y)|*|f(x)+f(y)|$ from here how can I show that $|f(x)-f(y)|$ tends to 0
2)first I thought about $\sqrt(x)$ , as it is uniformly continuous and so is g(x) so $\sqrt(g(x))$ will also be uniformly continuous.But as $\sqrt(x)$ is not defined on whole R so I cannot conclude f is uniformly continuous on whole R.
or there is any counter example.
pleas
With your point 2 you have proven that $|f|$ is uniformly continuous.
Let $\epsilon>0$. Let $\delta>0$ such that for all $x,y\in\mathbb{R}$, $|x-y|<\delta$, $||f(x)|-|f(y)||<\frac{\epsilon}{2}$.
Let $x,y\in\mathbb{R}$, $|x-y|<\delta$.
If $f(x)$ and $f(y)$ have the same sign, then $|f(x)-f(y)| = ||f(x)|-|f(y)||<\frac{\epsilon}{2} < \epsilon$.
If $f(x)$ and $f(y)$ have different signs, then by continuity of $f$ there is $z \in[x,y], f(z)=0$. $|f(x)-f(y)| = |f(x)-f(z)| + |f(z)-f(y)| = ||f(x)|-|f(z)|| + ||f(z)|-|f(y)|| < \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon$.