Can $f(x)=|x|^3$ be differentiated

Can $f(x)=|x|^3$ be differentiated? If yes, how? If no, why?

What I’ve tried:
lim as $h$ tends to $0$ of $$\frac{f(x+h)-f(x)}{h} = \lim_{h \to 0} (3(x+h)^2|x=h|-3x^2|x|)/h$$

However, I have no idea how to proceed from here. Please help 🙁


Solutions Collecting From Web of "Can $f(x)=|x|^3$ be differentiated"

From the definition, we will check whether $f^\prime(0)$ is well-defined.

$f$ is “clearly” infinitely differentiable on $\mathbb{R}\setminus\{0\}$, so the only question is differentiability at $0$.

But for $x\neq 0$,
\frac{f(x)-f(0)}{x-0} = \frac{\lvert x\rvert^3}{x} = \lvert x\rvert^2\frac{\lvert x\rvert}{x}
Since $\frac{\lvert x\rvert}{x}$ is bounded (it is either $1$ or $-1$, so always in $[-1,1]$) and $\lvert x\rvert^2\xrightarrow[x\to0]{}0$, the overall quantity has a limit at $0$:
\frac{f(x)-f(0)}{x-0} \xrightarrow[x\to0]{} 0
meaning by definition that $f$ is differentiable at $0$ (and, by the above discussion, everywhere).

Hint: You already know $x^3$ is differentiable on $(0,\infty),$ and that $-x^3$ is differentiable on $(-\infty,0).$ So all you have to worry about is $f'(0).$