Given the function $$f(x)=\begin{cases} 1, \space\space\space\space 0\leq |x|\leq 1/4 \\ -1, \space 1/4< |x|\leq 1/2 \end{cases}$$
I am asked to expand the function $f(x)$ as a series of cosine. ( I am studying Fourier series). Knowing it is an even function, I have expanded it and I have $$Sf(x)=4\sum_{k=0}^{\infty}\frac{(-1)^k}{\pi (2k+1)}\cos(2\pi x(2k+1))$$Now I am asked to calculate $$\sum_{k=0}^{\infty}\frac{(-1)^k}{(2k+1)}$$ and $$\sum_{k=0}^{\infty}\frac{1}{(2k+1)^2}$$ How do I calculate it?