Question: If $y=x|x|$, find $\frac{d y}{d x}$ for $x<0$.
Solution:
$y=x|x|$
or, $y=\left\{\begin{array}{c}x^{2}, \text { when } x \geq 0 \\ -x^{2}, \text { when } x<0\end{array}\right.$
So, for $x<0$
$\frac{d y}{d x}=\frac{d}{d x}\left(-x^{2}\right)$
$=-2 \times($ Ans $)$