# What is the n^(th) derivative of sin^2x?

Aug 19, 2017

${f}^{\left(n\right)} {\sin}^{2} x = \left\{\begin{matrix}{\sin}^{2} x & n = 0 \\ {\left(- 1\right)}^{\frac{n}{2} + 1} \setminus {2}^{n - 1} \setminus \cos 2 x & n > 0 \text{ even" \\ (-1)^((n+1)/2+1) \ 2^(n-1) \ sin 2x & n gt 0 " odd}\end{matrix}\right.$

#### Explanation:

We have:

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

Differentiating once wrt $x$ (using the chain rule), we get the first derivative:

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

At first glance we may suspect that to gain further derivatives we will require the product rule and their form will become increasingly more complex. However we note that:

$\sin 2 A \equiv 2 \sin A \cos A$

Allowing us to write the first derivative as:

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

So differentiating further times we get:

${f}^{\left(2\right)} \left(x\right) = 2 \cos 2 x$
${f}^{\left(3\right)} \left(x\right) = - {2}^{2} \sin 2 x$
${f}^{\left(4\right)} \left(x\right) = - {2}^{3} \cos 2 x$
${f}^{\left(5\right)} \left(x\right) = {2}^{4} \sin 2 x$
${f}^{\left(6\right)} \left(x\right) = {2}^{5} \cos 2 x$
${f}^{\left(7\right)} \left(x\right) = - {2}^{6} \sin 2 x$
${f}^{\left(8\right)} \left(x\right) = - {2}^{7} \cos 2 x$
$\vdots$

And a clear pattern is now forming, and the ${n}^{t h}$ derivative is:

${f}^{\left(n\right)} {\sin}^{2} x = \left\{\begin{matrix}{\sin}^{2} x & n = 0 \\ {\left(- 1\right)}^{\frac{n}{2} + 1} \setminus {2}^{n - 1} \setminus \cos 2 x & n > 0 \text{ even" \\ (-1)^((n+1)/2+1) \ 2^(n-1) \ sin 2x & n gt 0 " odd}\end{matrix}\right.$