A Fourier series for a function f(x) is an infinite sum such that
[tex]f(x)= \sum_{m=0}^\infty A_n cos(nx)+ B_n sin(nx)[/tex] (or other (x/L) or whatever inside the trig functions).
Of course, the right side of that is periodic with period [itex]2\pi[/itex] so if f is not itself periodic, that can only be true on some interval (which is one reason why you might need that "/L" to alter the interval).
But if f(x)= sin(x) is not only periodic with period [itex]2\pi[/itex], it is already of that form and it is obvious that [itex]A_n= 0[/itex] for all n, while [itex]B_1= 1[/itex] and [itex]B_n= 0[/itex] for all n greater than 1.
More generally, if f(x) is integrable on the interval [0, L], then on that interval [itex]f(x)= A_n cos(2n x\pi/L)+ B_n sin(2n x\pi/L)[/itex] where
[itex]A_0= \frac{1}{L}\int_0^L f(x) dx[/itex]
[itex]A_n= \frac{1}{2L}\int_0^L f(x)cos(2n x/L)[/itex]
for n> 0 and
[itex]B_n= \frac{1}{2L}\int_0^L f(x)sin(2n x/L)[/itex].