How to find the second derivative of this function: $x^2 |x|$ at $x = 0$ newbie in Calculus here. 
I was going to plug it into the definition of derivative function, the exact way my professor showed us to do it, except when he plugged it in, he used the $\sqrt{x}$ as $f(x)$.
I get the rest of what he did after that, but I'm left wondering why he used $\sqrt{x}$ as the function.
I don't get what I'm missing, maybe someone here knows?
 A: Recall $$f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x-a}.$$  Let $a = 0$ and $f(x) = x^2|x|$. Then $f(a) = 0$ and we have $$f'(0) = \lim_{x \to 0} \frac{x^2|x|}{x} = \lim_{x \to 0} x|x| = 0.$$  Now suppose we want the general function $f'(a)$.  Then consider two cases (the third, $a = 0$, was already discussed above).  If $a > 0$, then in a sufficiently small neighborhood of $a$, we have $x > 0$; that is, there exists $0 < x < a$ for any $a > 0$.  Then in this neighborhood, $$f'(a) = \lim_{x \to a} \frac{x^2|x| - a^2|a|}{x-a} = \lim_{x \to a} \frac{x^3-a^3}{x-a} = \lim_{x \to a} x^2 + ax + a^2 = 3a^2.$$  Conversely, if $a < 0$, then a similar argument applies:  $$f'(a) = \lim_{x \to a} \frac{-x^3 - (-a^3)}{x-a} = -3a^2.$$  We can then put these back together by noting that $$f'(a) = \begin{cases} 3a^2, & a > 0, \\ 0, & a = 0, \\ -3a^2, & a < 0 \end{cases}$$ is equivalent to $$f'(a) = 3a|a|.$$
A: What I would do is show that $\frac{d^2}{dx^2} x^3 = \frac{d^2}{dx^2}(-x^3)$ at $x = 0$.
This way you don't have to deal with the absolute value.
A: Do you mean by mentioning square roots that $$(x^2|x|)'=\left(\sqrt{x^6}\right)'=\frac{1}{2\sqrt{x^6}}\cdot (x^6)'=\frac{3x^5}{|x^3|}=3x|x|?$$ Anyway, this seems to work.
