[Math] Prove that if $f$ is differentiable at $a$, then $|f|$ is also differentiable at $a$, provided that $f(a) \ne 0$

absolute valuecalculusderivatives

Prove that if $f$ is differentiable at $a$, then $|f|$ is also differentiable at $a$, provided that $f(a) \ne 0$

Solution Attempt:

$f$ is differentiable at $a \implies \lim_{x \rightarrow a} \dfrac {f(x)-f(a)}{x-a} = M$

$\implies \forall ~\epsilon>0,~\exists \delta \in \mathbb R^+$ such that $~~|\dfrac{f(x)-f(a)}{x-a} – M| < \epsilon,$ whenever $|x-a| < \delta$

Now, if we prove that $|~\dfrac{|f(x)|-|f(a)|}{x-a}-|M|~| ~~\le \epsilon$ whenever $|x-a| < \delta$, we are done.

In general, we have the following inequalities which can come handy, for example:

$|X \pm Y| \le |X| + |Y|$ and $|X-Y| \ge ||X|-|Y||$

I tried a bit of approaches but haven't got close to proving the desired result.

Could someone please give me a direction.

Thanks a lot!

Best Answer

The statement that you want to prove is a consequence of the chain rule and of the fact that the absolute value function is differentiable at every point of its domain other than $0$. This is where the hypothesis that $f(a)\neq0$ is used, of course.


Using your approach, you can also prove the statement. Suppose that $f(a)>0$. Then, by continuity, $f(x)>0$ near $a$. So\begin{align}\lim_{x\to a}\frac{|f(x)|-|f(a)|-f'(a)(x-a)}{x-a}&=\lim_{x\to a}\frac{f(x)-f(a)-f'(a)(x-a)}{x-a}\\&=0.\end{align}If $f(a)<0$, it is similar:\begin{align}\lim_{x\to a}\frac{|f(x)|-|f(a)|+f'(a)(x-a)}{x-a}&=\lim_{x\to a}\frac{-f(x)+f(a)+f'(a)(x-a)}{x-a}\\&=-\lim_{x\to a}\frac{f(x)-f(a)-f'(a)(x-a)}{x-a}\\&=0.\end{align}