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.

The trick is to decompose $\cos^9(x)$ in its Fourier series, i.e. a linear combination of $\cos(kx)$ and $\sin(kx)$ terms, which we know how to derive $N$ times.
Using the hint and the Binomial development (row $9$ of Pascal's triangle), $$\cos^9(x)=\left(\frac{t+t^{-1}}2\right)^9\\
=\frac{t^9+t^{-9}+9(t^7+t^{-7})+36(t^5+t^{-5})+84(t^3+t^{-3})+126(t+t^{-1})}{512}\\
=\frac{\cos(9x)+9\cos(7x)+36\cos(5x)+84\cos(3x)+126\cos(x)}{256}.$$
Now the derivatives of $\cos(kx)$ are
$$\cos(kx),-k\sin(kx),-k^2\cos(kx),k^3\sin(kx),k^4\cos(kx)\cdots$$
hence
$$\frac{9^Ng_N(9x)+9\cdot7^Ng_N(7x)+36\cdot5^Ng_N(5x)+84\cdot3^Ng_N(3x)+126g_N(x)}{256}$$
where $g_N(x)$ is $\cos(x),-\sin(x),-\cos(x),\sin(x)$, depending on $N\bmod 4$.
