fourier series of absolute value of function

5.8k Views Asked by At

I am trying to find the Fourier series of

$$ |\cos(x)| \text{ from } -\pi \leq x<\pi$$

I know that the $$ b_n $$ terms go to 0 because we have the integrand as an odd function of x.

But how can I solve for

$$a_n? $$

I know that $$a_n $$ is even and that

$$ a_n = 1/\pi\int |\cos(x)|\cos(n\pi) $$

But I am not sure how to solve this.

Any ideas?

1

There are 1 best solutions below

13
On BEST ANSWER

Since $f$ is even, you can find your coefficients as \begin{align} a_0 &= \frac{1}{2\pi}\int_{-\pi}^{\pi}|\cos(x)|dx\\ &= \frac{1}{\pi}\int_{0}^{\pi/2}\cos(x)dx - \frac{1}{\pi}\int_{\pi/2}^{\pi}\cos(x)dx\\ a_n &= \frac{1}{\pi}\int_{-\pi}^{\pi}|\cos(x)|\cos(nx)dx\\ &= \frac{2}{\pi}\int_{0}^{\pi/2}\cos(x)\cos(nx)dx - \frac{2}{\pi}\int_{\pi/2}^{\pi}\cos(x)\cos(nx)dx \end{align} Useful identity to use $$ \cos[(n+1)x]+\cos[(n-1)x] = 2\cos(x)\cos(nx) $$