Writing a general formula for nth derivative of $\cos(ax)$ So as stated in the title I have to create a general formula for nth derivative of $f(x) = \cos(ax)$ and proving it with induction.
I get $f(x) = \cos(ax)$ 
$f'(x) = -a\sin(ax)$ 
$f''(x) = -a^2\cos(ax)$
$f'''(x) = a^3\sin(ax)$ 
$f''''(x) = a^4\cos(ax)$ 
How are you supposed to algrebraically write a formula for this? I obviously see a pattern but I don't know how to approach this. Any help would be greatly appriciated.
 A: When $n=1$, you get $-a \sin ax$.
When $n=3$, you get $a^3 \sin ax$.
When $n=5$, you get $-a^5 \sin ax$.
So at each step you multiply by $-a^2$. So $f^{(n)} (x)=(-a^2)^{(n-1)/2}(-a)\sin ax,$ for $n$ odd.
When $n=0$, you get $ \cos ax$.
When $n=2$, you get $-a^2 \cos ax$.
When $n=4$, you get $a^4 \cos ax$.
So at each step you multiply by $-a^2$. So $f^{(n)} (x)=(-a^2)^{n/2}\cos ax,$ for $n$ even.
A: You can write
$$
f(x)=\cos(ax)=\frac{e^{iax}+e^{-iax}}{2}
$$
so
$$
f^{(n)}(x)=a^n\frac{i^ne^{iax}+(-i)^ne^{-iax}}{2}
$$
Now observe that $i=e^{i\pi/2}$ and $-i=e^{-i\pi/2}$, so
$$
i^ne^{iax}=e^{i(ax+n\pi/2)}
\qquad\text{and}\qquad
(-i)^n=e^{-i(ax+n\pi/2)}
$$
Finally you get
$$
f^{(n)}(x)=a^n\cos\left(ax+n\frac{\pi}{2}\right)
$$
A: $f^{(4k)}(x)=a^{4k}\cos(ax)$, $f^{(4k+1)}(x)=-a^{4k+1}\sin(ax)$, $f^{(4k+2)}(x)=-a^{4k+2}\cos(ax)$, $f^{(4k+3)}(x)=a^{4k+3}\sin(ax)$, $k=0,1,2,...$
A: In one formula it is
$$
f^{(k)}(x)=a^k\cos\left(ax+k\frac\pi2\right)
$$
using the symmetries of sine and cosine $\sin(x+\frac\pi2)=\cos(x)$ and $\cos(x+\frac\pi2)=-\sin(x)$.
A: We can get the obvious parts down and slowly work our way to the general derivative. Obviously$$f^{(n)}(x)=a^n\times\text{something}$$Where $f(x)=\cos ax$. To find what the 'something' is, we employ an old rule that$$\begin{align*} & \sin\left(x+\tfrac 12\pi\right)=\cos x\\ & \cos\left(x+\tfrac 12\pi\right)=\sin x\end{align*}$$Since $f(x)$ without a derivative is $\cos ax$, so we will be using the latter formula. And based off the rest of the observations, we can guess that$$f^{(n)}(x)=a^n\cos\left(ax+\tfrac 12 n\pi\right)$$For integral $n$.

Let's use induction to prove it. The first few steps (substituting $n=0$) will be left as an exercise for the OP, but the essential part is using$$f^{(n+1)}(x)=\left[f^{(n)}(x)\right]'$$Hence$$\begin{align*}f^{(n+1)}(x) & =\left[f^{(n)}(x)\right]'\\ & =-a^{n+1}\sin\left(ax+\tfrac 12n\pi\right)\\ & =a^{n+1}\cos\left(ax+\tfrac 12n\pi+\tfrac \pi2\right)\end{align*}$$
Where the last line follows from$$\cos\left(\theta+\frac {\pi}2\right)=-\sin\theta$$and $\theta$ is the expression inside the cosine function.
