I know that Fourier series for f(x) is $$f(x)=A_o+\sum_{n=1}^{ \infty} (A_n cos(n\pi x/L)+B_n sin(n\pi x/L) ) $$ where $$A_o=\frac{1}{2L} \int_{-L}^{L} f(x) dx$$ $$A_n=\frac{1}{L} \int_{-L}^{L} f(x) cos(n\pi x/L)dx$$ $$B_n=\frac{1}{L} \int_{-L}^{L} f(x) sin(n\pi x/L)dx$$ But sometimes I found problems solved using integration from 0 to 2L instead of integration from -L to L : $$A_o=\frac{1}{2L} \int_{0}^{2L} f(x) dx$$ $$A_n=\frac{1}{L} \int_{0}^{2L} f(x) cos(n\pi x/L)dx$$ $$B_n=\frac{1}{L} \int_{0}^{2L} f(x) sin(n\pi x/L)dx$$ My question is : when to use integration from -L to L and when to use intergration from 0 to 2L?
For example : the following problem ( in polar coordinates ) Find the temperature u inside a circular disk $$0\leq r\leq a$$ if it is governed by $$\nabla^2u=0$$ i.e. $$u_{rr}+\frac{1}{r} u_r + \frac{1}{r^2}u_{\theta\theta}=0$$ given that $$ u(a,\theta)= f(\theta)=2 \pi \theta - \theta^2$$
I solved this problem and I fot finally that $$f(\theta)=A_o+\sum_{n=1}^{\infty}(a^n A_n cos(n\theta)+a^n B_n sin(n\theta))$$ then if I used $$A_o=\frac{1}{2L} \int_{-L}^{L} f(x) dx$$ I got $$A_o=\frac{\pi^2}{3}$$ But if I used $$A_o=\frac{1}{2L} \int_{0}^{2L} f(x) dx$$ I got $$A_o=\frac{2 \pi^2}{3}$$
where $$L=\pi\ Since\ u \ is \ periodic\ with\ 2\pi \ and \ L \ is \ half \ of \ the\ period.$$