Differential Equations · Undergraduate
Fourier Series: Functions as Sums of Sines and Cosines
Quick answer
A Fourier series writes a function on −π < x < π, repeated with period 2π, as a sum of sines and cosines. The coefficients come from integrals: aₙ = (1/π)∫ f(x) cos nx dx and bₙ = (1/π)∫ f(x) sin nx dx. They work because different sines and cosines are orthogonal, so their products integrate to zero. Odd functions need only sines and even functions only cosines. The square wave becomes (4/π)(sin x + sin 3x/3 + sin 5x/5 + ⋯), and at a jump the series converges to the midpoint.
What you'll learn
- Compute Fourier coefficients on (−π, π)
- Use symmetry to skip the sine or cosine terms
- Explain the coefficient formulas with orthogonality
- Find the value a Fourier series converges to at a jump
Building waves from sines and cosines
Musical notes, heat flow and signals are all built from waves. A Fourier series writes a function on , repeated with period , as
with coefficients
Symmetry saves work. If is odd, every ; if is even, every .
Why the coefficient formulas work
Over a full period, the basic waves are orthogonal: for whole numbers and ,
and the same for cosines. Multiply the series by and integrate. Every term dies except , which integrates to . Dividing by gives the formula. It is the same idea as finding a vector’s coordinates in an orthogonal basis with dot products, in an infinite-dimensional space of functions.
Worked examples
- one term
- three terms
Common mistakes
Practice problems
-
For , find , and .
Answer
, ,
Full solution
.
-
Which coefficients of are zero?
Answer
All the
Full solution
is even, so its series has only cosines.
-
For the square wave, find and .
Answer
and
Full solution
, which is for even .
-
For , find the constant term .
Answer
Full solution
, and the average value of is .
-
What is the Fourier series of ?
Answer
Itself: , , all others
Full solution
A finite sum of the basic waves is already a Fourier series, and the coefficients are unique.
-
To what value does the square wave series converge at ?
Answer
Full solution
Every , matching the midpoint of the jump from to .
-
The series of on is . Set to find .
Answer
Full solution
, so , and .
-
A student computes for and writes the constant term as . What went wrong?
Answer
The constant term is .
Full solution
The constant term must equal the average value of over , which is .
Frequently asked questions
What is a Fourier series?
A representation f(x) = a₀/2 + Σ (aₙ cos nx + bₙ sin nx) of a 2π-periodic function as a sum of sines and cosines.
How are the coefficients found?
aₙ = (1/π)∫ f(x) cos nx dx and bₙ = (1/π)∫ f(x) sin nx dx, both over −π to π. The constant term a₀/2 is the average value of f.
Why do the formulas work?
Over a full period, sin mx cos nx always integrates to 0, and sin mx sin nx and cos mx cos nx integrate to 0 unless m = n. Multiplying by one term and integrating keeps only that term's coefficient.
What happens at a jump?
The series converges to the midpoint of the jump, the average of the left and right limits.
What does symmetry tell you?
An odd function has only sine terms (all aₙ = 0). An even function has only cosine terms (all bₙ = 0).