Fourier Series for $|\cos(x)|$ I'm having trouble figuring out the Fourier series of $|\cos(x)|$ from $-\pi$ to $\pi$.
I understand its an even function, so all the $b_n$s are $0$
$$a_0 = \frac 2 \pi \int_0^\pi |\cos(x)|\,dx = 0$$
$$a_n = \frac 2 \pi \int _0^\pi  |\cos(x)| \cos(nx) \, dx = \frac 2 \pi \int_0^\pi \cos^2(x)\,dx.$$
since for all $j,k$ not equal the integral is zero.
so only $a_1$ remains. is this correct? 
How would I evaluate $\sum_{n=1}^\infty (-1)^{n-1} /(4n^2 - 1)\  {}$?

It is not correct.
$$
\int_0^\pi|\cos x|\cos(n\,x)\,dx=\int_0^{\pi/2}\cos x\cos(n\,x)\,dx-\int_{\pi/2}^\pi\cos x\cos(n\,x)\,dx.
$$
Compute the integrals and you will see that the result is not $0$.
