# How do you differentiate g(x) = (1 + sin^2(2-x))(1 +cos^2(x))  using the product rule?

Jun 19, 2016

$\frac{\mathrm{dg}}{\mathrm{dx}} = - \sin \left(4 - 2 x\right) \left(1 + {\cos}^{2} x\right) + \sin 2 x \left(1 + {\sin}^{2} \left(2 - x\right)\right)$

#### Explanation:

Product rule states if $g \left(x\right) = f \left(x\right) \times h \left(x\right)$

then $\frac{\mathrm{dg}}{\mathrm{dx}} = \frac{\mathrm{df}}{\mathrm{dx}} \times h \left(x\right) + \frac{\mathrm{dh}}{\mathrm{dx}} \times f \left(x\right)$

Hence as $g \left(x\right) = \left(1 + {\sin}^{2} \left(2 - x\right)\right) \left(1 + {\cos}^{2} x\right)$

$\frac{\mathrm{dg}}{\mathrm{dx}} = \left(- 2 \sin \left(2 - x\right) \cos \left(2 - x\right)\right) \left(1 + {\cos}^{2} x\right) + \left(1 + {\sin}^{2} \left(2 - x\right)\right) \left(- 2 \cos x \times \left(- \sin x\right)\right)$

= $- \sin \left(4 - 2 x\right) \left(1 + {\cos}^{2} x\right) + \left(1 + {\sin}^{2} \left(2 - x\right)\right) \left(\sin 2 x\right)$

= $- \sin \left(4 - 2 x\right) \left(1 + {\cos}^{2} x\right) + \sin 2 x \left(1 + {\sin}^{2} \left(2 - x\right)\right)$