Write the derivative
Question:

Write the derivative of $f(x)=|x|^{3}$ at $x=0$.

Solution:

Given: $f(x)=|x|^{3}= \begin{cases}x^{3}, & x \geq 0 \\ -x^{3}, & x<0\end{cases}$

$(\mathrm{LHD}$ at $x=0)$

$\lim _{x \rightarrow 0^{-}} \frac{f(x)-f(0)}{x-0}$

$=\lim _{h \rightarrow 0} \frac{f(0-h)-f(0)}{x}$

$=\lim _{h \rightarrow 0} \frac{h^{3}}{-h}$

$=0$

(RHD at x = 0)

$\lim _{x \rightarrow 0^{+}} \frac{f(x)-f(0)}{x-0}$

$=\lim _{x \rightarrow 0^{+}} \frac{f(0+h)-f(0)}{x}$

$=\lim _{h \rightarrow 0} \frac{h^{3}-0}{h}$

$=0$

and $f(0)=0$

Thus, $(\mathrm{LHD}$ at $x=0)=(\mathrm{RHD}$ at $x=0)=f(0)$

Hence, $\lim _{x \rightarrow 0} \frac{f(x)-f(0)}{x-0}=f^{\prime}(0)=0$