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

Stacking blocks and Taylor series

Blocks stacked from the top down, each pushed out as far as balance allows, lean out past a table edge by 1 + ½ + ⅓ + ⋯ half-lengths: the harmonic series, so the overhang can be as large as you like, but only with an astronomical number of blocks. Then power series Σ aₙxⁿ: inside a radius of convergence they behave like polynomials and can be added, multiplied, differentiated and integrated term by term. Taylor's formula aₙ = f⁽ⁿ⁾(0)/n! turns functions into series: eˣ = Σ xⁿ/n!, and the odd and even powers with alternating signs give sin x and cos x.

You need this first

Full reading path (19 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. Indeterminate forms and L'Hôpital's rule (18.01)
  9. Curve sketching with the first and second derivative (18.01)
  10. Sketching strategy and maximum–minimum problems (18.01)
  11. More max–min, and related rates (18.01)
  12. A ring on a string, and Newton's method (18.01)
  13. The mean value theorem and inequalities (18.01)
  14. Differentials and antiderivatives (18.01)
  15. Definite integrals and Riemann sums (18.01)
  16. The first fundamental theorem of calculus (18.01)
  17. The second fundamental theorem of calculus (18.01)
  18. Improper integrals (18.01)
  19. Infinite series and convergence tests (18.01)
On this page · 4 sections
  1. How far can a stack of blocks lean?
  2. Power series
  3. Taylor's formula
  4. Summary

The last lecture of new material has two parts: a stack of blocks that makes divergence visible, and power series, which turn all the functions of the course into infinite polynomials (transcript, pp. 1, 6).

How far can a stack of blocks lean?#

Can identical blocks be stacked so that the top one sticks out entirely beyond the bottom one, with no visible support (transcript, p. 1)? Either there is a limit to how far the stack can lean, which would be an interesting number, or there is none, which would be just as interesting: this is the difference between convergence and divergence (p. 1). The trick is to build from the top down, pushing each new block out as far as balance allows: the edge of each block must sit under the centre of mass of all the blocks above it (pp. 1–2; notes for Lecture 36, pp. 5–6). Building greedily from the bottom up does badly (p. 3).

Let a block have length 2 units, and measure from the left end of the top block. Its centre is at C1=1C_1 = 1, so the second block goes under it with its edge at 1, and its centre at 2 (p. 2). If the top NN blocks have their centre of mass at CNC_N, the next block's centre is at CN+1C_N + 1, and the centre of mass of all N+1N + 1 is the weighted average (pp. 3–4; notes for Lecture 36, p. 6):

Centre of mass of the stack
CN+1=N CN+(CN+1)N+1=CN+1N+1C_{N+1} = \frac{N\,C_N + (C_N + 1)}{N + 1} = C_N + \frac{1}{N + 1}
In words

capital C sub N plus 1 equals the quantity capital N capital C sub N plus the quantity capital C sub N plus 1, all over the quantity capital N plus 1, equals capital C sub N plus 1 over the quantity capital N plus 1

Starting from C1=1C_1 = 1: C2=1+12C_2 = 1 + \frac{1}{2}, C3=1+12+13C_3 = 1 + \frac{1}{2} + \frac{1}{3}, and in general CN=1+12+⋯+1NC_N = 1 + \frac{1}{2} + \cdots + \frac{1}{N}, the harmonic sum SNS_N of the previous lecture (p. 4). Since ln⁡N<SN\ln N < S_N, it grows without bound: with enough blocks the stack can reach as far as you like (p. 5). But since SNS_N grows only like ln⁡N\ln N, it takes a great many. To lean across the two lab tables in the lecture hall, 26 units less the 2 the first block already gives, so 24 units, the lecture takes ln⁡N≈24\ln N \approx 24, so N≈e24N \approx e^{24} blocks, and at 3 cm each a stack about 8×1088 \times 10^8 m tall, twice the distance to the Moon (p. 5; notes for Lecture 36, p. 7). This is a rough estimate: with the sharper SN≈ln⁡N+0.577S_N \approx \ln N + 0.577, about 1.5×10101.5 \times 10^{10} blocks, or 4.5×1084.5 \times 10^8 m, would do; either way, beyond the Moon. (The transcript writes the bound as "SN<SN+1S_N < S_N + 1" where it means SN<ln⁡N+1S_N < \ln N + 1, p. 5.) Turned on its side, the stack's outline is a logarithmic curve (p. 6). Infinity is not just one thing: it comes with a rate of growth (p. 6).

Power series#

The first power series is the geometric series. To see why it sums to 11−x\frac{1}{1 - x}: if 1+x+x2+⋯=S1 + x + x^2 + \cdots = S, multiply by xx and subtract, leaving 1=S−Sx1 = S - Sx (transcript, pp. 6–7). The argument assumes SS exists. At x=1x = 1 it would say ∞−∞=∞−∞\infty - \infty = \infty - \infty, which means nothing; it works exactly when the series converges, ∣x∣<1|x| < 1 (p. 7).

In general a power series ∑n=0∞anxn\sum_{n=0}^\infty a_nx^n has a radius of convergence RR (pp. 7–8; notes, p. 1):

Radius of convergence
∑n=0∞anxn   converges for ∣x∣<R,diverges for ∣x∣>R\sum_{n=0}^{\infty} a_n x^n \;\text{ converges for } |x| < R, \qquad \text{diverges for } |x| > R
In words

the sum from n equals 0 to infinity of a sub n x to the power n converges for the absolute value of x less than R, diverges for the absolute value of x greater than R

Source: 18.01 Lecture 38 transcript, pp. 7–8

Inside, the terms anxna_nx^n shrink geometrically fast; outside, they do not even tend to 0, so the cut-off is easy to see; the borderline ∣x∣=R|x| = R is delicate and avoided here (p. 8). A power series is a function of xx: for each xx it is a number (p. 10).

Inside the radius of convergence, power series obey the same rules as polynomials: add, multiply, substitute, divide, and above all differentiate and integrate term by term (p. 9; notes, pp. 1–2):

Term-by-term calculus
ddx∑n=0∞anxn=a1+2a2x+3a3x2+⋯ ,∫∑n=0∞anxn dx=c+a0x+a1x22+a2x33+⋯\frac{d}{dx}\sum_{n=0}^\infty a_nx^n = a_1 + 2a_2x + 3a_3x^2 + \cdots, \qquad \int\sum_{n=0}^\infty a_nx^n\,dx = c + a_0x + \frac{a_1x^2}{2} + \frac{a_2x^3}{3} + \cdots
In words

d over d x the sum from n equals 0 to infinity of a sub n x to the power n equals a one plus 2 a two x plus 3 a three x squared plus and so on, the integral of the sum from n equals 0 to infinity of a sub n x to the power n d x equals c plus a nought x plus a one x squared over 2 plus a two x cubed over 3 plus and so on

Like decimal expansions for numbers, they put all the functions of the course into one flexible, computable form (p. 9). The notes show the tools at work (notes, pp. 1–2): substituting x=−ux = -u in the geometric series gives 11+u=1−u+u2−⋯\frac{1}{1 + u} = 1 - u + u^2 - \cdots, and integrating that gives

Two series by integration
ln⁡(1+x)=x−x22+x33−⋯ ,tan⁡−1x=x−x33+x55−⋯(∣x∣<1)\ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots, \qquad \tan^{-1}x = x - \frac{x^3}{3} + \frac{x^5}{5} - \cdots \quad (|x| < 1)
In words

log of the quantity 1 plus x, equals x minus x squared over 2 plus x cubed over 3 minus and so on, inverse tan x equals x minus x cubed over 3 plus x to the power 5 over 5 minus and so on ( the absolute value of x less than 1)

the second from 11+v2=1−v2+v4−⋯\frac{1}{1 + v^2} = 1 - v^2 + v^4 - \cdots. Differentiating the geometric series gives 1(1−x)2=1+2x+3x2+⋯\frac{1}{(1 - x)^2} = 1 + 2x + 3x^2 + \cdots, which also follows by multiplying the series by itself (notes, p. 2).

Taylor's formula#

Which coefficients does a given function have? If f(x)=a0+a1x+a2x2+⋯f(x) = a_0 + a_1x + a_2x^2 + \cdots, differentiate nn times: every term below xnx^n disappears, and setting x=0x = 0 kills every term above it, leaving f(n)(0)=n! anf^{(n)}(0) = n!\,a_n (transcript, pp. 10–11; notes, p. 3):

Taylor's formula
f(x)=∑n=0∞f(n)(0)n! xn,n!=n(n−1)⋯2⋅1,0!=1f(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(0)}{n!}\,x^n, \qquad n! = n(n - 1)\cdots 2 \cdot 1, \quad 0! = 1
In words

f(x) equals the sum from n equals 0 to infinity of f to the power (n) (0) over the quantity n factorial, times x to the power n, n factorial equals n the quantity n minus 1, and so on 2 times 1, 0 factorial equals 1

Source: 18.01 Lecture 38 transcript, pp. 10–11

The convention 0!=10! = 1 makes the formula work for n=0n = 0 (p. 11). For f=exf = e^x every derivative is exe^x, which is 1 at 0, so (p. 11; notes, p. 3)

The exponential series
ex=∑n=0∞xnn!=1+x+x22!+x33!+⋯ ,e=1+1+12!+13!+14!+⋯e^x = \sum_{n=0}^{\infty}\frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots, \qquad e = 1 + 1 + \frac{1}{2!} + \frac{1}{3!} + \frac{1}{4!} + \cdots
In words

e to the power x equals the sum from n equals 0 to infinity of x to the power n over the quantity n factorial, equals 1 plus x plus x squared over the quantity 2 factorial, plus x cubed over the quantity 3 factorial, plus and so on, e equals 1 plus 1 plus 1 over the quantity 2 factorial, plus 1 over the quantity 3 factorial, plus 1 over the quantity 4 factorial, plus and so on

our first honest formula for ee, and the way the exponential is actually computed (p. 11). The derivatives of cos⁡x\cos x at 0 cycle through 1,0,−1,01, 0, -1, 0 (notes, pp. 3–4), and the notes get the sine series by differentiating the cosine series (p. 4), giving (transcript, pp. 11–12)

Sine and cosine
sin⁡x=x−x33!+x55!−x77!+⋯ ,cos⁡x=1−x22!+x44!−x66!+⋯\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots, \qquad \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots
In words

sine x equals x minus x cubed over the quantity 3 factorial, plus x to the power 5 over the quantity 5 factorial, minus x to the power 7 over the quantity 7 factorial, plus and so on, cos x equals 1 minus x squared over the quantity 2 factorial, plus x to the power 4 over the quantity 4 factorial, minus x to the power 6 over the quantity 6 factorial, plus and so on

Source: 18.01 Lecture 38 transcript, pp. 11–12

The exponential has all powers, the sine the odd powers with alternating signs, the cosine the even ones: one family, easier to remember together (p. 12). They complete the linear and quadratic approximations from early in the course, sin⁡x≈x\sin x \approx x and cos⁡x≈1−x22\cos x \approx 1 - \frac{x^2}{2} (p. 11; notes, p. 4). The notes add the binomial series, (1+x)a=1+ax+a(a−1)2!x2+⋯(1 + x)^a = 1 + ax + \frac{a(a - 1)}{2!}x^2 + \cdots, and series about another base point bb, in powers of x−bx - b, used for instance for x\sqrt x about b=1b = 1 (notes, pp. 4–5).

Worked example

Series at work

(a) Estimate ee from the first six terms of its series. (b) Estimate sin⁡0.5\sin 0.5 from three terms. (c) Estimate ln⁡1.5\ln 1.5 from four terms of the series for ln⁡(1+x)\ln(1 + x). (d) How many blocks does it take for the centre of mass of the stack, CNC_N, to reach 4 units, two block lengths?

(a) e

1+1+12+16+124+1120≈2.71671 + 1 + \frac{1}{2} + \frac{1}{6} + \frac{1}{24} + \frac{1}{120} \approx 2.7167, against e≈2.71828e \approx 2.71828: the factorials make the terms shrink fast.

(b) sin 0.5

0.5−0.1256+0.03125120≈0.5−0.020833+0.000260=0.4794270.5 - \frac{0.125}{6} + \frac{0.03125}{120} \approx 0.5 - 0.020833 + 0.000260 = 0.479427, against the true 0.479426.

(c) ln 1.5

0.5−0.252+0.1253−0.06254≈0.40100.5 - \frac{0.25}{2} + \frac{0.125}{3} - \frac{0.0625}{4} \approx 0.4010, against the true 0.4055: with x=0.5x = 0.5 the terms shrink only like 0.5n/n0.5^n/n, so convergence is slower.

(d) The stack

We need 1+12+⋯+1N≥41 + \frac{1}{2} + \cdots + \frac{1}{N} \ge 4. The sum is about 3.995 for N=30N = 30 and 4.027 for N=31N = 31, so 31 blocks are needed, consistent with ln⁡N<SN<ln⁡N+1\ln N < S_N < \ln N + 1 (ln⁡31≈3.43\ln 31 \approx 3.43).

Summary#

  • NN blocks stacked from the top on a table can lean out past its edge by 1+12+⋯+1N1 + \frac{1}{2} + \cdots + \frac{1}{N} half-lengths: without limit, but only like ln⁡N\ln N.
  • A power series ∑anxn\sum a_nx^n converges for ∣x∣<R|x| < R and diverges for ∣x∣>R|x| > R; inside, it behaves like a polynomial, including term-by-term differentiation and integration.
  • Taylor's formula: an=f(n)(0)n!a_n = \frac{f^{(n)}(0)}{n!}.
  • ex=∑xnn!e^x = \sum\frac{x^n}{n!}; sin⁡x\sin x takes the odd powers and cos⁡x\cos x the even powers, with alternating signs and the same factorials; ln⁡(1+x)\ln(1 + x) and tan⁡−1x\tan^{-1}x follow by integration.

Symbols on this page

Show the 40 symbols used here
α\alpha alpha.
In the cosmology note, the length that sets the size of a closed universe. Unit: m. Say it: “alpha”.
θ\theta theta.
An angle. Say it: “theta” (sounds like “thay-ta or thee-ta”).
∞\infty infinity.
Infinity: larger than any number. Say it: “infinity”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
∝\propto proportional to.
Is proportional to: doubling one doubles the other. Say it: “is proportional to”.
≥\ge greater than or equal.
Is greater than or equal to. Say it: “is greater than or equal to”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\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”.
tan⁡\tan tangent.
Tangent of an angle, sin/cos. Say it: “tan”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
aa a.
The exponent in the binomial series (1 + x)^a; in the cosmology note, the scale factor. Say it: “a”.
cc c.
The constant of integration; in the cosmology note, the speed of light. Say it: “c”.
kk k.
In the cosmology note, the curvature constant of a closed universe. Say it: “k”.
xx x.
The variable of a power series. Say it: “x”.
tt t.
In the cosmology note, the time since the Big Bang. Unit: s. Say it: “t”.
dd d.
As in d/dx and dx: a differential. Say it: “d”.
nn n.
The power (and index) in a power series; n! is n factorial. Say it: “n”.
ee e.
Euler's number, e ≈ 2.71828. Say it: “e”.
ff f.
The function represented by a power series (f⁽ⁿ⁾: its n-th derivative). Say it: “f”.
vv v.
The variable after substituting x = −v² in the geometric series. Say it: “v”.
bb b.
The base point of a Taylor series in powers of x − b. Say it: “b”.
NN N.
The number of blocks in the stack. Say it: “capital N”.
RR R.
The radius of convergence of a power series. Say it: “R”.
SS S.
The sum of the geometric series. Say it: “S”.
a1a_{1} a one.
The coefficient of x in a power series. Say it: “a one”.
a2a_{2} a two.
The coefficient of x² in a power series. Say it: “a two”.
uu u.
The variable after substituting x = −u in the geometric series. Say it: “u”.
a0a_{0} a nought.
The constant coefficient of a power series. Say it: “a nought”.
a3a_{3} a 3.
The coefficient of x³ in a power series. Say it: “a three”.
ana_{n} a n.
The n-th coefficient of a power series. Say it: “a sub n”.
C1C_{1} C 1.
The centre of mass of the top block, measured from its left end (1 unit). Say it: “capital C one”.
C2C_{2} C 2.
The centre of mass of the top two blocks. Say it: “capital C two”.
C3C_{3} C 3.
The centre of mass of the top three blocks. Say it: “capital C three”.
SNS_{N} S N.
The harmonic sum 1 + ½ + ⋯ + 1/N. Say it: “S sub N”.
CNC_{N} C N.
The horizontal centre of mass of the top N blocks, measured from the left end of the top block (block length 2 units). Say it: “capital C sub N”.
CN+1C_{N+1} C N plus 1.
The centre of mass of the top N + 1 blocks. Say it: “capital C sub N plus 1”.

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

Words on this page

Show the 33 words used here

New here

radius of convergence.
For a power series, the distance from its centre within which the series converges, and beyond which it diverges.
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.

Also used

divergence.
The failure of an infinite series or an improper integral to settle on a finite value.
power series.
A series in powers of a variable, a₀ + a₁x + a₂x² + …, which behaves like a polynomial with infinitely many terms. Explained in Non-degenerate perturbation theory.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
limit.
A bound: the largest or smallest possible or allowed value, such as the most mass a white dwarf can have. Explained in Constant-density stars, Buchdahl's limit, and the puzzles of the Schwarzschild spacetime.
centre of mass.
The mass-weighted average position of a body or system: the point that moves as if all the mass and all outside forces were there. Explained in Torque and balance.
weighted average.
An average in which some values count more: each is multiplied by its weight, and the total divided by the sum of the weights. Explained in Centre of mass and its motion.
logarithm.
The power to which a fixed base must be raised to give a number: log₁₀ 1000 = 3 because 10³ = 1000. Explained in Exponentials and logarithms.
geometric series.
A series where each term is x times the one before; for x between −1 and 1 the total is 1/(1 − x).
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.
cut-off.
A limit beyond which something is left out or falls away steeply: the largest wave number kept in a sum, or a spectrum's edge. Explained in The vacuum as a medium, the Casimir effect and interacting bosons.
differentiation.
Finding a derivative: working out how fast a function changes. Explained in The derivative: slope of the tangent line and rate of change.
integration.
Finding an integral: adding up very many small pieces, or finding an antiderivative. Explained in Differentials and antiderivatives.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
linear.
Of a relation or equation: using only first powers of the unknowns, so doubling the cause doubles the effect and effects simply add. Explained in Solving and rearranging formulas.
quadratic approximation.
Replacing a function near a point by the best-matching expression with squares and products of the small changes, using first and second derivatives. Explained in Linear and quadratic approximations.
base point.
The point x₀ around which a function is approximated, such as the point where a tangent line touches the curve. Explained in Linear and quadratic approximations.
factorial.
The product of all the whole numbers from 1 up to n, written n!; for example 4! = 24. Explained in The chain rule and higher derivatives.
closed universe.
A universe with more than the critical density, whose space curves back on itself like a sphere, so it is finite. Explained in Open, closed and flat universes.
Big Bang.
The hot, dense early state from which the whole observable universe has been expanding for about 13.8 billion years. Explained in The Big Bang.
flat universe.
A universe with exactly the critical density, whose space has no curvature and which expands forever, ever more slowly. Explained in Open, closed and flat universes.
without limit.
Without any upper bound: growing larger and larger, past every value.
diverge.
To fail to settle on a finite value: a series or integral diverges when its partial results grow without limit or never settle. Explained in Improper integrals.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
rough estimate.
A quick, approximate value, worked out without care for small details.
argument.
A chain of reasoning that leads to a conclusion; in maths also the input of a function, such as x in sin x.
assumption.
Something accepted as true, without proof, so that an argument or calculation can proceed; to assume is to accept it so.
borderline.
On the boundary between two kinds of behaviour, belonging clearly to neither.
delicate.
Needing great care, because a small mistake or a small change can spoil the result.
kills.
In maths slang, to make a term or vector zero.
convention.
An agreed choice, such as which direction counts as positive, that could have been made differently.
consistent.
Agreeing with, and not contradicting, something else, such as the data, another result, or itself.

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

32 more cosmology pages that build on this

Pages that build on this

Check your understanding

  1. In the block-stacking recurrence, CN+1=CN+…C_{N+1} = C_N + \ldots
  2. By Taylor's formula, the coefficient of xnx^n in the series for ff is…
  3. sin⁡x=\sin x =
  4. Integrating 11+u=1−u+u2−⋯\frac{1}{1 + u} = 1 - u + u^2 - \cdots from 0 to xx gives…
0 of 4 answered

Flashcards

1 / 4