In this couple of days, I need to know the high derivatives of $cos^kx$ whose power $k$ make the differentiation much harder. Then I attempt to use the identity $$ \cos x=\frac{1}{2}\left(e^{x i}+e^{-x i}\right), $$
to expand it with Binomial expansion $$ \begin{aligned} \cos ^{k} x &=\frac{1}{2 ^k} \sum_{j=0}^{k}\binom{k}{j}e^{x(k-j) i} e^{-x i j} =\frac{1}{2^{k}} \sum_{j=0}^{k}\binom{k}{j} e^{x(k-2 j) i} \end{aligned} $$
Differentiating it by $n$ times yields $$ \begin{aligned} \frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right) &=\frac{1}{2^k} \sum_{j=0}^{k}\binom{k}{j}[(k-2 j) i]^{n} e^{x(k-2 j) i} \\ &=\frac{i^{n}}{2 ^k} \sum_{j=0}^{k}\binom{k}{j}(k-2 j)^{n} e^{x(k-2 j) i} \\ &=\frac{i^{n}}{2^{k}} \sum_{j=0}^{k}\binom{k}{j}(k-2 j)^{n}[\cos ((k-2 j) x)+i \sin ((k-2 j) x)] \end{aligned} $$
If $x$ is real, then comparing the imaginary and real parts on both sides yields \begin{equation} \displaystyle \frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right)=\left\{\begin{array}{ll} \displaystyle \frac{(-1)^{\frac{n}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n}\cos((k-2j)x) \quad \textrm{ if n is even.}\\\displaystyle \frac{(-1)^{\frac{n+1}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n} \sin((k-2j)x) \quad \textrm{ if n is odd.} \end{array}\right. \end{equation}
For examples,
- When $n$ is even,
$$ \left.\frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right)\right|_{x=0}=\frac{(-1)^{\frac{n}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n} $$
In particular, $$ \begin{aligned} \left.\frac{d^{6}}{d x^{6}}\left(\cos ^{5} x\right)\right|_{x=0}&=\frac{(-1)^{3}}{2^{4}} \sum_{j=0}^{2}\binom{5}{j}(5-2 j)^{6} \\ &=\frac{1}{16}\left[5^{6}+5 \cdot 3^{6}+10 \cdot 1^{6}\right] \\ &=1205 \end{aligned} $$
- When $n$ is odd,$$ \left.\frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right)\right|_{x=0}=0; $$ $$\left.\frac{d^{n}}{d x^{n}}\left(\cos ^{k} x\right) \right|_{x=\frac{\pi}{4} }= \frac{(-1)^{\frac{n+1}{2}}}{2^{k-1}} \sum_{j=0}^{\left\lfloor\frac{k}{2}\right\rfloor}\binom{k}{j}(k-2 j)^{n} \sin \frac{(k-2 j) \pi}{4} $$
Can we find its closed form without using the complex numbers?
Although essentially equivalent, you can say
$$\cos^k(x)=\frac1{2^k}\sum_{j=0}^k{k\choose j}\cos(k-2j)x,$$ which can be proved by induction on $k$, together with the sum formula. Now, differentiating is fairly straightforward, based on casework on $n\pmod 4$.