Im trying to find the fourier series of this function
And i get the coeffesients just like the solutionsheet:
$$a_0=\frac{\pi^2}{12}$$ $$a_n = -\frac{2}{n^2} , n =even$$ $$b_n = \frac{4}{\pi n^3}, n=odd$$
but when i put this in the fourier series formula i get:
$$f(x)=\frac{\pi^2}{12} + \sum_{n=1}^\infty (-\frac{2}{n^2}cos(nx) + \frac{4}{\pi (2n-1)^3}sin((2n-1)x))$$
but in the answersheet the answer is:
$$f(x)=\frac{\pi^2}{12} + \sum_{n=1}^\infty (-\frac{1}{2n^2}cos(2nx) + \frac{4}{\pi (2n-1)^3}sin((2n-1)x))$$
where does the 2 come from in the cos part? im confused. I used the fromula: $$f(x)=a_0 + \sum_{n=1}^\infty (a_n cos(\frac{n\pi x}{L}) + b_nsin(\frac{n\pi x}{L}))$$

Since n is even n= 2k for some k. $n^2= 4k^2$ so $-\frac{2}{k^2}= -\frac{2}{4k^2}= -\frac{1}{2k^2}$. Now just replace the dummy variable "k" with "n" again.