Show that $g(x) := |f(x)|$ is differentiable at $c$ if and only if $f'(c) = 0$. Suppose that $f\colon \mathbb R\to \mathbb R$ is differentiable at $c$ and that $f(c) := 0 $.
Show that $g(x) := |f(x)|$ is differentiable at $c$ if and only if $f'(c) = 0$.
My attempt:
We know that $f$ is differentiable at $c$ but we do not know what the value of this derivative is so
$$\left|\frac{f(x)}{x-c} - L\right| < \epsilon$$ (1)
for some $L\in\mathbb R$
and
$$\left|\frac{|f(x)|}{x-c} - G\right| < \epsilon$$ (2)
for some $G\in\mathbb R$
I want to claim that $g'(c) = 0$ and somehow the rest will follow. I am not sure how to proceed just using continuity and derivation.
Any help is appreciated it. Thank you.
 A: It is easy to show that if $f'(c) =0$ then $g'(c) =0$. Just use the inequality $$\left|\frac{g(x) - g(c)} {x-c} \right|=\frac{||f(x)|-|f(c) ||} {|x-c|} \leq \left|\frac{f(x) - f(c)} {x-c} \right|$$ For the above we don't need the condition $f(c) =0$. But for converse $f(c) =0$ is essential. Then note that that since $g$ is non-negative and $g(c) =0$, it follows that $c$ is a point of minima and since $g'(c) $ exists it must be $0$. It is now almost obvious that $f'(c) =0$ by the inequality $$-\frac{|g(x)|} {|x-c|}\leq \frac{f(x)} {x-c} \leq\frac{|g(x) |} {|x-c|} $$
A: (1).Suppose $g'(c)$ exists.
For $x<c$ we have $\frac {g(x)-g(c)}{x-c}=\frac {|f(x)|}{x-c}\leq 0.$ Letting $x\to c$ thru values  that are less than $c,$ we have therefore $g'(c)\leq 0.$
For $x>c$ we have $\frac {g(x)-g(c)}{x-c}=\frac {|f(x)|}{x-c}\geq 0.$ Letting $x\to c$ thru values that are greater than $c$ we have therefore $g'(c)\geq 0.$
Since $g'(c)\leq 0\leq g'(c)$ we have $g'(c)=0.$ 
Therefore $|f'(c)|=$ $\lim_{x\to c}\left| \frac {f(x)-f(c)}{x-c}\right|=$ $\lim_{x\to c} \left| \frac {g(x)-g(c)}{x-c}\right|=$ $|g'(c)|=0.$
(2). Suppose $f'(c)=0.$  We have $0=|f'(c)|=\lim_{x\to c}\left| \frac {f(x)-f(c)}{x-c}\right|=$ $\lim_{x\to c}\left|\frac {g(x)-g(c)}{x-c}\right|,$ which implies that $0=\lim _{x\to 0} \frac {g(x)-g(c)}{x-c}$, so $g'(c)$ exists and is equal to $0.$
A: Say that $f'(c) > 0$ (for example). Choose some $0 < \epsilon < f'(c)$ and choose $\delta$ so that for all $x$ with $0 < |x-c| < \delta$ we have $\frac{f(x) - f(c)}{x-c} > \epsilon$.  What can you say about $\frac{g(x) - g(c)}{x-c}$ when $x < c$ and $x>c$?
A: My attempted solution using sequential criterion and help form the comments
$WLOG$ assume $f'(c)>0$ so $\exists (x_n) > c\ \forall n \in \mathbb N$ and $(x_n\to c)$ then $$\lim_{n \to \infty} \frac{f(x_n)}{x_n-c} $$(1)
since $x_n > c$ then $f(x_n)$ must be positive. 
So now since $g(x)$ is differentiable at c then
$$\lim_{n \to \infty} \frac{g(x_n)}{x_n-c} = 
\lim_{n \to \infty} \frac{|f(x_n)|}{x_n-c} =
\lim_{n \to \infty} \frac{f(x_n)}{x_n-c} = f'(c) $$(2)
so by sequential criterion, $g'(c) = f'(c)$
now choose a sequence of numbers such that $x_c < c$ and also $(x_n) \to c$ due to sequential criterion. thus$f(x_n) < 0$ so that the condition $f'(c) = 0$ remains true.
Now use this sequence into $g'(c)$
$$\lim_{n \to \infty} \frac{g(x_n)}{x_n-c} = 
\lim_{n \to \infty} -\frac{|f(x_n)|}{x_n-c} =
\lim_{n \to \infty} -\frac{f(x_n)}{x_n-c} =- f'(c) $$(3)
but since the numerator does not get to factor out $-1$ then the derivative is the same as $f'(c)$ but negative. 
Thus, by Divergence Sequential criterion,$ \lim_{n \to \infty} \frac{g(x_n)}{x_n-c}$ does not converge.
And $g(x)$ is not differentiable at $c$, which is a contradiction about our asumption of $f'(c) > 0$ $WLOG$ thus f'(c) = 0.
For the other direction of the proof, one must observe g(x) and use triangle inequality statements to arrive that it is differentiable at c.
