ExamJuanReview. Prepare. Pass.

Engineering Mathematics · Lesson 18 of 28

Fourier Series and Harmonic Analysis

Build a Fourier series from a0, an, and bn over one period, use even and odd symmetry to drop half the work, handle half-range expansions and harmonics, and read the value a series takes at a jump, with the square wave and sawtooth carried to numbers.

15 min read · Super EaFree lesson

A Fourier series rebuilds a periodic signal as a sum of sines and cosines, and the CELE tests whether you can weigh those waves and read the series back. The whole method reduces to three integrals for the coefficients a0, an, and bn, plus a set of symmetry shortcuts that let you skip half of them. This lesson sets up the coefficient formulas, shows how even and odd symmetry collapse the work, computes the classic square wave and sawtooth all the way to numbers with units, then closes with half-range expansions, the language of harmonics, and the one convergence fact the board loves to probe: what the series does at a jump.

Periodic functions and the Fourier idea

A function f is periodic with period T when f(x + T) = f(x) for every x, and the smallest positive T for which this holds is the fundamental period. A pure sine sin(x) has fundamental period 2 pi, a constant has no smallest period, and a square wave repeats block by block.

Fourier's theorem says that any piecewise-smooth periodic function of period T = 2L can be written as a constant plus a sum of sines and cosines whose frequencies are whole-number multiples of one base frequency:

f(x) = a0/2 + sum from n = 1 to infinity of [ an cos(n pi x/L) + bn sin(n pi x/L) ].

Each cosine and sine in that sum is a harmonic. The n = 1 pair is the fundamental, and every later term oscillates an integer number of times faster. The coefficients an and bn say how much of each harmonic the signal carries, and the constant a0/2 sets the average level the whole waveform rides on.

The Fourier coefficients a0, an, bn

The coefficients come from integrating f against each basis wave over one full period. On the symmetric interval [-L, L] of length T = 2L:

Coefficient Formula over one period on [-L, L]
a0 (1/L) integral from -L to L of f(x) dx
an (1/L) integral from -L to L of f(x) cos(n pi x/L) dx
bn (1/L) integral from -L to L of f(x) sin(n pi x/L) dx

The reason these formulas isolate one coefficient at a time is orthogonality: over a period, cos(m pi x/L) and cos(n pi x/L) integrate to zero unless m = n, and every cosine is orthogonal to every sine, so multiplying by one basis wave and integrating picks out exactly its weight.

One term deserves special attention. The constant is written as a0/2, and since a0 = (1/L) integral from -L to L of f dx, the constant equals a0/2 = (1/2L) integral over one period of f dx, which is precisely the mean, or DC, value of the signal. If a waveform sits on a nonzero baseline, that baseline shows up entirely in a0/2.

Worked example: A periodic voltage equals 8 V for the first half of each period and 0 V for the second half. Its DC term is a0/2 = (1/2L) integral over one period = the time average = (8 V)(T/2)/T + (0 V)(T/2)/T = 4 V + 0 V = 4 V. So a0 = 8 V and the constant term of the series is 4 V, the level the ripple oscillates around.

Even and odd symmetry (cosine and sine series)

Before integrating anything, check the symmetry of f, because it can kill half the coefficients for free. Recall that an even function satisfies f(-x) = f(x) and its graph is mirror-symmetric across the vertical axis, while an odd function satisfies f(-x) = -f(x) and has 180-degree rotational symmetry about the origin. Two facts drive the shortcut: the integral of an odd function over a symmetric interval [-L, L] is zero, and the product of an even and an odd function is odd.

Even symmetry gives a cosine series, odd symmetry gives a sine series Even f(-x) = f(x), cosines only Odd f(-x) = -f(x), sines only
An even function is a sum of a constant and cosines only, so all bn = 0. An odd function is a sum of sines only, so a0 = 0 and all an = 0. Spotting the symmetry first is the cheapest way to halve the algebra.
Symmetry Condition Series contains Coefficients that vanish
Even f(-x) = f(x) constant + cosines all bn
Odd f(-x) = -f(x) sines only a0 and all an
Neither general f constant + cosines + sines none forced to zero

When f is even you may also fold the integral, an = (2/L) integral from 0 to L of f(x) cos(n pi x/L) dx, and when f is odd, bn = (2/L) integral from 0 to L of f(x) sin(n pi x/L) dx. Both use only the right half of the period, which is often the half you can integrate cleanly.

Worked example: the square wave

Take the odd square wave that equals +10 V on 0 < t < 1 s and -10 V on -1 < t < 0 s, with period T = 2 s, so L = 1. Because it is odd, a0 = 0 and every an = 0, and only the sine coefficients survive.

An odd square wave of amplitude A and period T +A -A one period T t
The square wave holds at +A, jumps to -A after half a period, and repeats. It is odd about t = 0, so its Fourier series is a pure sine series and its constant term is zero.

Worked example: Using bn = (1/L) integral from -L to L of f sin(n pi t/L) dt with L = 1, the integrand is even (an odd f times an odd sine), so fold to bn = 2 integral from 0 to 1 of (10) sin(n pi t) dt = 20 [ -cos(n pi t)/(n pi) ] from 0 to 1 = (20/(n pi))(1 - cos(n pi)) = (20/(n pi))(1 - (-1)^n) V. For n = 1 this is (20/pi)(1 - (-1)) = 40/pi = 12.73 V; for n = 2 it is (20/(2 pi))(1 - 1) = 0 V; for n = 3 it is (20/(3 pi))(2) = 40/(3 pi) = 4.24 V. The pattern is that even harmonics vanish and odd ones fall off as 1/n:

Harmonic n Frequency n f0 (Hz) bn (V)
1 0.5 12.73
2 1.0 0
3 1.5 4.24
4 2.0 0
5 2.5 2.55

So v(t) = (40/pi) [ sin(pi t) + (1/3) sin(3 pi t) + (1/5) sin(5 pi t) + ... ] V, a fundamental at 12.73 V plus shrinking odd overtones.

Worked example: the sawtooth wave

Now take the sawtooth ramp v(t) = 10t V on -1 < t < 1 s, repeated with period T = 2 s, so L = 1. It ramps from -10 V up to +10 V, snaps back, and repeats. Like the square wave it is odd, so a0 = 0 and all an = 0, and only bn remains.

Worked example: With the integrand 10t sin(n pi t) even, bn = 2 integral from 0 to 1 of 10t sin(n pi t) dt = 20 integral from 0 to 1 of t sin(n pi t) dt. Integrating by parts, integral of t sin(n pi t) dt = -t cos(n pi t)/(n pi) + sin(n pi t)/(n pi)^2, which from 0 to 1 gives -cos(n pi)/(n pi) + 0 = -(-1)^n/(n pi). Therefore bn = 20 times (-(-1)^n/(n pi)) = 20(-1)^(n+1)/(n pi) V. For n = 1 this is 20/pi = 6.37 V; for n = 2 it is -20/(2 pi) = -10/pi = -3.18 V; for n = 3 it is 20/(3 pi) = 2.12 V. The series is v(t) = (20/pi) [ sin(pi t) - (1/2) sin(2 pi t) + (1/3) sin(3 pi t) - ... ] V. Unlike the square wave, the sawtooth keeps every harmonic, and the signs alternate.

Half-range expansions

Sometimes f is given only on 0 <= x <= L, with no natural behavior on the left. You are free to invent an extension over [-L, L] and then run the standard period-2L machinery. Two choices are useful:

  • Even (half-range cosine) extension: mirror f across the vertical axis. The result is even, so bn = 0 and an = (2/L) integral from 0 to L of f(x) cos(n pi x/L) dx.
  • Odd (half-range sine) extension: rotate f through the origin. The result is odd, so an = 0 and bn = (2/L) integral from 0 to L of f(x) sin(n pi x/L) dx.

Both series reproduce f exactly on the original 0 <= x <= L; they only differ on the invented left half. Pick the cosine form when you need a series that has zero slope at the ends, and the sine form when you need a series that vanishes at the ends, as heat and vibration boundary conditions often demand.

Worked example: Expand the displacement u(x) = x meters on 0 <= x <= 2 m as a half-range cosine series, so L = 2. The average term is a0 = (2/L) integral from 0 to L of x dx = (2/2)[x^2/2] from 0 to 2 = 2, so the constant a0/2 = 1 m, exactly the average of x over [0, 2]. For the cosines, an = (2/2) integral from 0 to 2 of x cos(n pi x/2) dx = ((-1)^n - 1)(4/(n^2 pi^2)) = (4/(n^2 pi^2))((-1)^n - 1) m. Even n gives 0; odd n gives -8/(n^2 pi^2). For n = 1, a1 = (4/pi^2)(-2) = -8/pi^2 = -0.811 m. So u(x) = 1 - (8/pi^2) [ cos(pi x/2) + (1/9) cos(3 pi x/2) + (1/25) cos(5 pi x/2) + ... ] m on 0 <= x <= 2 m.

Harmonics and the fundamental frequency

Once a signal has period T, its base repetition rate is the fundamental frequency f0 = 1/T, and the fundamental angular frequency is omega0 = 2 pi/T. Every term in the series lives at an integer multiple of that base: the n-th harmonic sits at frequency n f0 = n/T, or angular frequency n omega0. For the T = 2 s waveforms above, f0 = 1/2 = 0.5 Hz and omega0 = 2 pi/2 = pi = 3.14 rad/s, so the harmonics land at 0.5 Hz, 1.0 Hz, 1.5 Hz, and so on.

The amplitude a single harmonic actually contributes combines its sine and cosine parts as cn = sqrt(an^2 + bn^2). For a pure sine series like the square wave this is just cn = |bn|, so the fundamental at 0.5 Hz carries 12.73 V and the third harmonic at 1.5 Hz carries 4.24 V. A plot of cn against frequency is the amplitude spectrum, the harmonic-analysis view of the same waveform: it tells you which frequencies dominate. The square wave, with only odd harmonics decaying as 1/n, is nearly all fundamental, while a sharp spike would spread its energy across many harmonics.

Convergence at a jump

Fourier series do not always converge to the function value where the function is discontinuous. Dirichlet's theorem gives the precise rule: at a jump discontinuity x0, the series converges to the average of the one-sided limits,

series value at x0 = [ f(x0-) + f(x0+) ] / 2,

no matter what value, if any, f is assigned there. At every point where f is continuous the series converges to f itself.

At a jump the series converges to the midpoint of the one-sided limits x0 f(x0-) f(x0+) series value (average)
The series ignores the drawn step and lands on the solid dot, the midpoint [f(x0-) + f(x0+)]/2. This is why partial sums of a square wave always pass through the halfway level at each edge.

Worked example: The square wave jumps from -10 V as t approaches 0 from the left to +10 V as t approaches 0 from the right. Its series converges at t = 0 to [ f(0-) + f(0+) ] / 2 = (-10 V + 10 V)/2 = 0 V, which matches the fact that every sine term is zero there. The sawtooth jumps from +10 V to -10 V at t = 1 s, so its series converges there to (10 V + (-10 V))/2 = 0 V as well. And a general step from 2 V up to 8 V would settle at (2 V + 8 V)/2 = 5 V.

Exam-day strategy

  • Check symmetry before you integrate: an even function forces every bn = 0 (cosine series), and an odd function forces a0 = 0 and every an = 0 (sine series), which can cut the work in half.
  • Read the constant term correctly: a0/2 is the average or DC value of the signal, so if the waveform sits on a baseline, that baseline is a0/2 and nothing else.
  • Nail the coefficient formulas over a period 2L: a0 = (1/L) integral of f, an pairs f with cos(n pi x/L), and bn pairs f with sin(n pi x/L); for symmetric functions fold to 2 times the integral from 0 to L.
  • Remember the square wave keeps only odd harmonics with bn = 40/(n pi) for the 10 V case, while the sawtooth keeps every harmonic with alternating signs; recognizing these patterns saves a full integration.
  • Convert period to frequency cleanly: f0 = 1/T and omega0 = 2 pi/T, and the n-th harmonic sits at n f0, so a T = 2 s wave has harmonics at 0.5 Hz, 1.0 Hz, 1.5 Hz, and up.
  • For a half-range problem, extend even for a cosine-only series and odd for a sine-only series; both match f on 0 <= x <= L and only differ on the invented half.
  • At any jump, the series converges to the average of the one-sided limits [f(x0-) + f(x0+)]/2, never to either level alone; if a choice hands you one of the two levels at a discontinuity, it is a trap.

Marking it done updates your Exam-Ready progress.

Lesson quiz

Check you actually have it

20 items on this lesson alone, randomized each try, with the reasoning on every answer.

Fourier Series and Harmonic Analysis: quick check

Item 01 / 20 · Score 0

Half-range expansions

To represent a function defined only on 0 <= x <= L by a cosine-only (half-range) series, how should it be extended to -L <= x <= L?

This whole first section is free

Read every lesson in Engineering Mathematics and take its quizzes free. The full CELE reviewer unlocks the other 5 subjects, all section tests, and the timed mock exams — one payment, lifetime access, ₱399.

Unlock the full reviewer