We have the function $$g: [0, 2\pi] \rightarrow \mathbb{R} \\ g(x)=\frac{(x-\pi)^2}{4}, x \in [0, 2\pi]$$
I found that the Fourier series of $g$ is the following:
$$g \sim \frac{\pi^2}{12}+\sum_{k=1}^{\infty}\frac{1}{k^2}\cos (kx)$$
Is this correct??
After that, I am asked to find the following sums :
$$\sum_{k=1}^{\infty}\frac{1}{k^2} \ \ , \ \ \sum_{k=1}^{\infty}\frac{(-1)^k}{k^2}$$
How could we find them?? Do we have to use the Fourier series above?? But how??
We have $$\dfrac{(x-\pi)^2}4 = \dfrac{\pi^2}{12} + \sum_{k=1}^{\infty} \dfrac{\cos(kx)}{k^2} \,\,\,\,\, (\spadesuit)$$ Plug in $x=0$ in $(\spadesuit)$, we then obtain $$\dfrac{\pi^2}4 = \dfrac{\pi^2}{12} + \sum_{k=1}^{\infty} \dfrac1{k^2} \implies \sum_{k=1}^{\infty} \dfrac1{k^2} = \dfrac{\pi^2}6$$ Plug in $x=\pi$ in $(\spadesuit)$, we then obtain $$0 = \dfrac{\pi^2}{12} + \sum_{k=1}^{\infty} \dfrac{\cos(k\pi)}{k^2} \implies \sum_{k=1}^{\infty} \dfrac{(-1)^k}{k^2} = -\dfrac{\pi^2}{12}$$