Question: Prove the following identity:
$|x|=\frac{\pi}{2}+\sum_{n=1}^{\infty}\frac{\cos(2n-1)x}{(2n-1)^2}$. Our current topic is Fourier analysis, but I am truly lost here. I tried to compute the Fourier series, but it seemed extremely different than the wanted identity.
You can evaluate it using complex fourier coefficients $c_k$. You get: $\frac{1}{2\pi}$($\int_{0}^{-\pi}xe^{-ikx}dx$ + $\int_{0}^{\pi}xe^{-ikx}dx$) which results after integration by parts in $\frac{1}{\pi k^2}((-1)^k-1)=c_k$ Now, we use $a_k=c_k+c_{-k}$ and $b_k=i(c_k-c_{-k})$ which is $0$.
$a_k$ becomes $\frac{-4}{\pi k^2}$ where k is odd,i.e. $k=2n-1$ and $a_0$, after evaluation, becomes $\pi$
So now, you have : $$f(x)=\frac{a_0}{2}+\sum_{k=1}^{\infty}a_kcos(kx), k=(2n-1)$$ So after plugging in all values, we get $$f(x)=|x|=\frac{\pi}{2}+\frac{-4}{\pi} \sum_{n=1}^{\infty} \frac{1}{(2n-1)^2} cos((2n-1)x)$$
Hope this helps !