Question:
Find the derivative of the following functions (it is to be understood that a, b, c, d, p, q, r and s are fixed non-zero constants and m and n are integers): $\left(x^{2}+1\right) \cos x$
Solution:
Let $f(x)=\left(x^{2}+1\right) \cos x$
By product rule,
$f^{\prime}(x)=\left(x^{2}+1\right) \frac{d}{d x}(\cos x)+\cos x \frac{d}{d x}\left(x^{2}+1\right)$
$=\left(x^{2}+1\right)(-\sin x)+\cos x(2 x)$
$=-x^{2} \sin x-\sin x+2 x \cos x$