I have a function f given as
$ f(x) = \begin{cases} ax&\text{ if }\quad-\pi \leq x \leq 0\\ bx&\text{ if }\quad 0
I came up with $f(x)=\sum\limits_{n=1}^{\infty} \frac{-2a \cos(n\pi)}{n}\sin(nx)$ for the first case and $f(x) = \sum\limits_{n=1}^{\infty} \frac{-2b \cos(n\pi)}{n}\sin(nx)$ for the other one - but that's two fourier series, not one, so I'm sure this is wrong. That being said, I have no idea how else I would go about this. Especially troubling is that the task demands that I calculate $\sum\limits_{n=0}^{\infty} \frac{1}{(2n+2)^2}$ somehow by setting $x$ to $0$ - but my series is $0$ at $x=0$ (and at least that seems to be right, because the function is too).
So if anyone could clear me up on how to solve this tasks and what misunderstandings I'm sure I've made, that would be great.