# What is the derivative of sin^2(cos3x)?

Jul 29, 2015

${y}^{'} = - 6 \sin \left(3 x\right) \cdot \sin \left(\cos \left(3 x\right)\right) \cdot \cos \left(\cos \left(3 x\right)\right)$

#### Explanation:

The main tool you have at your disposal for finding the derivative of this function is the chain rule, which tells you that you can differentiate a function that depends on a variable $u$, which in turn depends on another variable $x$, by

color(blue)(d/dx(y) = d/(du)(y) * d/dx(u)

You're also going to use the power rule, which allows you to calculate the derivative of a variable $x$ raised to the power $a$ by

$\textcolor{b l u e}{\frac{d}{\mathrm{dx}} \left({x}^{a}\right) = a \cdot {x}^{a - 1}}$

Other derivatives that will come in handy

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

and

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

So, looking at your initial function

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

you can predict that you're going to use the power rule once and the chain rule twice.

Use the chain rule to express the derivative of ${\sin}^{2} \left(\cos \left(3 x\right)\right)$ in terms of $u = \cos \left(3 x\right)$

$\frac{d}{\mathrm{dx}} \left(y\right) = \frac{d}{\mathrm{du}} {\sin}^{2} u \cdot \frac{d}{\mathrm{dx}} \left(u\right) \text{ } \textcolor{p u r p \le}{\left(1\right)}$

Now focus on $\frac{d}{\mathrm{du}} \left({\sin}^{2} u\right)$. You're going to have to use the chain rule again, only this time for

$\sin u = {u}_{1}$, which implies that

${\sin}^{2} u = {u}_{1}^{2}$

This is equivalent to

$\frac{d}{\mathrm{du}} \left({\sin}^{2} u\right) = {\underbrace{\frac{d}{{\mathrm{du}}_{1}} \cdot {u}_{1}^{2}}}_{\textcolor{b l u e}{\text{power rule}}} \cdot \frac{d}{\mathrm{du}} {u}_{1}$

$\frac{d}{\mathrm{du}} \left({\sin}^{2} u\right) = 2 {u}_{1}^{2 - 1} \cdot \frac{d}{\mathrm{du}} \left(\sin u\right)$

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

Now go back to equation $\textcolor{p u r p \le}{\left(1\right)}$

${y}^{'} = 2 \sin u \cdot \cos u \cdot \frac{d}{\mathrm{dx}} \left(u\right)$

Next, focus on $\frac{d}{\mathrm{dx}} \left(u\right) = \frac{d}{\mathrm{dx}} \left(\cos \left(3 x\right)\right)$. Use the chain rule again, but this time use $\cos \left({u}_{2}\right)$ and ${u}_{2} = 3 x$ to get

$\frac{d}{\mathrm{dx}} \left(\cos \left(3 x\right)\right) = \frac{d}{{\mathrm{du}}_{2}} \cos \left({u}_{2}\right) \cdot \frac{d}{\mathrm{dx}} \left({u}_{2}\right)$

$\frac{d}{\mathrm{dx}} \left(\cos \left(3 x\right)\right) = - \sin {u}_{2} \cdot 3 \frac{d}{\mathrm{dx}} \left(x\right)$

$\frac{d}{\mathrm{dx}} \left(\cos \left(3 x\right)\right) = - \sin \left(3 x\right) \cdot 3$

Take this back to equation color(purple((1)) to get

${y}^{'} = 2 \sin u \cdot \cos u \cdot \left(- 3 \cdot \sin \left(3 x\right)\right)$

Remember that $u = \cos \left(3 x\right)$, which means that you have

${y}^{'} = - 3 \cdot 2 \cdot \sin \left(\cos \left(3 x\right)\right) \cdot \cos \left(\cos \left(3 x\right)\right) \cdot \sin \left(3 x\right)$

${y}^{'} = \textcolor{g r e e n}{- 6 \cdot \sin \left(3 x\right) \cdot \sin \left(\cos \left(3 x\right)\right) \cdot \cos \left(\cos \left(3 x\right)\right)}$