Mathematical Transforms and Their Applications
A sine wave is smooth and rounded. A square wave is flat across the top and bottom, with sudden jumps between them. Yet a square wave can be constructed by adding ordinary sine waves with carefully chosen frequencies and amplitudes. This is the central idea of Fourier series, used in electronics, music, heat flow, and vibration.
1. The puzzle: can smooth waves produce sudden jumps?
Consider the periodic square wave
At the jump points, we may define f(k\pi)=0; this matches the value of its Fourier series there. The remarkable representation is
At every continuity point the series equals f(x); at each jump it converges to the midpoint of the one-sided limits, namely zero.
2. What is a Fourier series?
A sufficiently regular 2\pi-periodic function can be represented by
where the coefficients are obtained by integration:
Why does this work? Sines and cosines of different integer frequencies are orthogonal. For example, for positive integers m,n,
Integration therefore isolates one frequency at a time, much as a dot product isolates a component along a perpendicular direction.
3. Deriving the square-wave formula
The square wave is odd: f(-x)=-f(x). Its constant and cosine coefficients vanish, so only sine terms remain. Since f(x)=1 on (0,\pi),
For even n this is zero; for odd n it is 4/(n\pi). Hence
Only odd harmonics appear. Their frequencies are 1,3,5,7,\ldots, and their amplitudes decrease like 1/n.
4. Watch the square wave emerge
The approximation using the first N nonzero harmonics is
With more harmonics, the flat portions become flatter and the transitions sharper. But near each jump, a small oscillatory overshoot persists.
5. The Gibbs phenomenon
Even when many sine waves are added, the Fourier approximation rises above 1 near a jump from -1 to 1. The limiting overshoot is about 8.949% of the jump height:
Thus the peak approaches approximately 1.17898, not 1. The region of oscillation becomes narrower as more terms are added, but its limiting height does not vanish. This is the Gibbs phenomenon. The Fourier series converges pointwise, but not uniformly across a discontinuity.
6. An unexpected infinite series for π
At x=\pi/2, the square wave equals 1. Substituting this value into its Fourier series gives
so we recover the Leibniz series:
We can obtain a second identity from Parseval’s identity. Since f(x)^2=1 almost everywhere,
Using the coefficients already found,
and therefore
7. A second example: the triangle wave
Consider the odd, 2\pi-periodic triangle wave
Its Fourier series is
For the square wave, coefficients decay like 1/n; for the continuous triangle wave, they decay like 1/n^2. The smoother the function, the faster its Fourier coefficients generally decrease. Sharp changes require more high-frequency content.
8. Why does this matter?
Electronic signals
Digital circuits use signals switching between voltage levels. A real circuit has limited bandwidth, so it cannot preserve infinitely many harmonics; sharp transitions become rounded.
Musical instruments
Most musical notes contain a fundamental frequency and higher harmonics. Their relative strengths contribute to an instrument’s characteristic timbre. Square and triangle waves sound different because their harmonic amplitudes differ.
Heat and vibrations
A complicated temperature distribution or vibrating-string shape can be decomposed into simple modes. Each mode evolves according to a simpler equation, and the results are added to reconstruct the solution.
9. Fourier series versus Fourier transforms
Fourier series describe periodic signals through discrete harmonics. Fourier transforms extend frequency decomposition to more general, nonperiodic signals, where frequencies vary continuously. Both approaches reveal hidden structure by expressing a complicated signal in simpler frequency components.
10. Final takeaway
A square wave looks nothing like a sine wave, yet
This formula connects symmetry, orthogonality, convergence, infinite series, sound, and signal processing. A complicated shape can become simple when viewed in the right mathematical representation.
Further reading
- Joseph Fourier, The Analytical Theory of Heat (1822).
- Gilbert Strang, Introduction to Applied Mathematics, Wellesley-Cambridge Press.
- Elias M. Stein and Rami Shakarchi, Fourier Analysis: An Introduction, Princeton University Press.
A Sum of Cosines in Closed Form
Before summing infinitely many waves, it helps to see what a finite sum of cosines looks like. Euler's formula reveals a geometric series hiding inside it.
Continue exploring: A Sum of Cosines Is a Geometric Series—Could You Believe It?
From Fourier Series to the Fourier Transform
A Fourier series breaks a periodic signal, like a square wave, into sine waves with whole-number frequencies. But most real sounds do not repeat exactly. How do we find the frequencies hidden inside them?
The answer is the Fourier transform, which extends the same idea to signals that need not be periodic.
Continue exploring: The Fourier Transform — How Mathematics Decomposes Sound into Frequencies

Leave a Reply