# Taylor/Maclaurin series type question

I want to express $\cos(z)$ in a Taylor series centred on $z_0=\frac{\pi}{4}$.

Using the formula $\sum_{k=0}^{\infty} \dfrac{f^{(k)}(z_0)z^k}{k!}$ and the fact that $f^{(k)}(z)=\cos(z+\frac{k\pi}{2})$ in this case I found that the Taylor series is $$\sum_{k=0}^{\infty} \frac{\cos(\frac{\pi}{4}+\frac{k\pi}{2})}{k!} (z-\frac{\pi}{4})^k$$ which is also what Wolfram Alpha claims the Taylor series to be.

I decided I wanted to get this Taylor series another way. Instead of plugging stuff into the formula directly, I wanted to work from the Maclaurin series of $\cos(z)$ to get the Taylor series. This is what I have so far:

$$\cos(z)=\cos(z-\frac{\pi}{4}+\frac{\pi}{4})\\=\cos(z-\frac{\pi}{4})\cos(\frac{\pi}{4})-\sin(z-\frac{\pi}{4})\sin(\frac{\pi}{4})\\=\frac{1}{\sqrt{2}}\cos(z-\frac{\pi}{4})-\frac{1}{\sqrt{2}}\sin(z-\frac{\pi}{4})\\=\frac{1}{\sqrt{2}}(\sum_{k=0}^{\infty} (-1)^k\frac{(z-\frac{\pi}{4})^{2k}}{(2k)!}-\sum_{k=0}^{\infty} (-1)^k\frac{(z-\frac{\pi}{4})^{2k+1}}{(2k+1)!})\\=\frac{1}{\sqrt{2}}\sum_{k=0}^{\infty} [(-1)^k\frac{(z-\frac{\pi}{4})^{2k}}{(2k)!}(1-\frac{z-\frac{\pi}{4}}{2k+1})]$$

But I don't know how to simplify this to get $\sum_{k=0}^{\infty} \frac{\cos(\frac{\pi}{4}+\frac{k\pi}{2})}{k!} (z-\frac{\pi}{4})^k$.

If somebody could help me out I'd really appreciate it!

Since $$\frac{1}{\sqrt{2}}(-1)^{s(k)}=\cos\left(\frac{\pi}{4}+\frac{k\pi}{2}\right)\qquad\qquad\quad\ \ k\geq 0$$ the claim follows.