# How do you differentiate  f(x)=-2xsin^2(x)  using the product rule?

Dec 30, 2015

#### Answer:

$f ' \left(x\right) = - 2 \sin x \left(\sin x + 2 x \cos x\right)$

#### Explanation:

Product rule: for a function

$f \left(x\right) = g \left(x\right) h \left(x\right)$,

$f ' \left(x\right) = g ' \left(x\right) h \left(x\right) + h ' \left(x\right) g \left(x\right)$

So,

$g \left(x\right) = - 2 x$
$h \left(x\right) = {\sin}^{2} x$

Find the derivative of each.

$g ' \left(x\right) = - 2$

Use the chain rule to find $h ' \left(x\right)$, recalling that $\frac{d}{\mathrm{dx}} {u}^{2} = 2 u \cdot \frac{\mathrm{du}}{\mathrm{dx}}$.

Thus,

$h ' \left(x\right) = 2 \sin x \frac{d}{\mathrm{dx}} \sin x = 2 \sin x \cos x$

Put this all together:

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

Simplify.

$f ' \left(x\right) = - 2 \sin x \left(\sin x + 2 x \cos x\right)$

Dec 30, 2015

I remember the product rule by remembering the phrase:

"first, d-second, plus second, d-first"

or:

$\textcolor{g r e e n}{\frac{d}{\mathrm{dx}} \left[g \left(x\right) h \left(x\right)\right] = g \left(x\right) \frac{\mathrm{dh} \left(x\right)}{\mathrm{dx}} + h \left(x\right) \frac{\mathrm{dg} \left(x\right)}{\mathrm{dx}}}$

The derivative here requires that you use the chain rule on ${\sin}^{2} \left(x\right)$, so let's check that out first:

$\textcolor{g r e e n}{\frac{d}{\mathrm{dx}} \left[f \left(u \left(x\right)\right)\right] = \frac{\mathrm{df} \left(u \left(x\right)\right)}{\cancel{\mathrm{du}}} \cdot \frac{\cancel{\mathrm{du}}}{\mathrm{dx}} = \frac{\mathrm{df} \left(u \left(x\right)\right)}{\mathrm{dx}}}$

If we let $u \left(x\right) = \sin x$, then we should get $2 u \cdot \frac{\mathrm{du}}{\mathrm{dx}}$ like so:

$\frac{d}{\mathrm{dx}} \left[{\left(\sin x\right)}^{2}\right] = 2 \sin x \cdot \frac{d}{\mathrm{dx}} \left[\sin x\right] = 2 \sin x \cos x$

So, the final result is:

$\frac{d}{\mathrm{dx}} \left[- 2 x {\sin}^{2} x\right] = \left(- 2 x\right) \left(2 \sin x \cos x\right) + \left({\sin}^{2} x\right) \left(- 2\right)$

$= \textcolor{b l u e}{- 4 x \sin x \cos x - 2 {\sin}^{2} x}$