Taylor series expansion for $\cos(2x)$ about $\frac{\pi}{8}$
Solution 1:
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}