Derivative of $x|x|$ I am trying to find the derivative of $f(x)=x|x|$ using the defition of derivative. For $x > 0$ I found that $f'(x)=2x$ and for $x<0$ the derivative is $f'(x)=-2x$. Everything is fine up to here. Now I want to check what happens when at $x=0$.
By the way, I know that $|x|$ is not differentiable at $x=0$.
So I am checking the left & right limits of $f$ when $x$ approaches $0$.


*

*$\lim_{x \to 0^-}\cfrac{x|x|}{x} = \lim_{x \to 0^-}\cfrac{x(-x)}{x}=\lim_{x \to 0^-}\cfrac{(-x)}{1} = -0? = 0. $

*$\lim_{x \to 0^+}\cfrac{x|x|}{x} = \lim_{x \to 0^4}\cfrac{x(x)}{x}=\lim_{x \to 0^+}\cfrac{(x)}{1} = 0. $
I think that $f$ is not differentiable at $x=0$ since $|x|$ is not differentiable at that point. So , what do I do wrong?
Should I write something like $\lim_{x \to 0^-}\cfrac{x|x|}{x} = -0^{-}$ and $\lim_{x \to 0^+}\cfrac{x|x|}{x} =0^{+}$ so that $f'$ does not exist at $x=0$?

\begin{eqnarray}
g^\prime(x)&=&\lim_{h\to0}\frac{(x+h)\vert x+h\vert-x\vert x\vert}{h}\\
&=&\lim_{h\to0}\frac{(x+h)\vert x+h\vert-x\vert x\vert}{h}\cdot\frac{(x+h)\vert x+h\vert+x\vert x\vert}{(x+h)\vert x+h\vert+x\vert x\vert}\\
&=&\lim_{h\to0}\frac{(x+h)^4-x^4}{h((x+h)\vert x+h\vert+x\vert x\vert)}\\
&=&\lim_{h\to0}\frac{4x^3+6x^2h+4xh^2+h^3}{(x+h)\vert x+h\vert+x\vert x\vert}\\
&=&\frac{4x^3}{2x\vert x\vert}\\
&=&\frac{2x^2}{\vert x\vert}\\
&=&2x\cdot\frac{\vert x\vert}{x}
\end{eqnarray}
