The general formula for the Fourier series is:
$$f(x) = a_0 + \sum_{n=1}^{\infty} [a_n \cos(\frac{n\pi x}{p}) + b_n \sin(\frac{n\pi x}{p})]$$
Where $a_0$, $a_n$, and $b_n$ are the Fourier coefficients, and $p$ is the period of the function. In this case, $p=2$.
Show more…