The Fourier series is a mathematical tool used for analyzing periodic functions by decomposing such a function into a weighted sum of much simpler sinusoidal component
The Fourier series expansion of f is:
-
where, for any non-negative integer n:
Let
f be periodic of period
2
, with
f(x) = x for
x from -

to
We will compute the Fourier coefficients for this function.

![egin{align} b_n &{}= rac{1}{pi}int_{-pi}^{pi}f(x)sin(nx),dx &{}= rac{1}{pi}int_{-pi}^{pi} x sin(nx), dx &{}= rac{2}{pi}int_{0}^{pi} xsin(nx), dx &{}= rac{2}{pi} left(left[- rac{xcos(nx)}{n} ight]_0^{pi} + left[ rac{sin(nx)}{n^2} ight]_0^{pi} ight) &{}= 2 rac{(-1)^{n+1}}{n}.end{align}](http://upload.wikimedia.org/math/9/6/4/96499a0d78c630eed6f3e0fb56916cf9.png)
Notice that
an are 0 because the

are odd functions. Hence the Fourier series for this function is:
![f(x)= rac{a_0}{2} + sum_{n=1}^{infty}left[a_ncosleft(nx ight)+b_nsinleft(nx ight) ight]](http://upload.wikimedia.org/math/5/9/8/59898330aa663ec50aa3967e17b4298e.png)
-
![=2sum_{n=1}^{infty} rac{(-1)^{n+1}}{n} sin(nx), quad orall xin [-pi,pi].](http://upload.wikimedia.org/math/1/a/4/1a4076e2dce0314db149126b84b2c36f.png)
