# How do you differentiate f(x)=cos^2x?

Feb 4, 2017

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

#### Explanation:

differentiate using the $\textcolor{b l u e}{\text{chain rule}}$

$\textcolor{\mathmr{and} a n \ge}{\text{Reminder }} \textcolor{red}{\overline{\underline{| \textcolor{w h i t e}{\frac{2}{2}} \textcolor{b l a c k}{\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \times \frac{\mathrm{du}}{\mathrm{dx}}} \textcolor{w h i t e}{\frac{2}{2}} |}}}$

$\text{Express } f \left(x\right) = {\cos}^{2} x = {\left(\cos x\right)}^{2}$

$\text{let } u = \cos x \Rightarrow \frac{\mathrm{du}}{\mathrm{dx}} = - \sin x$

$\text{then } y = {u}^{2} \Rightarrow \frac{\mathrm{dy}}{\mathrm{du}} = 2 u$

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

change u back into terms of x

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}} = - 2 \sin x \cos x$

$\textcolor{\mathmr{and} a n \ge}{\text{Reminder}} \sin 2 x = 2 \sin x \cos x$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}} = - \sin 2 x$

Feb 16, 2017

$\frac{\mathrm{dy}}{\mathrm{dx}} = - \sin 2 x$

#### Explanation:

$f \left(x\right) = {\cos}^{2} x = {\left(\cos x\right)}^{2}$

By chain rule

let $u = \cos x$ then $y = {u}^{2}$

$\frac{\mathrm{du}}{\mathrm{dx}} = - \sin x$ then $\frac{\mathrm{dy}}{\mathrm{du}} = 2 u$

Therefore $\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{du}}{\mathrm{dx}} . \frac{\mathrm{dy}}{\mathrm{du}}$

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

But $u = \cos x$

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

Reminder $- 2 \sin x \cos x = - \sin 2 x$

$\frac{\mathrm{dy}}{\mathrm{dx}} = - \sin 2 x$