<s>[INST] First and second derivative of $|x|^3$ I need to prove that $|x|^3$ is twice differentiable, by showing that the first and second derivatives exist using the definition. I've tried several ways, this is what I've got:
$$\lim_{h\to 0} \frac{|x+h|^3 - |x|^3}{h} = \lim_{h\to 0}\frac{\sqrt{(x+h)^2}^3 - \sqrt{x^2}^3}{h}  = \lim_{h\to 0} \frac{\sqrt{(x+h)^6} - \sqrt{x^6}}{h}$$
then I rationalized the numerator:
$$= \lim_{h\to 0} \frac{(x+h)^6 - x^6}{h\left(\sqrt{(x+h)^6} + \sqrt{x^6}\right)}$$
and I'm stuck on what to do next, I'm skeptic that this is the right way, but I was not able to reach any answer using other ways either.
Any help would be great.
Thanks.
 [/INST] Just separate the last limit, i.e.,
\begin{aligned}
L&=\lim_{h\to 0}\frac{(x+h)^6 - x^6}{h\left(\sqrt{(x+h)^6} + \sqrt{x^6}\right)}\\ &= 
\lim_{h\to 0}\frac{(x+h)^6 - x^6}{h}\cdot \lim_{h\to 0}{\frac1{\sqrt{(x+h)^6} + \sqrt{x^6}}} \\&= \frac{\mathrm{d}x^6}{\mathrm{d}x}\cdot\frac1{2\sqrt{x^6}}
\\&= 6x^5\cdot\frac1{2|x^3|} \\ &=6x^5\cdot\frac{1}{2x^2|x|}
\\ &=3\frac{x^3}{|x|}
\end{aligned}
and you're done.
If you need to prove $\frac{\mathrm{d}x^6}{\mathrm{d}x}=6x^5$, you can use this \begin{aligned}
\frac{\mathrm{d}x^6}{\mathrm{d}x}&=\lim_{h\to0}\frac{(x+h)^6-x^6}h\\
&=\lim_{h\to0}\frac{(x+h-x)\left((x+h)^5+x(x+h)^4+x^2(x+h)^3+x^3(x+h)^2+x^4(x+h)+x^5\right)}h\\
&=\lim_{h\to0}\frac{h\left((x+h)^5+x(x+h)^4+x^2(x+h)^3+x^3(x+h)^2+x^4(x+h)+x^5\right)}h\\
&=\lim_{h\to0}\left((x+h)^5+x(x+h)^4+x^2(x+h)^3+x^3(x+h)^2+x^4(x+h)+x^5\right)\\
&=6x^5
\end{aligned}
</s>