# proving that $g(x)=|x|f(x)$ derivable iff $f(0)=0$ in $x_0=0$

Having problem with it, but first I'll explain the question.

I'm asked to prove that $g(x)=|x|f(x)$ is derivable in $x_0=0$ iff $f(0)=0$, while $f$ is a continuous function $x_0=0$.

Basically since $f(x)=|x|$ is not derivable in $x=0$, it might seem like a problem, but I think that the definition of whether a function is derivable or not is that if its limit exists, i.e: $f'(x_0) = \lim_{x\to x_0} \frac{f(x)-f(x_0)}{x-x_0}$. so basically since $|x|$ changes the pluses to minuses at times, the only opportunity where the definition will hold is when $x=0$. Is it true? and how should I write it mathematically?

• (if:) $\lim_{x\to0}\frac{g(x)-0}{x}=\lim_{x\to0}\text{sgn}(x)f(x)=0$, where the last limit is because $f\to0$ and $\text{sng}$ is bounded. – OR. Jun 27 '17 at 12:29
$g$ differentiable at $x=0 \iff$
$$\lim_{x\to 0^+}\frac {g (x)-g (0)}{x}=\lim_{x\to 0^-}\frac {g (x)-g (0)}{x}$$ $$\iff \lim_{x\to0^+}\frac {xf (x)-0}{x}=\lim_{x\to0^-}\frac {-xf (x)}{x}$$ $$\iff f (0)=-f (0)=0$$
compute the diffrerential Quotient: $$\frac{|x_0+h|f(x_0+h)-|x_0|f(x_0)}{h}$$ for $$x_0=0$$