How to write a periodic function as a sum of sines and cosines, compute its Fourier coefficients for any period, use symmetry to save work and read the coefficients as a spectrum.
A chord played on a piano is one wave, yet your ear hears separate notes inside it. Fourier series do the same thing with any periodic function. They split it into a constant plus harmonics, and the orthogonality of sines and cosines tells you exactly how much of each harmonic is present.
Key terms
Fourier series
Definition Let f be periodic with period 2π and integrable on [−π,π]. The Fourier series of f is the trigonometric series
f(x)∼2a0+n=1∑∞(ancos(nx)+bnsin(nx)),
with the coefficients an and bn defined below. The symbol ∼ means the series is attached to f. Whether and where it converges to f(x) is a separate question.
In plain words It is a recipe for rebuilding f from a constant and the harmonics cos(nx) and sin(nx), each with its own weight.
Example The square wave equal to −1 on (−π,0) and 1 on (0,π), repeated with period 2π, has Fourier series
π4(sinx+3sin(3x)+5sin(5x)+⋯).
The coefficients are computed in the next section.
Sine and cosine coefficients
Definition The Fourier coefficients of a 2π-periodic f that is integrable on [−π,π] are
These formulas come from orthogonality. If f equaled a uniformly convergent trigonometric series, multiplying by cos(mx) and integrating term by term would kill every term except the one with am, leaving
∫−ππf(x)cos(mx)dx=πam
for m≥1, and 2π times the constant term for m=0.
In plain words To find how much of cos(nx) is in f, take the inner product of f with cos(nx) and divide by π. Same for sine.
Example For the square wave every an is 0, because f(x)cos(nx) is odd. For bn,
Definition The Nth partial sum of the Fourier series of a 2π-periodic f is the trigonometric polynomial
SN(x)=2a0+n=1∑N(ancos(nx)+bnsin(nx)).
The series converges at x when SN(x) has a limit as N→∞.
In plain words Keep the first N harmonics and drop the rest. Watching SN as N grows shows the series building up the function.
Example For the square wave at x=2π, where f=1, the odd sines alternate in sign.
N
SN(π/2)
1
1.2732
3
0.8488
5
1.1035
7
0.9216
The values swing above and below 1 and close in on it.
Spectral interpretation
Definition For n≥1 the amplitude of the nth harmonic is An=an2+bn2, and for a suitable phase φn
ancos(nx)+bnsin(nx)=Ancos(nx−φn).
The sequence (An) is the amplitude spectrum of f. For f that is piecewise continuous on [−π,π], Parseval’s identity holds,
π1∫−ππf(x)2dx=2a02+n=1∑∞(an2+bn2).
In plain words The coefficients say how strongly each frequency is present. Parseval says the total energy of f is the sum of the energies of its harmonics.
Example The square wave has An=nπ4 for odd n and 0 for even n, so only odd harmonics are present and they fade like n1. Since f2=1, Parseval gives
2=π216(1+91+251+⋯),so1+321+521+⋯=8π2.
Check yourself
Find the Fourier series of f(x)=∣x∣ on [−π,π], extended with period 2π.
Show the answer
The function is even, so bn=0. The cosine coefficients are
a0=π2∫0πxdx=π
and, for n≥1,
an=π2∫0πxcos(nx)dx=πn22((−1)n−1),
which is −πn24 for odd n and 0 for even n. So
∣x∣∼2π−π4(cosx+9cos(3x)+25cos(5x)+⋯).
A function with period 4 equals 0 on (−2,0) and 1 on (0,2). What is the constant term of its Fourier series?
Show the answer
The constant term is the average over one period,
2a0=41∫−22f(x)dx=42=21.
Which coefficients of an odd 2π-periodic function must be zero, and why?
Show the answer
All an, including a0. The product f(x)cos(nx) is odd, so its integral over [−π,π] is 0.
May we count page visits to understand which courses and learning features are useful? Cloudflare collects visit and performance statistics, without your account details or answers. Your choice does not affect access. Details