1

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.

eepperly16
  • 7,712

5 Answers5

1

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.

John Doe
  • 14,765
  • But for even derivatives according to your formula, would't the constant $a$ always be positive? At n =2 as an example. – Aliasa Zarowny Pseudonymia Nov 25 '17 at 02:31
  • @AliasaZarownyPseudonymia: I don't see where you see anything to that effect. – celtschk Nov 25 '17 at 08:33
  • @AliasaZarownyPseudonymia $n=2$ would give $$f^{(n)}(x)=f^{(2)}(x)=(-a^2)^{2/2}\cos ax=-a^2 \cos ax$$ which is correct. Whether $a$ is positive or negative is not relevant. Does that clear up your problem? – John Doe Nov 25 '17 at 18:34
1

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) $$

egreg
  • 244,946
0

$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,...$

user284331
  • 56,315
  • What did you do to understand that you have to take n = 4k? – Aliasa Zarowny Pseudonymia Nov 25 '17 at 02:32
  • I don't follow? In principle I am considering the remainder of dividing by $4$, that the pattern has a loop after four trials, of course @John Doe provided a more efficient answer. – user284331 Nov 25 '17 at 02:35
  • For some reason this is still a little confusing for me. Did you use 4k because the series repeats on the 4th multipel? – Aliasa Zarowny Pseudonymia Nov 25 '17 at 03:07
  • Yes, it repeats, as you can see for number fifth, sixth, ... – user284331 Nov 25 '17 at 03:08
  • This might sound stupid. But I just want to affirm(sorry). So what's the reason for including $k=0,1,2,3..$, is it just to say that for every positive integer $k$ it will return the same value? – Aliasa Zarowny Pseudonymia Nov 25 '17 at 03:15
  • Your comment sounds offensive. Actually if you look at the solution provided by @John Doe, when $n=2k$ is even, and he actually subdivided again to get $n/2=k$ but the sign $(-1)^{n/2}=(-1)^{k}$ still varies, and it becomes positive if $k$ is even and negative if $k$ is odd, and this is somehow subdividing $k$ again, in some sense for the original $n$, you subdivide twice, so it is something having to do with subdividing by $4$, which exactly is my solution going like. Of course I have to say his solution is more neatly than mine but I don't think my solution ought the title to be stupid. – user284331 Nov 25 '17 at 03:23
  • I'm sorry if I unintentionally offended you! I meant that my question was stupid, not yours. I'm incredibly thankfull that somebody even engages me in an active dialogue just to help me figure things out. I would never willfully antagonize someone. Sorry and thank you btw – Aliasa Zarowny Pseudonymia Nov 25 '17 at 03:36
0

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)$.

Lutz Lehmann
  • 131,652
0

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.

Crescendo
  • 4,417