Consider g(x)=x*|x| Limit definition Consider $g(x)= x  |x|$. Using the limit definition of the derivative find $g'(0)$. 
I understand that the limit does exist, because the derivative is $2 |x|$. 
I just need someone's help to properly differentiate using the limit definition- I am having trouble writing it all down properly (I'm looking for a complete solution).
 A: Let us prove your claim $(x|x|)'=2|x|$.
$$\lim_{h\to 0}\frac{(x+h)|x+h|-x|x|}{h}=\lim_{h\to 0}\left(\frac{x(|x+h|-|x|)}h+|x+h|\right).$$
If $x>0$, when we restrict $|h|<x$, we have $|x+h|=x+h$ and the limit reduces to
$$\lim_{h\to 0}\left(\frac{xh}h+|x+h|\right)=2x=2|x|.$$
If $x<0$, when we restrict $|h|<x$, we have $|x+h|=-(x+h)$ and the limit reduces to
$$\lim_{h\to 0}\left(-\frac{xh}h+|x+h|\right)=-2x=2|x|.$$
Finally, if $x=0$,
$$\lim_{h\to 0}\left(\frac{h|h|}h+|h|\right)=0=2|x|.$$
A: For $x \ge 0$ we have
$$
\DeclareMathOperator{abs}{abs}
g(x) = x \abs(x) = x^2 
$$
and for $x \le 0$ we have
$$
g(x) = x \abs(x) = -x^2
$$
This gives $g'(x) = 2x$ for $x > 0$ and $g'(x) = -2x$ for $x < 0$ which can be written as $g'(x) = 2 \abs(x)$ for $x \ne 0$.
The only argument needing extra consideration is $x = 0$. Here the left side and right side limits are
$$
\lim_{x \to 0-} \frac{g(x) - g(0)}{x - 0} 
= \lim_{x \to 0-} \frac{-x^2}{x} 
= \lim_{x \to 0-} -x = 0 
$$
and
$$
\lim_{x \to 0+} \frac{g(x) - g(0)}{x - 0} 
= \lim_{x \to 0+} \frac{x^2}{x} 
= \lim_{x \to 0+} x = 0 
$$
so there is a unique limit 
$$
g'(0) = \lim_{x\to 0} \frac{g(x) - g(0)}{x-0} = 0
$$ 
and we can conclude $g'(x) = 2 \abs(x)$ for $x \in \mathbb{R}$.
A: The limit you have to compute for the derivative at $0$ is
$$
\lim_{h\to0}\frac{g(0+h)-g(0)}{h}
=
\lim_{h\to0}\frac{h|h|}{h}
=
\lim_{h\to0}|h|=0
$$
On the interval $(0,\infty)$, we have $g(x)=x^2$, so $g'(x)=2x$. On $(-\infty,0)$, $g(x)=-x^2$, so $g'(x)=-2x$. We can summarize with
$$
g'(x)=2|x|
$$
for all $x$.
