Fourier series

Fourier series can be used to approximate a general periodic function, even with discontinuities. It does this by using the sum of continuous sine and cosine waves.

Summary of mathematics used

The Fourier series of the periodic function f(x) defined on the domain [π,π] such that f(x)+f(x+2π) is given by:

f(x)=12a0+n=1(ancosnx+bnsinnx)

where

a0=1πππf(x)dx

and

an=1πππf(x)cosnxdx, andbn=1πππf(x)sinnxdxforn=1,2,.

This formula can be extended to functions with an arbitrary period. In addition, any function defined on an interval [a,b] can be extended to a periodic function, with period ba, for which a Fourier series can be calculated. For more details on the mathematics underlying Fourier series see https://mathworld.wolfram.com/FourierSeries.html and the references contained within it.