0

I have to prove the following: Show that if $f : (a, b) →\mathbb R$ is continuous then $|f|$ is continuous on $(a, b)$ as well.

So I want to show that $lim_{x \rightarrow x_0} |f(x)| = |f(x_0)|$. It's easy to show this for $x_0$ s.t. $f(x_0) < 0$ or $f(x_0) > 0$ because we know, for example, that if $lim_{x \rightarrow x_0} f(x) = f(x_0) > 0$ then there must exist a $\delta$ s.t. $f(x) < 0$ $\forall |x-x_0|<\delta$ so we can say $lim_{x \rightarrow x_0} |f(x)| = lim_{x \rightarrow x_0} f(x) = f(x_0) = |f(x_0)|$. However I'm not sure how to show it for $x_0$ s.t. $f(x_0) = 0$. The way I tried to show it $x_0$ s.t. $f(x_0) = 0$ was by saying that if $f(x_0) = 0$ then $lim_{x \rightarrow x_0} f(x) = f(x_0) = 0 =|f(x_0)|$ so we must have $lim_{x \rightarrow x_0} |f(x)| = |f(x_0)|$. But this to me just seemed trivially true and I wasn't really sure if my justification was a justification at all.

Hai
  • 663
  • 1
    Try using the reverse triangle inequality $||a| - |b|| \leq |a-b|$. Specifically in this case, we have $||f(x)| - |f(x_0)|| \leq |f(x) - f(x_0)|$. –  Dec 04 '17 at 00:11

2 Answers2

3

Hint: $\big||f(x)|-|f(x_0)|\big| \leq |f(x)-f(x_0)|$ by the reverse triangle inequality.

Andres Mejia
  • 20,977
  • Sorry I'm not exactly sure how I'm supposed to use this for the case when $f(x_0) = 0$. I've seen proofs which use the reverse triangle inequality but not for the specific case when $f(x_0) = 0$. – Hai Dec 04 '17 at 14:38
  • 1
    It’s just equality in that case... – Andres Mejia Dec 04 '17 at 14:51
  • Does this also mean that if $f(x_0)=0$ there is a $\delta$ such that $|f(x)| > 0$ for all $|x-x_0| < \delta$? And if so does that then that mean $lim_{x \rightarrow x_0}|f(x)| = |f(x_0)| = 0$ for when $f(x_0) = 0$? Thanks – Hai Dec 04 '17 at 21:22
0

Not sure if you are allowed to use this in your answer, but note that $|f(x)|=g(f(x))$ where $g:\mathbb R\to \mathbb R$, $g(x)=|x|$. Thus, you can first prove that $g$ is continuous, and then invoke the theorem that the composition of two continuous functions is continuous.

Now, note that $g$ is continuous on $(-\infty,0]$ (where it coincides with $x\mapsto -x$) and on $[0,+\infty)$ (where it coincides with $x\mapsto x$), so it is continuous on the whole $\mathbb R$.