Consider $f(x) = |\cos(x)|$ for $x \in \mathbb R$.
I've proved the n'th fourier coefficient $c_n = \int^{\pi}_{-\pi} f(y)e^{-iny} \ dy = \frac 1 {2\pi} \frac {(-1)^{n-1}} {n^2-\frac 1 4}$.
However, how can I determine whether the Fourier series $\sum^{\infty}_{-\infty} \frac 1 {2\pi} \frac {(-1)^{n-1}} {n^2-\frac 1 4} e^{inx}$ converge point-wise or uniformly ?
Here the partial sum is given by $\sum_{|n| <N} \frac 1 {2\pi} \frac {(-1)^{n-1}} {n^2-\frac 1 4} e^{inx}$.
How can I use this to prove $\sum^{\infty}_{-\infty} \frac {(-1)^{n-1}} {n^2-\frac 1 4} = 2 \pi$ and $\sum^{\infty}_{-\infty} \frac {1} {(n^2-\frac 1 4)^2} = 2\pi^2$ ?
Define $S_N:=\sum_{n=0}^Nc_ne^{inx}$ and $S'_N:=\sum_{n=-N}^{-1}c_ne^{inx}$. Since for $M<N$, and $x\in\mathbb R$, $$|S_N(x)-S_M(x)|+|S'_N(x)-S'_M(x)|\leqslant \sum_{n=M+1}^N|c_n|+|c_{-n}| \leqslant \frac 1{\pi}\sum_{n=M+1}^N\frac 1{n^2-1/4},$$ the sequence $(S_N)_{N\geqslant 1}$ and $(S'_N)_{N\geqslant 1}$ are Cauchy in $C(\mathbb R)$ endowed with the uniform norm. The series is equal to $f$: this can be seen using uniqueness of the Fourier series.
Since $|\cos x|=\sum_{n\in\mathbb Z}c_ne^{inx}$, the value of $\sum_{n\in\mathbb Z}c_n$ can be obtained evaluating at $0$.
Parseval's equality reads $$\frac 1{2\pi}\int_{-\pi}^{\pi}\cos^2x\mathrm dx=\sum_{n\in\mathbb Z}|c_n|^2.$$ Since $\frac 1{2\pi}\int_{-\pi}^{\pi}\cos^2x\mathrm dx=1/2$, the conclusion follows.