Why Fourier series is represented in 2 different ways? Why Fourier series is sometimes represented as $$f(x) = \frac{a_0}{2} + \sum_{r=1}^{\infty}[a_r \cos(\frac{2\pi rx}{L}) + b_r \sin(\frac{2\pi r x}{L})],$$ but sometimes $$f(x) = \frac{a_0}{2} + \sum_{r=1}^{\infty}[a_r \cos(rx) + b_r \sin(rx)].$$ Why do people define it in two different ways? Are they equivalent? How to prove that they are? 
 A: Let $L$ be  a non zero real number. In general, you have the Fourier series expansion on the interval $[-L,L]$
$$f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left[a_n \cos\left(\frac{\pi nx}{L}\right) + b_n \sin\left(\frac{\pi n x}{L}\right)\right],$$ 
$$a_{0}=\frac{1}{L}\int_{-L}^{L}{f(x)dx}$$
$$a_{n}=\frac{1}{L}\int_{-L}^{L}{f(x)\cos\left(\frac{\pi nx}{L}\right)dx}$$
$$b_{n}=\frac{1}{L}\int_{-L}^{L}{f(x)\sin\left(\frac{\pi nx}{L}\right)dx}$$

When $L=\pi$, you have in particular the Fourier series expansion in the interval $[-\pi,\pi]$
  $$f(x) = \frac{a_0}{2} + \sum_{r=1}^{\infty}[a_r \cos(nx) + b_r \sin(nx)].$$
  $$a_{0}=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(x)dx}$$
  $$a_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(x)\cos\left(\frac{\pi nx}{\pi}\right)dx}=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(x)\cos(nx)dx}$$
  $$b_{n}=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(x)\sin\left(\frac{\pi nx}{\pi}\right)dx}=\frac{1}{\pi}\int_{-\pi}^{\pi}{f(x)\sin(nx)dx}$$

Even, you can do the same in any interval $[a,b]$ with $a<b$ (under some hypothesis of course):

Let's call $$L=\frac{b-a}{2}$$
  $$f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left[a_n \cos\left(\frac{2\pi nx}{b-a}\right) + b_n \sin\left(\frac{2\pi n x}{b-a}\right)\right],$$
  but in this case the Fourier coefficients are:
  $$a_{0}=\frac{2}{b-a}\int_{a}^{b}{f(x)dx}$$
  $$a_{n}=\frac{2}{b-a}\int_{a}^{b}{f(x)\cos\left(\frac{2\pi nx}{b-a}\right)dx}$$
  $$b_{n}=\frac{2}{b-a}\int_{a}^{b}{f(x)\sin\left(\frac{2\pi nx}{b-a}\right)dx}$$

