I want to find the Fourier series of the periodic function defined on $[0,1]$ by $f(x)=x$:
The fourier series is: $$S(x)=\frac{a_0}{2}+\sum_{n=1}^\infty a_n \cos(2 \pi n x)+b_n \sin(2 \pi n x),$$ where $$a_n=2\int_\frac{-1}{2}^\frac{1}{2}f(x)\cos(2 \pi n x)dx=2\int_0^1f(x)\cos(2 \pi n x)dx=2\int_0^1x\cos(2 \pi n x)dx=0$$ and $$b_n=2\int_0^1x\sin(2 \pi n x)dx=\frac{-1}{n \pi}.$$ But my function $f$ is not odd, nor even. I don't know where's the problem.
