BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Fourier series: even and odd functions, convergence and other periods

A function has only one Fourier series, and that settles the shortcuts: an even function has only cosine terms, an odd one only sine terms, and their coefficients can be computed over half the interval, aₙ = (2/π)∫₀^π f cos nt dt or bₙ = (2/π)∫₀^π f sin nt dt. The sawtooth f(t) = t on (−π, π) has the series 2Σ(−1)ⁿ⁺¹ sin(nt)/n. Unlike a Taylor series, a Fourier series approximates over the whole interval, not near one point. It converges to f where f is continuous and to the midpoint of each jump. For period 2L, use cos(nπt/L) and sin(nπt/L) with π replaced by L in the formulas. A function on a finite interval can be extended to an even or odd periodic function and then expanded.

You need this first

Full reading path (29 pages)
  1. The derivative: slope of the tangent line and rate of change (18.01)
  2. Limits and continuity (18.01)
  3. Derivatives of sine and cosine, and the product and quotient rules (18.01)
  4. The chain rule and higher derivatives (18.01)
  5. Implicit differentiation and the derivatives of inverse functions (18.01)
  6. Exponentials and logarithms: the number e and its derivatives (18.01)
  7. Linear and quadratic approximations (18.01)
  8. Curve sketching with the first and second derivative (18.01)
  9. Sketching strategy and maximum–minimum problems (18.01)
  10. More max–min, and related rates (18.01)
  11. A ring on a string, and Newton's method (18.01)
  12. The mean value theorem and inequalities (18.01)
  13. Differentials and antiderivatives (18.01)
  14. Differential equations and separation of variables (18.01)
  15. Direction fields, isoclines and integral curves (18.03)
  16. Euler's method and better numerical methods (18.03)
  17. First-order linear equations and integrating factors (18.03)
  18. Substitutions: scaling, Bernoulli and homogeneous equations (18.03)
  19. Autonomous equations, critical points and stability (18.03)
  20. Complex numbers and complex exponentials (18.03)
  21. Constant coefficients: steady state, superposition and sinusoidal input (18.03)
  22. Combining sine and cosine; models for first-order linear equations (18.03)
  23. Second-order linear equations with constant coefficients (18.03)
  24. Complex characteristic roots and damped oscillations (18.03)
  25. Linear operators, the Wronskian and normalized solutions (18.03)
  26. Inhomogeneous equations, particular solutions and stability (18.03)
  27. Particular solutions: the exponential input theorem (18.03)
  28. Resonance and beats (18.03)
  29. Introduction to Fourier series (18.03)
On this page · 7 sections
  1. One function, one series
  2. Even and odd functions
  3. The sawtooth
  4. Convergence
  5. Period 2L
  6. Functions on a finite interval
  7. Summary

The aim sounds modest: the Fourier series of the simple periodic function that equals tt between −π-\pi and π\pi (transcript, p. 1). The first half of the lecture shows how to shorten such calculations; the second extends Fourier series beyond period 2π2\pi (p. 2). It continues the introduction to Fourier series.

One function, one series#

Since ana_n and bnb_n are given by formulas, a function determines its coefficients: if f(t)=g(t)f(t) = g(t), they have the same Fourier series, coefficient by coefficient (transcript, p. 1). What happens at single points does not matter, since the integrals ignore them (p. 1).

Even and odd functions#

If ff is even, f(−t)=f(t)f(-t) = f(t), its Fourier series has only cosine terms: every bn=0b_n = 0 (transcript, p. 2). Proof by uniqueness (pp. 2–3): substituting −t-t for tt leaves each cos⁡nt\cos nt alone and changes the sign of each sin⁡nt\sin nt, so

Series of f(−t)
f(−t)=a02+∑n=1∞(ancos⁡nt−bnsin⁡nt)f(-t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left(a_n\cos nt - b_n\sin nt\right)
In words

f(-t) equals a nought over 2 plus the sum from n equals 1 to infinity of the quantity a sub n cos n t minus b sub n sine n t

For even ff this is the same function as f(t)f(t), so the two series agree: bn=−bnb_n = -b_n, and bn=0b_n = 0 (p. 3). This proves the converse of the obvious fact that a sum of cosines is even (p. 4). Likewise, if ff is odd, every an=0a_n = 0, including a0a_0 (p. 4).

Half the integral (pp. 4–5). If ff is even, so is f(t)cos⁡ntf(t)\cos nt, and the integral of an even function over [−π,π][-\pi, \pi] is twice that over [0,π][0, \pi], a much friendlier interval with fewer minus signs to lose (p. 5). If ff is odd, f(t)sin⁡ntf(t)\sin nt is odd times odd, which is even: these are statements about functions, not about odd and even numbers (pp. 5–6). So (p. 5)

Half-interval formulas
f even: an=2π∫0πf(t)cos⁡nt dt;f odd: bn=2π∫0πf(t)sin⁡nt dtf \text{ even: } a_n = \frac{2}{\pi}\int_0^{\pi}f(t)\cos nt\,dt; \qquad f \text{ odd: } b_n = \frac{2}{\pi}\int_0^{\pi}f(t)\sin nt\,dt
In words

f even: a sub n equals 2 over pi, times the integral from 0 to pi of f(t) cos n t d t; f odd: b sub n equals 2 over pi, times the integral from 0 to pi of f(t) sine n t d t

The sawtooth#

The function tt on (−π,π)(-\pi, \pi), repeated with period 2π2\pi, is odd, so only bnb_n is needed (transcript, pp. 6–7). Integrating by parts (pp. 7–8):

Sawtooth coefficients
bn=2π∫0πtsin⁡nt dt=2π([−tcos⁡ntn]0π+[sin⁡ntn2]0π)=2n(−1)n+1b_n = \frac{2}{\pi}\int_0^{\pi}t\sin nt\,dt = \frac{2}{\pi}\left(\Big[-\frac{t\cos nt}{n}\Big]_0^{\pi} + \Big[\frac{\sin nt}{n^2}\Big]_0^{\pi}\right) = \frac{2}{n}(-1)^{n+1}
In words

b sub n equals 2 over pi, times the integral from 0 to pi of t sine n t d t equals 2 over pi, times the quantity ( minus t cos n t over n ) sub 0 to the power pi plus ( sine n t over n squared ) sub 0 to the power pi, equals 2 over n, times (-1) to the power n plus 1, end of power

using cos⁡nπ=(−1)n\cos n\pi = (-1)^n (p. 8). So (pp. 8–9)

Sawtooth series
t=2∑n=1∞(−1)n+1nsin⁡nt=2(sin⁡t−sin⁡2t2+sin⁡3t3−⋯ )t = 2\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}\sin nt = 2\left(\sin t - \frac{\sin 2t}{2} + \frac{\sin 3t}{3} - \cdots\right)
In words

t equals 2 the sum from n equals 1 to infinity of (-1) to the power n plus 1, end of power, over n, times sine n t equals 2 the quantity sine t minus sine 2 t over 2 plus sine 3 t over 3 minus and so on

Not a Taylor series (p. 9). The first term 2sin⁡t2\sin t leaves the origin with slope 2, while tt has slope 1: thinking "Taylor", that looks wrong. But a Taylor series concentrates on one point and improves there term by term, while a Fourier series tries to approximate the function as well as possible over the whole interval. Each new term corrects the sum everywhere, and the earlier coefficients never need changing (pp. 9–10).

Partial sums of the sawtooth series 2∑(−1)n+1sin⁡(nt)/n2\sum(-1)^{n+1}\sin(nt)/n, computed from the formula: the first term already has the wrong slope at 0, but the sums improve over the whole interval at once.

Convergence#

The theorem, too far outside the course to prove, for the piecewise smooth functions of applications (the lecture states it without conditions; for an arbitrary continuous function it can fail) (transcript, pp. 10–12):

So the sawtooth series converges to tt on (−π,π)(-\pi, \pi), but at ±π\pm\pi, where the function jumps from π\pi down to −π-\pi, it converges to 0, whatever value ff was given there (pp. 11–12). Here one can check it directly: at t=πt = \pi every term is 0 (p. 12).

Period 2L#

Applications rarely have period 2π2\pi; often the half-period LL is 1 (transcript, p. 15). Changing the variable stretches the axis: u=πt/Lu = \pi t/L sends t=Lt = L to u=πu = \pi (p. 13). The natural functions are cos⁡(nπt/L)\cos(n\pi t/L) and sin⁡(nπt/L)\sin(n\pi t/L), which have period 2L2L, the sine vanishing at every multiple of LL (pp. 13–14), and the formulas are the old ones with π\pi replaced by LL (p. 14):

Period 2L
f(t)=a02+∑n=1∞(ancos⁡nπtL+bnsin⁡nπtL),an=1L∫−LLf(t)cos⁡nπtL dtf(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left(a_n\cos\frac{n\pi t}{L} + b_n\sin\frac{n\pi t}{L}\right), \qquad a_n = \frac{1}{L}\int_{-L}^{L}f(t)\cos\frac{n\pi t}{L}\,dt
In words

f(t) equals a nought over 2 plus the sum from n equals 1 to infinity of the quantity a sub n cos n pi t over L plus b sub n sine n pi t over L, a sub n equals 1 over L, times the integral from minus L to L of f(t) cos n pi t over L, times d t

and bnb_n likewise with the sine. The even and odd shortcuts carry over: for even ff, an=2L∫0Lf(t)cos⁡nπtL dta_n = \frac{2}{L}\int_0^Lf(t)\cos\frac{n\pi t}{L}\,dt (pp. 14–15).

Functions on a finite interval#

Most functions are not periodic, but Fourier series still apply to a function defined on a finite interval [0,L][0, L] (functions on the whole line need Fourier transforms instead) (transcript, p. 15). Make it periodic (pp. 15–16):

For t2t^2 on [0,1][0, 1] the even extension is continuous, while the odd one jumps at ±1\pm1, where its series converges to the midpoints (pp. 15–16). Only the part on [0,L][0, L] is then used, for instance as the input of a differential equation (p. 16).

Worked example

Extensions and a convergence check

(a) Find the cosine series of the even extension of f(t)=tf(t) = t on [0,2][0, 2]. (b) Find the sine series of the odd extension of f(t)=1f(t) = 1 on [0,2][0, 2]; what does it converge to at t=0t = 0? (c) Evaluate the sawtooth series at t=π/2t = \pi/2, using 1−13+15−⋯=π41 - \frac{1}{3} + \frac{1}{5} - \cdots = \frac{\pi}{4}.

(a) A triangle wave of period 4

L=2L = 2. The constant term is a02=12∫02t dt=1\frac{a_0}{2} = \frac{1}{2}\int_0^2t\,dt = 1, and an=∫02tcos⁡nπt2 dt=4n2π2((−1)n−1)a_n = \int_0^2t\cos\frac{n\pi t}{2}\,dt = \frac{4}{n^2\pi^2}\left((-1)^n - 1\right): −8n2π2-\frac{8}{n^2\pi^2} for odd nn, 0 for even. So f=1−8π2(cos⁡πt2+19cos⁡3πt2+⋯ )f = 1 - \frac{8}{\pi^2}\left(\cos\frac{\pi t}{2} + \frac{1}{9}\cos\frac{3\pi t}{2} + \cdots\right).

(b) A square wave of period 4

bn=∫02sin⁡nπt2 dt=2nπ(1−cos⁡nπ)b_n = \int_0^2\sin\frac{n\pi t}{2}\,dt = \frac{2}{n\pi}(1 - \cos n\pi): 4nπ\frac{4}{n\pi} for odd nn, 0 for even. At t=0t = 0 the extension jumps from −1-1 to 11, and every term of the series is 0: it converges to the midpoint, 0.

(c) The sawtooth at π/2

sin⁡nπ2\sin\frac{n\pi}{2} is 1,0,−1,0,…1, 0, -1, 0, \dots, so the series is 2(1−13+15−⋯ )=2⋅π4=π22\left(1 - \frac{1}{3} + \frac{1}{5} - \cdots\right) = 2\cdot\frac{\pi}{4} = \frac{\pi}{2}, which is f(π/2)f(\pi/2), as the theorem says at a point of continuity.

Summary#

Symbols on this page

Show the 19 symbols used here
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
∞\infty infinity.
Infinity: larger than any number. Say it: “infinity”.
±\pm plus or minus.
Plus or minus: both signs, or an uncertainty (67.3 ± 1.2). Say it: “plus or minus”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
∫\int integral.
Integral: the sum of infinitely many small pieces, such as the area under a curve. Say it: “the integral of”.
∑\sum sum.
Sum: add up the terms over the range written below and above. Say it: “the sum of”.
sin⁡\sin sine.
Sine of an angle. Say it: “sine”.
cos⁡\cos cosine.
Cosine of an angle. Say it: “cos”.
t0t_{0} today.
Today: the present time, about 13.8 billion years after the Big Bang in the real universe (simple models on some pages give other ages). Unit: s (usually billions of years). Say it: “t nought”.
tt t.
The independent variable, usually time. Say it: “t”.
dd d.
The d of dt. Say it: “d”.
nn n.
A positive integer: the frequency index of the terms. Say it: “n”.
ff f.
A periodic function, or a function on a finite interval to be extended. Say it: “f”.
gg g.
A second function, equal to f. Say it: “g”.
LL L.
The half-period: the function has period 2L, or is given on [0, L]. Say it: “L”.
uu u.
The stretched variable πt/L, which has period 2π. Say it: “u”.
a0a_{0} a nought.
Twice the constant term of the Fourier series. Say it: “a nought”.
ana_{n} a n.
The Fourier cosine coefficient. Say it: “a sub n”.
bnb_{n} b sub n.
The Fourier sine coefficient. Say it: “b sub n”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 24 words used here

New here

periodic extension.
A function defined everywhere by repeating its values on one interval; the even or odd version first reflects it across zero.

Also used

Fourier series.
A way of writing a repeating function as a sum of sines and cosines whose frequencies are whole-number multiples of one frequency. Explained in Normal modes of a string and Fourier series.
periodic.
Repeating itself exactly after a fixed interval of time or distance, called the period. Explained in Angles, radians and trigonometry.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
period.
The time one full cycle of a repeating motion takes, such as one turn round a circle or one swing of a pendulum. Explained in Uniform circular motion: centripetal acceleration, period and frequency.
integral.
A sum of very many very small pieces, such as the area under a graph; it undoes taking a derivative. Explained in Rates of change and area under a graph.
proof.
A chain of reasoning showing beyond doubt that a statement follows from definitions and results already known. Explained in Limits and continuity.
even function.
A function with the same value at x and −x, such as x² or cos x; its graph is mirror-symmetric about the vertical axis.
interval.
A stretch between two values or two moments; in maths, all the numbers between two end points. Explained in Time dilation, length contraction and the interval.
integration.
Finding an integral: adding up very many small pieces, or finding an antiderivative. Explained in Differentials and antiderivatives.
Taylor series.
A power series built from a function's derivatives at one point; its first few terms, a Taylor polynomial, approximate the function near that point. Explained in Stacking blocks and Taylor series.
theorem.
A statement that has been proved true, step by step, from definitions and earlier results. Explained in Limits and continuity.
continuous.
Without breaks, gaps or jumps: a continuous graph can be drawn without lifting the pen; a continuous quantity can take every value in a range. Explained in The rocket equation.
converge.
To settle towards a definite finite value: an integral, series or sequence converges when its partial results approach a limit. Explained in Improper integrals.
discontinuity.
A point where a function is not continuous: its graph jumps, has a hole or shoots off to infinity there. Explained in Curve sketching with the first and second derivative.
Fourier transform.
A way of writing a signal as a sum of pure waves, giving how much of each frequency it contains. Explained in The Fourier transform and AM radio.
differential equation.
An equation that links an unknown function to its derivatives; solving it means finding the function. Explained in Circular motion dynamics: worked problems.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
converse.
The statement made by swapping the 'if' and 'then' parts of another statement.
likewise.
In the same way; similarly.
approximation.
Close to, but not exactly, the true value; an approximation is such a value or formula, chosen because it is simpler.
arbitrary.
Free to be chosen as one likes; any choice gives a correct result.
vanish.
To become zero; sometimes, of a fixed point or solution, to stop existing.
carries over.
Still applies, with little change, in a new setting.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Practise

Check your understanding

  1. The Fourier series of an even function with period 2π2\pi contains…
  2. The series 2∑(−1)n+1sin⁡ntn2\sum(-1)^{n+1}\frac{\sin nt}{n} of the sawtooth (f=tf = t on (−π,π)(-\pi, \pi)) converges at t=πt = \pi to…
  3. For period 2L2L, the natural functions to expand in are…
0 of 3 answered

Flashcards

1 / 3