Finding the derivative of $x^2|x|$ Usually, for a question involving products, my first approach would be to apply the product rule, giving $\frac{d}{dx}(x^2|x|)=x^2(\frac{d}{dx}|x|)+|x|2x$.
Using methods discussed here (Finding the Derivative of |x| using the Limit Definition), I got $\frac{d}{dx}|x|=\frac{x}{|x|}$, so subsituting this in gives $\frac{d}{dx}(x^2|x|)=\frac{x^3}{|x|}+2x|x|$.
However, the derivative of $x^2|x|$ is in fact equal to $3x|x|$. Where have I gone wrong?
I also tried using $\frac{df(x)}{dx}=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}$, which gave $\frac{x^2|x|-x_0^2|x_0|}{x-x_0}\rightarrow\frac{x^2_0|x_0|-x_0^2|x_0|}{x_0-x_0}=0$ as $x\rightarrow x_0$ - I need to get $3x|x|$, so this can't be right!
Any help would be much appreciated.
 A: Rather than trying to do something clever, why not just apply the definitions directly?  First, we can reasonably assume:

Definition:  The absolute value function is the function defined by the formula
  $$|x| = \begin{cases} x & \text{if $x \ge 0$, and} \\ -x & \text{ if $x < 0$.} \end{cases} $$

(There are other definitions of the absolute value function, but they are all equivalent to this one over $\mathbb{R}$, and this one is likely the easiest to use in the context of the current question.)
The function of interest then becomes
$$
f(x)
= x^2|x|
= \begin{cases} x^2(x) & \text{if $x \ge 0$, and} \\ x^2(-x) & \text{if $x < 0$} \end{cases}
= \begin{cases} x^3 & \text{if $x \ge 0$, and} \\ -x^3 & \text{if $x < 0$.} \end{cases}
$$
This can be differentiated piecewise using the power rule to get
$$
f'(x)
= \begin{cases} 3x^2 & \text{if $x > 0$, and} \\ -3x^2 & \text{if $x < 0$.} \end{cases}
$$
Note that we can't simply "take the derivative" at zero, since zero is not in the interior of either of the two intervals on which we are differentiating.  However, at zero we can directly apply the definition of the derivative:
$$ f'(0)
= \lim_{h\to 0} \frac{f(x+h) - f(x)}{h},
$$
if this limit exists.  Taking the limit from the right, we get
$$
\lim_{h\to 0^+} \frac{(0+h)^2|0+h| - 0^2|0|}{h}
= \lim_{h\to 0^+} \frac{h^2|h|}{h}
= \lim_{h\to 0^+} h|h|
= 0.
$$
The limit from the left is essentially the same, from which we may conclude that $f'(0) = 0$.  Combining these results, we get
$$
f'(x)
= \begin{cases} 3x^2 & \text{if $x > 0$} \\ 0 & \text{if $x=0$, and} \\ -3x^2 & \text{if $x < 0$.} \end{cases}
$$
By again applying the definition of the absolute value function, this can be simplified to $3x|x|$, which is the claimed result.
A: We can write $x^2$ as $|x|^2$ so we have $\dfrac {|x|^2x}{|x|}=x|x|$. Therefore the answer is $x|x|+2x|x|=3x|x|.$
A: Note that$$\frac{x^2}{\lvert x\rvert}=\frac{\lvert x\rvert^2}{\lvert x\rvert}=\lvert x\rvert$$and that therefore $\dfrac{x^3}{\lvert x\rvert}=x\lvert x\rvert$.
A: I would write $f(x) = x^2|x| = |x^3|$.  Then if $x>0$, $f(x) =x^3$ and $f'(x)3x^2$.  If $x<0$ then $f(x) = -x^3$ and $f'(x) = -3x^2$.  In both cases $f'(x) = 3x|x|.$ 
