I'm studying Fourier analysis and my book gives the following definitions for the Fourier series and Fourier coefficients:

Fourier series of $2\pi$-periodic function $f(\theta)$ is defined as:

$$f(\theta) = \frac{1}{2}a_0 + \sum_{1}^{\infty}a_n\cos n\theta + b_n\sin n\theta\;\;\;\;(1),$$


$$a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}f(\theta)\;d\theta,$$ $$a_n = \frac{1}{\pi}\int_{-\pi}^{\pi}f(\theta)\cos n\theta\;d\theta\;\;\;\;(n\geq0),$$ $$b_n = \frac{1}{\pi}\int_{-\pi}^{\pi}f(\theta)\sin n\theta\;d\theta\;\;\;\;(n\geq 1).$$

The definition of $a_n$ puzzles me, because of the $(n\geq0)$. For example if I have the $2\pi$-periodic function $f(\theta)=|\theta|$, for $-\pi\leq\theta\leq\pi$, the Fourier coefficients of $a_0$ and $a_n$ are (from my book):

$$a_0 = \pi,\;\;\;\;\text{for}\;\;\; n=0$$ $$a_n=\frac{2}{\pi}\frac{(-1)^n-1}{n^2},\;\;\;\;\text{for}\;\;\; n>0$$

The author states also:

Note that the formula for $a_n$ also holds for $n=0$; this is the reason for the factor of $\frac{1}{2}$ in $(1)$.

Do you see my problem? If I now plug in $n=0$ for my example problem in $a_n$ I get a zero division? Why does the author make the statement that it also holds for $n=0$. Shouldn't then:

$$a_0=\frac{2}{\pi}\frac{(-1)^0-1}{0^2} = \frac{2}{\pi}\frac{0}{0}=\pi,$$

which of course makes no sense...?

Thank you for any help! =)


You are confusing two things. One is the definition of the coefficients, which can be valid for all values of $n$. And the other is the actual evaluation of the integral, which can give different solutions for $n=0$ and $n>0$.


$$a_0 = \frac{1}{\pi}\int_\pi^{-\pi} f(\theta) \cos(0\cdot \theta)d\theta =\\ =\frac{1}{\pi}\int_\pi^{-\pi} f(\theta)\cdot 1d\theta$$

  • $\begingroup$ Thank you for your help @5xum, I noticed what you mean. But shouldn't (According to slightly conflicting definitions): $a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}f(\theta)\cos(0\cdot\theta)\;d\theta = \frac{2}{\pi}\frac{0}{0}=\pi$? I mean, shouldn't it NOT matter whether you plug in $n=0$ before you do the integration or after integration?... $\endgroup$ – jjepsuomi Mar 4 '14 at 7:33
  • 1
    $\begingroup$ No, because the equation $$a_n=\frac{2}{\pi}\frac{(-1)^n-1}{n^2},\;\;\;\;\text{for}\;\;\; n>0$$ only holds for $n>0$ and not for $n=0$. The equation the author says holds for $n=0$ is the one I wrote in my answer, not one you think. $\endgroup$ – 5xum Mar 4 '14 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.