Question:
x2 sin x + cos2x
Solution:
Applying product rule of differentiation for given equation That is
$\Rightarrow \frac{\mathrm{d}}{\mathrm{dx}}(\mathrm{t} \cdot \mathrm{y})=\mathrm{y} \cdot \frac{\mathrm{dt}}{\mathrm{dx}}+\mathrm{t} \cdot \frac{\mathrm{dy}}{\mathrm{dx}}$
$\Rightarrow y=x^{2} \sin x+\cos 2 x$
$\Rightarrow \frac{d y}{d x}=\sin x \frac{d}{d x}\left(x^{2}\right)+x^{2} \frac{d}{d x}(\sin x)+\frac{d}{d x}(\cos 2 x)$
On differentiating we get
$\Rightarrow \frac{d y}{d x}=\sin x(2 x)+x^{2} \cos x+(-\sin 2 x)(2)$
$\Rightarrow \frac{d y}{d x}=2 x \sin x+x^{2} \cos x-2 \sin 2 x$