So, knowing that $$f(x) = \sum_{n=0}^\infty \frac{f^n(a)(x-a)^n}{n!}$$
For my case I write $$\cos(2x) = \sum_{n=0}^\infty \frac{\frac{d^n(cos(\frac{\pi}{4}))}{d(\frac{\pi}{8})^n}(x-\frac{\pi}{8})^n}{n!}$$
I would now like to derive the sum formula for my specific case, for which I suppose I would have to derive the $n^{th}$ derivative.
I couldn't quite see a single clear pattern when deriving each derivative or each term of the sequence (although there seems to be one in derivatives, same doesn't hold for terms):$$f(\frac{\pi}{8}) = \frac{1}{\sqrt2}$$$$f'(\frac{\pi}{8}) = -\sqrt2$$$$f''(\frac{\pi}{8}) = -2\sqrt2$$$$f'''(\frac{\pi}{8}) = 4\sqrt2$$
$\cos(2x) = \frac{1}{\sqrt2} - \sqrt2(x-\frac{\pi}{8}) - \sqrt2(x-\frac{\pi}{8})^2 + \frac{2}{3}\sqrt2(x-\frac{\pi}{8})^3 + \frac{1}{3}\sqrt2(x-\frac{\pi}{8})^4 - \frac{2}{15}\sqrt2(x-\frac{\pi}{8})^5 ...$
I also found that for $f(x) = \cos(ax)$
$f^{(n)} (x)=(-a^2)^{(n-1)/2}(-a)\sin ax,$ for $n$ odd
and $f^{(n)} (x)=(-a^2)^{n/2}\cos ax,$ for $n$ even from this answer:
by John Doe ()
But while it reduces to a simpler form for my case where $a = \frac{\pi}{8}$, I still can't get my head around uniting all this into a single formula forth both odd and even values of $n$.
Any help appreciated!
$\endgroup$ 41 Answer
$\begingroup$Notice that\begin{align}\cos(2x)&=\cos\left(2\left(x-\frac\pi8\right)+\frac\pi4\right)\\&=\cos\left(2\left(x-\frac\pi8\right)\right)\cos\left(\frac\pi4\right)-\sin\left(2\left(x-\frac\pi8\right)\right)\sin\left(\frac\pi4\right)\\&=\frac1{\sqrt2}\sum_{n=0}^\infty(-1)^n\frac{2^{2n}\left(x-\frac\pi8\right)^{2n}}{(2n)!}-\frac1{\sqrt2}\sum_{n=0}^\infty(-1)^n\frac{2^{2n+1}\left(x-\frac\pi8\right)^{2n+1}}{(2n+1)!}.\end{align}
$\endgroup$ 6