Posted on 

Derivation of Fourier Series

1.The Basic Principle

Fourier series can be used to model different forms of waves. The basic principle can be made clear in the following video:

Here, we only talk about the derivation of the coefficients of Fourier Series.

2.The form of the Fourier Series

The most basic periodic function is the Trigonometric series:
$$
f(t) = A sin(wt+\phi)
$$
If we take a linear superposition of trigonometric series of different magnitudes, frequencies, and initial phases in a certain way, we can obtain a function of any waveform:
$$
f(t) = A_0 + \sum A_n sin(W_nt+\phi_n)
$$
For the convenience of the following derivation, Fourier suggests a given initial frequency \(w_0\), and the another different frequencies can be expressed as integer multiples of \(w_0\):
$$
f(t) = A_0 + \sum A_n sin(nW_0t+\phi_n)
$$
Then we use trigonometric formula to simplify the equation:

$$
f(t) = A_0 + \sum [\overbrace{A_ncos\phi_n}^{Constant} sin(nW_0t) + \overbrace{A_nsin\phi_n}^{Constant} cos(nW_0t)]
$$

Merging the constant terms and rewrite the equation and then we have the standard Fourier series expression as below:
$$
f(t) = A_0 + \sum [a_n sin(nW_0t)+b_n cos(nW_0t)]
$$

3.The Derivation of The Coefficients

3.1The Derivation of \(A_0\)

As is known to all, The integral of a trig function over a period is zero. So obtaining the expression of \(A_0\) becomes simple, we just need to integrate both sides of the equal sign:
\[
\int_0^{T_0}f(t)dt = \int_0^{T_0} A_0 dt + \int_0^{T_0} a_n sin(nW_0t)dt + \int_0^{T_0} b_n cos(nW_0t)dt
\\ =2\pi A_0+0+0
\]
$$
A_0 = \frac{1}{2\pi}\int_0^{T_0}f(t)dt
$$

3.2The Derivation of \(a_n, b_n\)

3.2.1The Orthogonality of Trig Functions

Def: If the integral of the product of any two different functions belonging to the trig function system \( [1. cosx, sinx, cos2x, sin2x, …, cosnx, sinnx] \)over a period is equal to zero, then the trig functions are orthogonal.

How to prove it? Firstly, we can write all 5 situations as below:
\[
\int_0^{T_0} 1\times cosnxdx = 0……n=1,2,3,…
\\ \int_0^{T_0} 1\times sinnxdx = 0……n=1,2,3,…
\\ \int_0^{T_0} sinkx\times cosnxdx = 0……k,n=1,2,3,…
\\ \int_0^{T_0} coskx\times cosnxdx = 0……k,n=1,2,3,…k\neq n
\\ \int_0^{T_0} sinkx\times sinnxdx = 0……k,n=1,2,3,…k\neq n
\]

Take the prove of the 4th equation as an example.

Prove:
$$
\int_0^{T_0} coskx\times cosnxdx = 0……k,n=1,2,3,…k\neq n
$$
①Use Trig formula:
$$
coskx\cdot cosnx = \frac{cos(kx-nx)+cos(kx+nx)}{2}
$$
②Integrate both sides of the equal sign:
\[
\int_0^{T_0}coskx\cdot cosnx dx = \frac{1}{2}(\int_0^{T_0}cos(kx-nx)dx+\int_0^{T_0}cos(kx+nx)dx)
\\ =0+0=0
\]

Q.E.D.

3.2.2Solve for the Coefficients

①Multiply both sides of equal sign by \(coskw_0t\)
$$
f(t) cos(kw_0t) = A_0cos(kw_0t) + \sum [a_n sin(nW_0t)+b_n cos(nW_0t)]cos(kw_0t)
$$
②Integrate both sides of the equal sign:
\[
\int_0^{T_0}f(t) cos(kw_0t) dt = \int_0^{T_0}A_0cos(kw_0t)dt
\\ + \sum [a_n \overbrace{\int_0^{T_0}sin(nW_0tcos(kw_0t)dt}^{=0}
\\ +b_n\overbrace{\int_0^{T_0}cos(nW_0t)cos(kw_0t)dt}^{=0}]
\]
③Use the orthogonality of Trig functions:
$$
\int_0^{T_0}f(t) cos(kw_0t) dt = a_n\int_0^{T_0} cos^2(nw_0t) dt
$$
④Use trigonometric formula to simplify the equation:
$$
\int_0^{T_0}f(t) cos(kw_0t) dt = a_n\int_0^{T_0} \frac{1 + cos^2(2nw_0t)}{2} dt=a_n\frac{T}{2}
$$
So, we can give \(a_n\), and \(b_n\) is the same way.

\[
a_n = \frac{2}{T_0} \int_{0}^{T_0} p(t) cos nw_0t dt …… n=1,2,3,…
\\ b_n = \frac{2}{T_0} \int_{0}^{T_0} p(t) sin nw_0t dt …… n=1,2,3,…
\]