The Fourier series of a function $f(x)$ is given by:
$$
f(x) = a_0 + \sum_{n=1}^{\infty} [a_n \cos(nx) + b_n \sin(nx)]
$$
where the coefficients $a_n$ and $b_n$ are given by:
$$
a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \, dx
$$
$$
a_n = \frac{1}{\pi}
Show more…