Used for periodic non-sinusoidal waveforms. Suppose the periodic time is T T T f 0 = 2 π / T f_0 = 2\pi / T f 0  = 2 π / T   
f ( t ) = a 0 2 + ∑ n = 1 ∞ [ a n cos  ( f 0 n t ) + b n sin  ( f 0 n t ) ] f(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \big[ a_n \cos\left(f_0 nt\right) + b_n \sin\left(f_0 nt\right) \big]
 f ( t ) = 2 a 0   + n = 1 ∑ ∞  [ a n  cos ( f 0  n t ) + b n  sin ( f 0  n t ) ] Useful trigonometric integrals 
∫ τ τ + T cos  ( f 0 n t )   d t = ∫ τ τ + T sin  ( f 0 n t )   d t = 0 \int_{\tau}^{\tau + T} \cos(f_0 nt)\, \text{d}t =
\int_{\tau}^{\tau + T} \sin(f_0 nt)\, \text{d}t = 0
 ∫ τ τ + T  cos ( f 0  n t ) d t = ∫ τ τ + T  sin ( f 0  n t ) d t = 0 ∫ τ τ + T sin  ( f 0 n t ) cos  ( f 0 m t )   d t = 0 \int_{\tau}^{\tau + T} \sin(f_0 nt) \cos(f_0 mt) \, \text{d}t = 0
 ∫ τ τ + T  sin ( f 0  n t ) cos ( f 0  m t ) d t = 0 ∫ τ τ + T sin  ( f 0 n t ) sin  ( f 0 m t )   d t = { T 2 if  n = m 0 otherwise \int_{\tau}^{\tau + T} \sin(f_0 nt) \sin(f_0 mt) \, \text{d}t = \begin{cases}
\frac{T}{2} & \text{if } n = m \\
0 & \text{otherwise}
\end{cases}
 ∫ τ τ + T  sin ( f 0  n t ) sin ( f 0  m t ) d t = { 2 T  0  if  n = m otherwise  ∫ τ τ + T cos  ( f 0 n t ) cos  ( f 0 m t )   d t = { T 2 if  n = m 0 otherwise \int_{\tau}^{\tau + T} \cos(f_0 nt) \cos(f_0 mt) \, \text{d}t = \begin{cases}
\frac{T}{2} & \text{if } n = m \\
0 & \text{otherwise}
\end{cases}
 ∫ τ τ + T  cos ( f 0  n t ) cos ( f 0  m t ) d t = { 2 T  0  if  n = m otherwise  Unknown coefficients 
∀ n ≥ 0 \forall n \geq 0 ∀ n ≥ 0   
a n = 2 T ∫ τ τ + T f ( t ) cos  ( n f 0 t )   d t a_n = \frac{2}{T} \int_{\tau}^{\tau + T} f(t)\cos(nf_0t) \, \text{d}t
 a n  = T 2  ∫ τ τ + T  f ( t ) cos ( n f 0  t ) d t b n = 2 T ∫ τ τ + T f ( t ) sin  ( n f 0 t )   d t b_n = \frac{2}{T} \int_{\tau}^{\tau + T} f(t)\sin(nf_0t)\, \text{d}t
 b n  = T 2  ∫ τ τ + T  f ( t ) sin ( n f 0  t ) d t a 0 2 \frac{a_0}{2} 2 a 0     
Symmetry 
For any waveform, subtracting the DC offset results in a symmetrical waveform.
Even Symmetry 
When a wave is symmetric about the vertical axis.
f ( t ) = f ( − t ) f(t) = f(-t)
 f ( t ) = f ( − t ) The fourier series of an even waveform contains only cosine terms.
a n = 4 T ∫ τ τ + T / 2 f ( t ) cos  ( n f 0 t )   d t       and       b n = 0 a_n = \frac{4}{T} \int_{\tau}^{\tau + T/2} f(t)\cos(nf_0t) \, \text{d}t
\;\;\text{and}\;\;
b_n = 0
 a n  = T 4  ∫ τ τ + T /2  f ( t ) cos ( n f 0  t ) d t and b n  = 0 Odd Symmetry 
When a wave is symmetric about the origin.
f ( t ) = − f ( − t ) f(t) = -f(-t)
 f ( t ) = − f ( − t ) The fourier series of an odd waveform contains only sine terms.
a n = 0       and       b n = 4 T ∫ τ τ + T / 2 f ( t ) sin  ( n f 0 t )   d t a_n = 0
\;\;\text{and}\;\;
b_n = \frac{4}{T} \int_{\tau}^{\tau + T/2} f(t)\sin(nf_0t) \, \text{d}t
 a n  = 0 and b n  = T 4  ∫ τ τ + T /2  f ( t ) sin ( n f 0  t ) d t Half-Wave Symmetry 
When a wave repeats itself with a reversal of sign after half a period.
f ( t ) = − f ( t + T 2 ) = − f ( t − T 2 ) f(t) = -f(t + \frac{T}{2})
= -f(t - \frac{T}{2})
 f ( t ) = − f ( t + 2 T  ) = − f ( t − 2 T  ) The coefficients can be found by:
a n = { 4 T ∫ τ τ + T / 2 f ( t ) cos  ( n f 0 t )   d t if  n  is odd 0 if  n  is even a_n =
\begin{cases}
\frac{4}{T} \int_{\tau}^{\tau + T/2} f(t)\cos(nf_0t) \, \text{d}t & \text{if } n \text{ is odd} \\
0 & \text{if } n \text{ is even}
\end{cases}
 a n  = { T 4  ∫ τ τ + T /2  f ( t ) cos ( n f 0  t ) d t 0  if  n  is odd if  n  is even  b n = { 4 T ∫ τ τ + T / 2 f ( t ) sin  ( n f 0 t )   d t if  n  is odd 0 if  n  is even b_n =
\begin{cases}
\frac{4}{T} \int_{\tau}^{\tau + T/2} f(t)\sin(nf_0t) \, \text{d}t & \text{if } n \text{ is odd} \\
0 & \text{if } n \text{ is even}
\end{cases}
 b n  = { T 4  ∫ τ τ + T /2  f ( t ) sin ( n f 0  t ) d t 0  if  n  is odd if  n  is even  Half-wave symmetry can co-exist with odd symmetry or even symmetry. In that case:
a n = { 8 T ∫ τ τ + T / 4 f ( t ) cos  ( n f 0 t )   d t if  n  is odd 0 if  n  is even a_n =
\begin{cases}
\frac{8}{T} \int_{\tau}^{\tau + T/4} f(t)\cos(nf_0t) \, \text{d}t & \text{if } n \text{ is odd} \\
0 & \text{if } n \text{ is even}
\end{cases}
 a n  = { T 8  ∫ τ τ + T /4  f ( t ) cos ( n f 0  t ) d t 0  if  n  is odd if  n  is even  b n = { 8 T ∫ τ τ + T / 4 f ( t ) sin  ( n f 0 t )   d t if  n  is odd 0 if  n  is even b_n =
\begin{cases}
\frac{8}{T} \int_{\tau}^{\tau + T/4} f(t)\sin(nf_0t) \, \text{d}t & \text{if } n \text{ is odd} \\
0 & \text{if } n \text{ is even}
\end{cases}
 b n  = { T 8  ∫ τ τ + T /4  f ( t ) sin ( n f 0  t ) d t 0  if  n  is odd if  n  is even  Frequency spectrum 
Plot of harmonic number vs frequency.
Harmonic number 
n n n n n n h n h_n h n  
∣ h n ∣ = a n 2 + b n 2       and       phase angle = tan  − 1 ( b n a n ) |h_n| = \sqrt{a_n^2 + b_n^2}
\;\;\text{and}\;\;
\text{phase angle} = \tan^{-1}\left(\frac{b_n}{a_n}\right)
 ∣ h n  ∣ = a n 2  + b n 2   and phase angle = tan − 1 ( a n  b n   ) RMS 
y rms 2 = a 0 2 + ∑ i = 0 ∞ [ a i , rms 2 + b i , rms 2 ] y_{\text{rms}}^2 = a_0^2 + \sum_{i=0}^\infty \Big[ a_{i,\text{rms}}^2 + b_{i,\text{rms}}^2 \Big]
 y rms 2  = a 0 2  + i = 0 ∑ ∞  [ a i , rms 2  + b i , rms 2  ] Total Harmonic Distortion 
A measurement of the distortion present in the waveform compared to the original waveform.
y THD = 1 h 1 ∑ i = 2 ∞ h i 2 y_{\text{THD}} = \frac{1}{h_1} \sqrt{\sum_{i=2}^\infty h_i^2} 
 y THD  = h 1  1  i = 2 ∑ ∞  h i 2   Here h i h_i h i  i i i 
f ( t ) = ∑ n = − ∞ ∞ C n e j n f 0 t f(t) =\sum_{n=-\infty}^{\infty} C_n e^{jnf_0t}
 f ( t ) = n = − ∞ ∑ ∞  C n  e jn f 0  t Here C n C_n C n    
C n = A n − j B n 2 = 1 T ∫ τ τ + T f ( t ) e − j n f 0 t   d t C_n = \frac{A_n - jB_n}{2} =\frac{1}{T} \int_{\tau}^{\tau + T} f(t)e^{-jnf_0 t}\,\text{d}t
 C n  = 2 A n  − j B n   = T 1  ∫ τ τ + T  f ( t ) e − jn f 0  t d t