Finding the $n$th derivative of trigonometric function.. My maths teacher has asked me to find the $n$th derivative of $\cos^9(x)$. He gave us a hint which are as follows:
if $t=\cos x + i\sin x$,
   $1/t=\cos x - i\sin x$,
   then $2\cos x=(t+1/t)$.
How am I supposed to solve this? Please help me with explanations because I am not good at this. And yes he's taught us Leibniz Theorem. Thanks.

De Moivre taught us that if $t=\cos x + i\sin x$ then $t^n = \cos(nx) + i\sin(nx)$ and $t^{-n} = \cos(nx) - i\sin(nx)$ so
$$
t^n + \frac 1 {t^n} = 2\cos(nx).
$$
Then, letting $s=1/t$, we have
\begin{align}
& (2\cos x)^9 =(t+s)^9 \\[10pt]
= {} & t^9 + 9t^8 s + 36t^7 s^2 + 84 t^6 s^3 + 126 t^5 s^4 + 126 t^4 s^5 + 84 t^3 s^6 + 36 t^2 s^7 + 9 t s^8 + s^9 \\
& {}\qquad \text{(binomial theorem)} \\[10pt]
= {} & t^9 + 9t^7 + 36 t^5 + 84 t^3 + 126 t + 126 \frac 1 t + 84 \frac 1 {t^3} + 36 \frac 1 {t^5} + 9 \frac 1 {t^7} + \frac 1 {t^9} \\[10pt]
= {} & \left( t^9 + \frac 1 {t^9} \right) + 9\left( t^7 + \frac 1 {t^7} \right) + 36\left( t^5 + \frac 1 {t^5} \right) + 84 \left( t^3 + \frac 1 {t^3} \right) + 126\left( t + \frac 1 t \right) \\[10pt]
= {} & 2\cos(9x) + 18 \cos(7x) + 72\cos(5x) + 168\cos(3x) + 252\cos x.
\end{align}
Now find the first, second, third, etc. derivatives and see if there's a pattern that continues every time you differentiate one more time.
