All courses › Laplace, Fourier and PDEs › Fourier coefficients

Fourier coefficients

A periodic function can be written as a sum of sine and cosine terms, a Fourier series. The coefficients ana_n and bnb_n are found by integrating the function against cosine and sine respectively.

an=1L∫−LLf(x)cos⁡nπxL dxa_n = \frac1L\int_{-L}^{L}f(x)\cos\frac{n\pi x}{L}\,dxcosine coefficients
bn=1L∫−LLf(x)sin⁡nπxL dxb_n = \frac1L\int_{-L}^{L}f(x)\sin\frac{n\pi x}{L}\,dxsine coefficients

Symbols

2L2Lperiod
a0/2a_0/2mean value of f

Example

f(x)=5+4cos⁡xf(x)=5+4\cos x on [−π,π][-\pi,\pi]: the mean value is a0/2=5a_0/2=5, because the cosine term has mean value 0.

The integrand with sine gives bnb_n, and the one with cosine gives ana_n - easy to mix up.
Practise fourier series for free →

← Shift rule and partial fractions · Odd and even functions →

Part of Laplace, Fourier and PDEs: Fourier series.