# if $f^2(x)$ is uniformly continuous then f is uniformly continuous

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

• $\sqrt{x}$ is not defined on whole $\mathbb{R}$ but you are only interested in $[0,\infty)$. – freakish Dec 5 '18 at 8:11
• Just a small observation: as a multiple choice question this is trivial since all other possibilities can be ruled out easily. (Of course, the fact that $f$ must be uniformly continuous is not obvious and the question is interesting too. I have given an upvote). – Kavi Rama Murthy Dec 5 '18 at 8:14
• @freakish ...so it cant be proved for the negative part ? – onlymath Dec 5 '18 at 8:16
• @onlymath Yes, right. Well you can extend it to negatives by taking $\sqrt{-x}$. – freakish Dec 5 '18 at 8:20
• @Anvit possibly the above might solve the problem – onlymath Dec 5 '18 at 8:24

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$$.

• You mean $f(x)$ and $f(y)$ have same/different signs, right? – Anvit Dec 5 '18 at 8:40
• Good catch, editing – RcnSc Dec 5 '18 at 8:41
• Cute answer by RcnSc – Kavi Rama Murthy Dec 6 '18 at 6:11

Composition of two uniformly continuous is uniformly continuous . Now take $$g(x)=f^2(x)$$ and $$h(x)=\sqrt(x)$$ it is also uniformly continuous .Now think $$h(g(x))$$???

• I thought like that but square root function isn't defined for all R..so I am having a confusion about uniform continuity on whole R – onlymath Dec 5 '18 at 8:10
• @Anvit I didnt get that ...we are composing two functions and $\sqrt(g(x))=\sqrt(f(x)*f(x))$ uniformly continuous for the positive part ..but what if f(x) for x less than 0 is confusing me – onlymath Dec 5 '18 at 8:14
• But $h:[0,\infty) \to [0,\infty)$ – G C R Dec 5 '18 at 8:15
Following your second idea, you need to show that if $$f$$ is continuous and $$\sqrt{g}=|f|$$ is uniformly continuous, then $$f$$ is also uniformly continuous. To get some intuition about the situation, come up with an example of a function $$f$$ such that $$|f|$$ is continuous, but $$f$$ is not. From this, you should see why it might be natural to divide the domain into two parts: $$\{|f(x)| \ge \varepsilon\}$$ and $$\{|f(x)| < \varepsilon\}$$.
$$f^2$$ is uniformly cont $$\implies (|x-y|<\delta\implies|f^2(x)-f^2(y)|<\epsilon) \implies |f^2(x)-f^2(y)|<{\epsilon\over\delta}|x-y|\implies {|f^2(x)-f^2(y)|\over|x-y|}<{\epsilon\over\delta}\implies|2f(x)f'(x)|<{\epsilon\over\delta}\implies |f'(x)|<{k\over |f(x)|}<\frac k {inf \,f}$$ If $$inf f\ne 0$$, we are done since Derivative is bounded implies function is uniformly continous.
Now comes the really non rigourous part. Let $$K=\{x||f(x)|<1\}$$. Since $$f$$ is cont, $$f'(x) for some $$M\in \mathbb N,$$ also $$f'(x)
Thus, $$f'$$ is bounded and hence $$f$$ in uniformly continuous
• Was Supposed to be R\K meaning $R\cap K^c$ but you cant directly type '\' in mathjax. Edited in. and Yes you are correct. They may not be differentiable. My solution assumes that though. The one you have selected is great though – Anvit Dec 5 '18 at 10:17