Contradiction between $a_0$ and $a_k$ for Fourier Series

84 Views Asked by At

I need to calculate the Fourier Series for the function $f(x) = |x| \; f:[-\pi,\pi] \to \mathbb{R}$

When calculating $a_k = {1 \over \pi} \int_{-\pi}^{\pi} f(x) \cos{(kx)} dx \; (k \in \mathbb{N_0})$ I get the following formula:

$a_k = \begin{cases} 0 & k \; even \\ -{4 \over \pi k^2} & k \; odd \end{cases}$

Doesn't that mean that $a_0 = 0$ ?

However when I calculate $a_0$ with aboves formula I get:

$a_0 = {2 \over \pi} \int_{0}^{\pi} x dx = \pi$

So what am I missing?

1

There are 1 best solutions below

1
On BEST ANSWER

You're not missing anything, you should think of $a_0$ as an DC value of a signal and all the proceeding components of $a_k$ bring you the periodical behavior with some frequency, you calculated everything ok, but the idea of calculating $a_0$ separately does have a reason. What is the Fourier series of the following two functions:

$f(x)=1+cosx$

$f(x)=cosx$

Only difference is in the DC value - that is in factor $a_0$!