Finding a series of cosines to represent the absolute value function

53 Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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 !

0
On

It should be $$ |x|=\frac{\pi}{2}-\frac{4}{\pi}\sum_{n=1}^{\infty}\frac{\cos(2n-1)x}{(2n-1)^2}. $$ Since $|x|$ is even, there are no sine terms, and the coefficient of $\cos(n\,x)$ is $$ \frac{1}{\pi}\int_{-\pi}^\pi|x|\cos(n\,x)\,dx=\frac{2}{\pi}\int_0^\pi x\cos(n\,x)\,dx,\quad n\ge0. $$ This integral easily computed using integration by parts.