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.

Using his hint, you get
\begin{align*}
[\cos x]^9
&= \left[ \frac12 \left( t + \frac1t \right) \right]^9 \\
&= \frac{1}{2^9} \sum_{k=0}^9 {9 \choose k} (t)^k \left( \frac1t \right)^{9-k} \\
&= \frac{1}{2^9} \sum_{k=0}^9 {9 \choose k} t^{2k-9}. \tag{1}
\end{align*}
Also,
$$
\frac{dt}{dx} = -\sin x + i \cos x = i(\cos x + i \sin x) = it;
$$
Therefore,
$$
\frac{d}{dx} t^n = n t^{n-1} (it) = in t^n;
$$
it follows that
$$
\frac{d^N}{dx^N} t^n = (in)^N t^n.
$$
Applying this to (1),
\begin{align*}
\frac{d^N}{dx^N} [\cos x]^9
&= \frac{d^N}{dx^N} \frac{1}{2^9} \sum_{k=0}^9 {9 \choose k} t^{2k-9} \\
&= \frac{1}{2^9} \sum_{k=0}^9 {9 \choose k} \frac{d^N}{dx^N} t^{2k-9} \\
&= \frac{1}{2^9} \sum_{k=0}^9 {9 \choose k} (2k-9)^N i^N t^{2k-9} \\
&= \frac{1}{2^{10}}
\left[ \sum_{k=0}^9 {9 \choose k} (2k-9)^N i^N t^{2k-9}
 + \sum_{k=0}^9 {9 \choose {9-k}} (2(9-k)-9)^N i^N t^{2(9-k)-9} \right] \\
&= \frac{1}{2^{10}}
\left[ \sum_{k=0}^9 {9 \choose k} \left( (2k-9)^N i^N t^{2k-9}
  + (9-2k)^N i^N t^{9-2k} \right) \right] \\
&= \frac{1}{2^{10}}
\left[ \sum_{k=0}^9 {9 \choose k} (2k-9)^N i^N \left( t^{2k-9}
  + (-1)^N t^{9-2k} \right) \right] \\
&= \begin{cases}
\frac{1}{2^9}
\sum_{k=0}^9 {9 \choose k} (2k-9)^N i^N \cos((2k-9)x)
&N \text{ even} \\
\frac{1}{2^9}
\sum_{k=0}^9 {9 \choose k} (2k-9)^N i^{N+1} \sin((2k-9)x)
&N \text{ odd} \\
\end{cases} \\
&= \begin{cases}
\frac{1}{2^9}
\sum_{k=0}^9 {9 \choose k} (2k-9)^N (-1)^{N/2} \cos((2k-9)x)
&N \text{ even} \\
\frac{1}{2^9}
\sum_{k=0}^9 {9 \choose k} (2k-9)^N (-1)^{(N+1)/2} \sin((2k-9)x)
&N \text{ odd}. \\
\end{cases}
\end{align*}
