Question:
Find the second order derivatives of the function.
$x \cdot \cos x$
Solution:
Let $y=x \cdot \cos x$
Then,
$\frac{d y}{d x}=\frac{d}{d x}(x \cdot \cos x)=\cos x \cdot \frac{d}{d x}(x)+x \frac{d}{d x}(\cos x)=\cos x \cdot 1+x(-\sin x)=\cos x-x \sin x$
$\therefore \frac{d^{2} y}{d x^{2}}=\frac{d}{d x}[\cos x-x \sin x]=\frac{d}{d x}(\cos x)-\frac{d}{d x}(x \sin x)$
$=-\sin x-\left[\sin x \cdot \frac{d}{d x}(x)+x \cdot \frac{d}{d x}(\sin x)\right]$
$=-\sin x-(\sin x+x \cos x)$
$=-(x \cos x+2 \sin x)$