Precursor to the Fourier Transform actually.

It shows that any periodic function can be represented as a superposition of sine and cosine functions as harmonic frequencies.

Mathematical Definition

Given a periodic function which has a period of

Where coefficients and are found by:

Extension to Non-Periodic

Its pretty simple, you just:

  1. pretend that the bounds of your non-periodic function is a single period
  2. fit a Fourier Series on that pseudo-periodic function ()
  3. the series will match perfectly within the bounds and just repeat forever after that.