Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 26

Fourier Series Representation and Coefficient Calculation

Recommended resources

Hello! Welcome back to our course on Mathematical Methods for Physics.

In our last lesson, we developed a robust toolkit for solving first and second-order linear ODEs with constant coefficients. This allowed us to analyze physical systems like damped oscillators. We saw that for simple sinusoidal forcing functions, the method of undetermined coefficients works well. But what happens when the driving force is periodic but more complex, like the square-wave voltage from a function generator or the periodic impacts on a mechanical system?

This lesson introduces the powerful technique of Fourier series, which directly addresses this challenge. Our learning outcome is to: Represent periodic functions using Fourier series and calculate their coefficients. You will learn that almost any periodic function, no matter how complex its shape, can be decomposed into a sum of simple sine and cosine waves. This insight, originally developed by Joseph Fourier to solve problems of heat conduction, is one of the most fundamental concepts in physics and engineering.

1. The Big Idea: Building Functions from Waves

Imagine you have a complex musical sound. We know that this sound can be broken down into a fundamental frequency and a series of overtones, or harmonics. A Fourier series applies this same idea to mathematical functions.

Any "well-behaved" periodic function with a period can be written as an infinite sum of sines and cosines:

Let's break down this formula:

  • : This is the DC offset or the average value of the function over one period. The factor of 1/2 is a convention that simplifies the general formula for the coefficients.
  • The : This is the sum of all the harmonics.
  • term: This is the fundamental frequency, with a period of .
  • terms: These are the harmonics or overtones, with frequencies that are integer multiples of the fundamental.
  • : These are the Fourier coefficients. They determine the amplitude of each cosine and sine wave required to reconstruct the original function .
Fourier Series Synthesis
This image illustrates the decomposition of a periodic function f(t) into its average (DC) part, its even part (cosines), and its odd part (sines). Notice the use of angular frequency \(\omega_0 = 2\pi/T\), which is equivalent to \(\pi/L\) in our notation.

The crucial task is to find a way to calculate these coefficients for any given function .


2. The Key: Orthogonality

To isolate each coefficient, we exploit a remarkable property of sine and cosine functions called orthogonality. In linear algebra, two vectors are orthogonal if their dot product is zero. We can define a similar concept for functions, where the "dot product" is an integral of their product over a specific interval.

For the trigonometric functions in our series, it turns out that the integral of the product of any two different functions over one period () is zero. For example:

This property is what allows us to "filter out" and measure each coefficient one by one.


3. Deriving the Fourier Coefficients (Euler Formulas)

The derivation of the formulas for the coefficients is a beautiful application of these orthogonality relations. Since you appreciate mathematical rigor, the following video provides a complete, step-by-step derivation.

Oxford Calculus: Fourier Series Derivation

This video from 'Tom Rocks Maths' provides a clear and rigorous derivation of the Fourier series coefficients, starting from first principles. It begins by establishing the orthogonality relations and then uses them to isolate each coefficient.

Please watch the video from the beginning to 37:50. Focus on: (0:00 - 19:11) How the orthogonality integrals are set up and evaluated. Understand why the result is zero in most cases. (19:11 - 37:50) How multiplying the entire Fourier series by a specific sine or cosine and then integrating over the period allows you to solve for a single coefficient, thanks to the orthogonality relations.

After watching the derivation, the results are a set of three integral formulas, known as the Euler formulas, for the Fourier coefficients of a function with period :

The Euler Formulas

(This is twice the average value of the function over one period.)

(This measures the "amount" of in .)

(This measures the "amount" of in .)

These formulas are the core machinery of Fourier analysis. Given any periodic function , you can, in principle, compute its Fourier series representation by evaluating these integrals.

A quick note on convergence: The video briefly mentions the concept of uniform convergence, which is the formal justification for swapping the order of summation and integration in the derivation. For most physically relevant functions (which are piecewise continuous), the Fourier series converges to the function at all points where is continuous. At a point of discontinuity (a jump), the series converges to the midpoint of the jump.


4. Simplifications: Even and Odd Functions

Calculating all those integrals can be tedious. However, we can often use symmetry to simplify the work. This is a common strategy in physics.

Periodic functions, representation by Fourier series, ...

This document from the HELM project provides a concise explanation of how function symmetry simplifies Fourier series calculations.

Please read Section 23.3, 'Even and Odd Functions' (pages 30-36). Focus on: The definitions of even and odd functions. The properties of their products (e.g., odd × odd = even). How these properties lead to simplified formulas for the Fourier coefficients.

As you've just read, the key takeaways are:

  • Even Functions: If is even (), its graph is symmetric about the y-axis. Its Fourier series will contain only cosine terms (and possibly the constant term). All coefficients are zero.
  • Odd Functions: If is odd (), its graph has rotational symmetry about the origin. Its Fourier series will contain only sine terms. All coefficients (including ) are zero.

Recognizing the symmetry of a function before you start integrating can save you half the work!

Test your understanding!

Consider a sawtooth wave defined by on the interval , with period .

  1. Is this function even, odd, or neither?
  2. Based on your answer, which set of Fourier coefficients ( or ) will be zero?
  3. Will the series have a constant term ?
Show answer
  1. The function is odd because .
  2. Since the function is odd, all the coefficients will be zero. The Fourier series will be a pure sine series.
  3. No, will also be zero because the integral of an odd function over a symmetric interval is zero.

An Application: The Square Wave and Gibbs Phenomenon

Let's apply this to a classic example: a square wave. Consider an even square wave with period () defined as:

Since this is an even function, we know . We only need to calculate .
.

Using the simplified formula for even functions:



This results in for even , and alternating values for odd . The final series is:

If we plot the partial sums of this series, we see it approximates the square wave, but with a peculiar overshoot at the discontinuities. This is called the Gibbs phenomenon.

Fourier Series for Periodic Functions and Gibbs Phenomenon
A visual representation of a Fourier series partial sum (with N=19 terms) approximating a square wave. The red circles highlight the overshoot at the points of discontinuity, a persistent feature known as the Gibbs phenomenon.

Conclusion

Today we've unlocked a method for deconstructing complex periodic functions into simple, manageable building blocks. This is a cornerstone of mathematical physics.

Key Takeaways:

  • A periodic function with period can be represented by a Fourier series, an infinite sum of cosine and sine terms.
  • The coefficients and are determined by the Euler formulas, which are derived using the orthogonality of sine and cosine functions over the interval .
  • If a function is even, its Fourier series contains only cosine terms. If it is odd, it contains only sine terms. This symmetry can significantly simplify calculations.
  • The Fourier series approximation of a function with a jump discontinuity exhibits an overshoot known as the Gibbs phenomenon.

Preview of the Next Lesson:
We've spent the last two lessons focused on functions of a single variable (often time). Now, we will shift our focus to functions декораof multiple spatial variables, known as fields. In the next lesson, we will begin our study of vector calculus by defining three fundamental differential operators: the gradient, divergence, and curl. These operators are the language of field theories like electromagnetism and fluid dynamics, and they will be essential tools for the rest of our journey.