# How do you differentiate sin^2(x)?

Oct 15, 2015

$\frac{\mathrm{dy}}{\mathrm{dx}} = \sin \left(2 x\right)$

#### Explanation:

$y = {\sin}^{2} \left(x\right)$

Let's say that $\sin \left(x\right) = u$, then we have

$y = {u}^{2}$

So, if we derivate by $x$ we have

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left({u}^{2}\right)$

By the chain rule $\frac{d}{\mathrm{dx}} = \frac{d}{\mathrm{du}} \cdot \frac{\mathrm{du}}{\mathrm{dx}}$, or

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{du}} \left({u}^{2}\right) \cdot \frac{\mathrm{du}}{\mathrm{dx}}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 u \cdot \frac{\mathrm{du}}{\mathrm{dx}}$

we know $u = \sin \left(x\right)$ so we have

$\frac{\mathrm{dy}}{\mathrm{dx}} = 2 \sin \left(x\right) \cdot \frac{d}{\mathrm{dx}} \left(\sin \left(x\right)\right)$

From there we have

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

Or, if you want, you can squish that into just one formula using the double angle formula for the sine

$\frac{\mathrm{dy}}{\mathrm{dx}} = \sin \left(2 x\right)$