I am trying to write the Fourier series of $(1-x)$ in $[0,1]$ in two different ways:
$$f(x) = \frac{a_0}{2}+\sum_{n=1}^\infty (a_n\cos(\pi nx/L)+b_n\sin(\pi n x/L)),$$
$$f(x)=\frac{a_0}{2}+\sum_{n=1}^\infty (a_n\cos(2\pi nx/L)+b_n\sin(2\pi n x/L)),$$
If I use the first one to write the Fourier series of $(1-x)$ in the interval $[0,1]$, I get $$f(x)=1/2+\sum_{n=0}^\infty \left\{\frac{2(1-(-1)^n)}{n^2\pi^2}\cos(n\pi x)+\frac{2}{n\pi}\sin(n\pi x)\right\}.$$
If I use the second one, however, I get
$$f(x) = 1/2+\sum_{n=0}^\infty \frac{\sin(2\pi nx)}{\pi n}.$$
Shouldn't they result in the same series?
How I calculated the coefficients in the first case:
$$b_n=2\int_0^1(1-x)\sin(n\pi x)dx$$
$$a_n=2\int_0^1(1-x)\cos(n\pi x)dx$$
For the second case:
$$b_n=2\int_0^1(1-x)\sin(2\pi nx)dx$$
$$a_n=2\int_0^1(1-x)\cos(2\pi nx)dx$$