Fourier Series (Enhanced)
1.1. Introduction
In engineering, systems are frequently subjected to time-varying periodic forces.
- Static vs. Dynamic Systems:
- Static Systems: Remain under constant forces and do not change over time (e.g., a highway bridge at rest).
- Dynamic Systems: Vary over time or vibrate (e.g., an RLC circuit oscillating, or a bridge vibrating as a heavy vehicle crosses).
- Core Goal of Fourier Series: To decompose a periodic, non-sinusoidal signal into a linear combination of sines and cosines, enabling frequency-domain analysis.
1.2. Mathematical Definition
For a periodic function with period , the Fourier Series is defined as:
1.2.1. Periodicity
A function is periodic if there exists a positive constant (period or wavelength) such that:
left = -6; right = 6;
top = 2; bottom = -2;
grid = true
---
f(x) = \sin(\frac{\pi x}{2}) + 0.3\cos(\pi x)
f(x) | BLUE | SOLID
(0, 0.3) | open | RED | label:f(x)
(4, 0.3) | open | RED | label:f(x + 2l)
(2, -0.3) | open | BLACK | label:Period T = 2l = 4Figure 1: A periodic wave demonstrating with period ().
1.2.2. Orthogonality & Orthonormality
We treat signals as infinite-dimensional vectors. The inner product of two continuous functions and over the interval is:
| Concept | Mathematical Definition | Physical Meaning |
|---|---|---|
| Orthogonality | Functions share no overlapping frequency information | |
| Orthonormality | The function is orthogonal and normalized to have unit energy |
Terminology Check: Orthogonality & Orthonormality
- Orthogonality: Perpendicularity or mathematical independence between functions, meaning their product integrates to zero over a period (zero overlap of frequency information).
- Orthonormality: A set of functions that are all mutually orthogonal and each normalized to have a total signal energy (magnitude) of exactly 1.
The set of functions forms an orthogonal basis over . This is established by the following integral identities (for all integers ):
Proof of Orthogonality (Equation 4 for and )
Using the product-to-sum identity :
- Case : Both terms are cosine waves integrated over full integer periods, evaluating to .
- Case : The second term becomes , yielding:
left = -\pi; right = \pi;
top = 1.2; bottom = -1.2;
grid = true
---
f(x) = \sin(x)\cos(2x)
f(x) | PURPLE | SOLIDFigure 2: Visualizing Orthogonality. The product shows perfect odd symmetry over , meaning its integral cancels out to exactly 0.
1.2.3. Dirichlet Conditions for Convergence
A function defined on can be represented as a Fourier series if it satisfies the Dirichlet Conditions:
- Absolute Integrability: (finite total absolute area).
- Finite Extrema: It has a finite number of local maxima and minima within any single period.
- Finite Discontinuities: It has a finite number of discontinuities (piecewise continuous) in any single period.
Dirichlet Conditions: The mathematical criteria (absolute integrability, finite extrema, and finite discontinuities) that guarantee a function has a convergent Fourier series.
1.3. Derivation of Euler-Fourier Coefficients
The constants are the Euler-Fourier Coefficients.
| Coefficient | Formula | Physical Interpretation |
|---|---|---|
| a_{0} = \frac{1}{l}\int_{-l}^{l}f(x) \, dx \tag{5} | Double the DC component (average value) | |
| a_{n} = \frac{1}{l}\int_{-l}^{l}f(x)\cos\left(\frac{n\pi}{l}x\right) \, dx \tag{6} | Amplitude of the cosine harmonics | |
| b_{n} = \frac{1}{l}\int_{-l}^{l}f(x)\sin\left(\frac{n\pi}{l}x\right) \, dx \tag{7} | Amplitude of the sine harmonics |
Proof: Deriving Euler-Fourier Coefficients ( )
- Deriving : Integrate both sides of Equation 1 from to : By orthogonality, sines and cosines integrate to 0 over :
- Deriving : Multiply Equation 1 by and integrate: By orthogonality, only the term where survives, yielding :
- Deriving : Multiply Equation 1 by , integrate, and isolate :
1.4. Worked Examples
Example 1: Continuous Triangular Wave
Find the Fourier Series for the periodic triangular wave:
Click to Expand: Step-by-Step Derivation for Example 1
- Calculate :
- Calculate : Apply Integration by Parts () where , : Using the identities , , and :
- Calculate :
Fourier Series:
left = -6; right = 6;
top = 4; bottom = -1;
grid = true
---
f(x) = |x - 6 \cdot \operatorname{round}(x/6)|
S_1(x) = 1.5 - \frac{12}{\pi^2} \cos(\frac{\pi x}{3})
S_3(x) = S_1(x) - \frac{12}{9\pi^2} \cos(\pi x)
S_5(x) = S_3(x) - \frac{12}{25\pi^2} \cos(\frac{5\pi x}{3})
f(x) | BLACK | SOLID
S_1(x) | RED | DASHED
S_3(x) | GREEN | DASHED
S_5(x) | BLUE | SOLIDFigure 3: Periodic triangular wave () with Fourier approximations , , and .
Example 2: Piecewise Discontinuous Function
Find the Fourier Series for:
Click to Expand: Step-by-Step Derivation for Example 2
- Calculate :
- Calculate : The second integral evaluates to . Applying parts to the first integral:
- Calculate :
- Second Integral:
- First Integral:
- Total :
Fourier Series:
left = -2; right = 2;
top = 2; bottom = -1;
grid = true
---
p(x) = x - 2 \cdot \operatorname{floor}(\frac{x+1}{2})
f(x) = \{p(x) < 0: p(x) + 1, 1\}
S_1(x) = 0.75 + \frac{2\cos(\pi x)}{\pi^2} + \frac{\sin(\pi x)}{\pi}
S_3(x) = S_1(x) + \frac{2\cos(3\pi x)}{9\pi^2} - \frac{\sin(2\pi x)}{2\pi} + \frac{\sin(3\pi x)}{3\pi}
S_7(x) = S_3(x) + \frac{2\cos(5\pi x)}{25\pi^2} - \frac{\sin(4\pi x)}{4\pi} + \frac{\sin(5\pi x)}{5\pi} - \frac{\sin(6\pi x)}{6\pi} + \frac{\sin(7\pi x)}{7\pi}
f(x) | BLACK | SOLID
S_1(x) | RED | DASHED
S_3(x) | GREEN | DASHED
S_7(x) | BLUE | SOLIDFigure 4: Reconstructing the piecewise signal. Ringing oscillations occur around discontinuities at .
left = 0.7; right = 1.3;
top = 1.3; bottom = -0.3;
grid = true
---
p(x) = x - 2 \cdot \operatorname{floor}(\frac{x+1}{2})
f(x) = \{p(x) < 0: p(x) + 1, 1\}
S_{20}(x) = 0.75 + \sum_{n=1}^{20} (\frac{2\cos((2n-1)\pi x)}{(2n-1)^2 \pi^2} + \frac{(-1)^{n+1}\sin(n\pi x)}{n\pi})
f(x) | BLACK | SOLID
S_{20}(x) | BLUE | SOLID
(0.95, 1.09) | cross | RED | label:Overshoot (~9%)Figure 5: Detailed view of the Gibbs Phenomenon at . The overshoot height remains constant at of the jump size, compressing in width as harmonic order increases.
Gibbs Phenomenon: The ringing or overshoot behavior that occurs in Fourier series reconstructions near sharp jump discontinuities.
1.5. Symmetry Analysis: Even & Odd Functions
Using symmetry properties saves significant calculation time by instantly setting certain coefficients to zero.
- Even Functions: Symmetric across the y-axis, satisfying .
- Odd Functions: Symmetric about the origin, satisfying .
left = -3; right = 3;
top = 5; bottom = -5;
grid = true
---
E(x) = x^2
O(x) = 0.2x^3
E(x) | GREEN | SOLID | label:Even (y-axis symmetry)
O(x) | ORANGE | SOLID | label:Odd (origin symmetry)Figure 6: Comparison of even parity () and odd parity ().
Function Parity Rules
| Operation | Result | Mathematical Example |
|---|---|---|
| Even | ||
| Even | ||
| Odd |
Symmetric Limits of Integration
Over a symmetric interval , the integration rules simplify:
- Odd Functions: (positive and negative areas cancel out)
- Even Functions: (integral of right half doubled)
Simplified Coefficients
- If is Even:
- If is Odd:
1.6. Half-Range Expansions
When a function is defined only on the half-domain , it can be expanded into either a pure cosine or pure sine series by artificially extending the domain. These are called half-range expansions:
| Extension Type | Domain Extension () | Coefficients | Resulting Fourier Series |
|---|---|---|---|
| Cosine Expansion | Even Extension: | () | Cosine terms only (Equation 10) |
| Sine Expansion | Odd Extension: | () | Sine terms only (Equation 11) |
Half-Range Expansions: Representing a function defined only on a half-interval by extending it to as either an even or odd periodic function.
Example 3: Cosine and Sine Half-Range Extensions
Given the function:
1. Cosine Expansion (Even Extension)
Extend symmetrically about the y-axis to .
Click to Expand: Cosine Extension Derivation
- Calculate :
- Calculate :
Fourier Series:
left = -4; right = 4;
top = 1.5; bottom = -0.5;
grid = true
---
p(x) = |x - 4 \cdot \operatorname{round}(x/4)|
f(x) = \{p(x) < 1: 1, 0\}
S_5(x) = 0.5 + \sum_{n=1}^{5} (\frac{2\cos(0.5(4n-3)\pi x)}{(4n-3)\pi} - \frac{2\cos(0.5(4n-1)\pi x)}{(4n-1)\pi})
f(x) | BLACK | SOLID
S_5(x) | BLUE | SOLIDFigure 7: Cosine half-range expansion (even periodic extension of the pulse) with its 5-term Fourier approximation.
2. Sine Expansion (Odd Extension)
Extend anti-symmetrically about the origin to .
Click to Expand: Sine Extension Derivation
.
Calculate :
Evaluating cases:
- If is odd (): .
- If is even but not divisible by 4 (): .
- If is a multiple of 4 (): .
Fourier Series:
left = -4; right = 4;
top = 1.5; bottom = -1.5;
grid = true
---
q(x) = x - 4 \cdot \operatorname{round}(x/4)
f(x) = \{0 < q(x) < 1: 1, -1 < q(x) < 0: -1, 0\}
S_5(x) = \frac{2}{\pi} \sum_{n=1}^{5} \frac{\sin(0.5(2n-1)\pi x) + \sin((2n-1)\pi x)}{2n-1}
f(x) | BLACK | SOLID
S_5(x) | RED | SOLIDFigure 8: Sine half-range expansion (odd periodic extension of the pulse) with its 5-term Fourier approximation.
1.7. Engineering Interpretation & Signal Power
From an engineering perspective, Fourier Series decomposes a signal into:
- DC component (): The constant baseline offset of the signal.
- AC component (Summation): The time-varying part at integer harmonics of the fundamental frequency .
Power Spectrum
If is a voltage signal, the power dissipated in a resistor is proportional to . The power of individual harmonics is given by:
- Amplitude of -th harmonic:
- Power contribution of -th harmonic:
1.8. Error, Convergence, & Parseval’s Theorem
To analyze reconstruction quality, we define:
- -th Partial Sum:
- Mean Square Error (MSE):
Deriving the Mean Square Error Formula (Equation 17)
Expanding the squared term in Equation 16:
Step 1: Expand the Squared Term
First, we expand the binomial inside the integral using the standard algebraic identity :
Substituting this back into the MSE formula splits the integral into three distinct parts:
Step 2: Evaluate the Middle Integral (The Cross-Term)
To evaluate the middle term , we substitute the full expression for and distribute :
Notice that the bracketed integrals are the exact definitions of the Euler-Fourier coefficients:
When we substitute these coefficients back into our expression, we get:
Because the original middle term had a negative sign in front, this entire component becomes:
Step 3: Evaluate the Third Integral (The Squared Partial Sum)
Next, we evaluate . When you square a large polynomial like , you get many squared terms and many cross-product terms (e.g., , constant , etc.).
Because trigonometric functions are orthogonal on the interval , all cross-product integrals evaluate to zero:
(for )
(for )
Only the squared terms survive the integration, and their definite integrals over all equal (except for the constant term):
Summing these surviving terms gives:
Multiplying by the outside factor , we get:
Step 4: Combine All Terms (Equation 17)
Now we combine the results from our three integrals:
Notice that the second term is times the bracketed quantity, and the third term is times the exact same bracketed quantity. Adding them together gives times the bracket:
Finally, distributing the inside the brackets yields Equation 17:
Why This Result Matters
Since the Mean Square Error must always be non-negative (), this equation proves that as you add more harmonics (), the energy of the Fourier coefficients is strictly bounded by the total energy of the function. This is known as Bessel’s Inequality, which eventually turns into Parseval’s Identity when the error drops to zero!
Bessel’s Inequality & Parseval’s Identity
Because , Equation 17 establishes Bessel’s Inequality:
As , the mean square error converges to (), turning the inequality into Parseval’s Identity:
Physical Meaning: The total average power of a periodic signal is equal to the sum of the power contributions of its DC component and all its AC harmonics. Power is conserved when moving from the time domain (right) to the frequency domain (left).
physical interpretation
The Big Picture: Conservation of Signal Power
At its core, this entire concept is the mathematical proof of the Conservation of Power (and Energy). It guarantees that a signal’s total physical energy remains identical whether you observe it moving through time or break it down into a spectrum of individual frequencies.
1. Bessel’s Inequality (The Partial Approximation)
The Core Concept: If you try to reconstruct a waveform using only a finite number of frequency building blocks (harmonics), your approximation will always be incomplete.
Physical Interpretation: The total power of your partial approximation is always less than or equal to the true power of the actual signal. Because you left out some high-frequency ripples, you haven’t captured 100% of the signal’s energy yet.
2. Parseval’s Identity (The Complete Picture)
The Core Concept: When you include all infinite harmonics (), the approximation error drops to zero, and the inequality becomes an exact equality.
Physical Interpretation: The total average power measured in the time domain (the area under the squared voltage/current waveform) is exactly equal to the power measured in the frequency domain (the sum of the DC power plus the power of every individual AC harmonic).
Practical & Engineering Significance
Two Lenses, Same Reality: Imagine measuring an electrical signal with an oscilloscope (which views voltage over time) versus a spectrum analyzer (which views power across frequencies). Parseval’s Identity proves that both instruments are measuring the exact same total physical energy—just from two different analytical perspectives.
Simplified Calculation: In signal processing, calculating total power by integrating a complex, jagged waveform over time can be mathematically difficult. Parseval’s Identity allows you to bypass the time-domain integral entirely: you can find the exact total power simply by squaring and adding the amplitudes of the signal’s frequency components.