I have got stuck on the following task:
Find the value of the series $${4\over \pi^2}\sum_{k=1}^\infty {1\over k^2}-{1\over \pi^2}\sum_{k=1}^\infty{(-1)^k\over k^2}$$ using real-valued Fourier series representation of the $4$-periodic function $$f(x)=(1-|x|)\mathbb{1}_{[-1,1]}(x), \qquad -2<x\leq2$$
where $\mathbb{1}$ is a characteristic function.
I wonder if my real Fourier series is correct, as with what I got I don't know how I can determine the value of the given series.
Here's how I proceed:
At first I would rewrite the function so it looks nicer: $$x\mapsto \left\{ \begin{array}{ll} 1-|x| & -1\leq x \leq 1\\ 0 &\text{otherwise} \end{array} \right. $$ As we can easily see the function is even, so the $b_k$ coefficients of the series will be equal $0$. Finding $a_k$: $$\begin{eqnarray} a_k&=\int_0^2f(x)\cos {\pi kx \over 2}dx=\int_0^1(1-x)\cos {\pi kx \over 2}dx\\ &\left.=(1-x){2 \over\pi k}\sin{\pi kx \over 2}\right|_0^1+\int_0^1{2 \over\pi k}\sin{\pi kx \over 2}dx\\ &=\left.-{4\over\pi^2k^2}\cos{\pi kx \over 2}\right|_0^1={4\over\pi^2k^2}\left(1-\cos{\pi k \over 2} \right)\end{eqnarray}$$
So for $k\in \mathbb{Z}^{\ge1}$ we have 3 different cases: $$ a_k= \left\{ \begin{array}{ll} {4\over\pi^2n^2}, & n=2k-1\\ {8\over\pi^2n^2}, & n=4k-2\\ 0, & n=4k \end{array} \right. $$ We still need to find $a_0$: $$a_0=\int_0^11-x\;dx=\left.-\frac12 (1-x)^2\right|_0^1=\frac12$$ So now we can really write the series representation: $$f(x)\rightsquigarrow \frac12+\sum_{k=1}^\infty {4\over\pi^2(2k-1)^2}\cos\left({\pi(2k-1) \over 2}x\right)+\sum_{k=1}^\infty {8\over\pi^2(4k-2)^2}\cos\left({\pi(4k-2) \over 2}x\right)$$
Is my solution till now correct or not? If yes, how can I tackle the series in the task?