Chapter IX · The logarithmic, exponential and circular functions of a real variable

The exponential series

§219 35 min

Why ex=1+x+x2/2!+x3/3!+…e^x = 1 + x + x^2/2! + x^3/3! + \dots for every real xx, proved twice: by Taylor's theorem, and by squeezing the partial sums between (1+x/n)n(1 + x/n)^n and (1−x/n)−n(1 - x/n)^{-n}.

Why this matters

So far exe^x has been defined indirectly, as the inverse of the area function log⁡x\log x. That definition is good for proving properties but useless for computing: it does not tell you what e0.3e^{0.3} is to six decimals. In §219 Hardy shows that the exponential function is the sum of a power series that converges for every real xx, and very fast. This one formula is the working definition of exe^x in most of mathematics, and in §223 it will become the starting point of a second, independent theory of the exponential function.

The idea

Every derivative of exe^x is exe^x again, so every derivative at 00 equals 11. The Taylor polynomial of degree n−1n - 1 about 00 is therefore

1+x+x22!+⋯+xn−1(n−1)!.1 + x + \frac{x^2}{2!} + \dots + \frac{x^{n-1}}{(n-1)!}.

The question is whether these polynomials actually converge to exe^x, and where. For log⁡(1+x)\log(1 + x) or 1/(1+x2)1/(1 + x^2) the answer is “only on an interval”, as you saw in §152. For exe^x it is “everywhere”, and the reason is that n!n! eventually beats any power xnx^n.

Explore Taylor polynomials of exe^x

Try this. Start at degree 11 and raise the degree one step at a time. Watch where the polynomial leaves the curve, on the right and on the left. Then drag the centre away from 00.

f(x)=exf(x) = e^x, centre a=0a = 0, degree n=1n = 1
xy
  • f(x)
  • Taylor polynomial Pn
  • remainder f − Pn
  • centre a (drag)
  • probe x (drag)
P1(x)=1+xP_{1}(x) = 1 + x
At x=2.4x = 2.4: f(x)=11.023f(x) = 11.023, P1(x)=3.4P_{1}(x) = 3.4, error ∣f(x)−P1(x)∣=7.62|f(x) - P_{1}(x)| = 7.62.
What to notice

Each new term pushes the region of good agreement further out, on both sides, and no interval of convergence is ever marked: unlike log⁡(1+x)\log(1+x), the series for exe^x has no barrier. On the left the polynomials alternate above and below the curve, because the terms xn/n!x^n/n! alternate in sign when x<0x < 0.

Taylor’s theorem with Lagrange’s remainder (§150) makes this precise. For each nn and each xx there is a θ\theta between 00 and 11 with

ex=1+x+x22!+⋯+xn−1(n−1)!+xnn! eθx.e^x = 1 + x + \frac{x^2}{2!} + \dots + \frac{x^{n-1}}{(n-1)!} + \frac{x^n}{n!}\, e^{\theta x}.

We know nothing about θ\theta except that it lies in (0,1)(0, 1). That is enough: eθxe^{\theta x} is at most e∣x∣e^{|x|} whatever θ\theta is, and xn/n!→0x^n/n! \to 0 for every fixed xx (Examples XXVII, 12). So the remainder is squeezed to 00.

Precise statements

Theorem The exponential series Hardy: §219 (1)–(3)

For every real xx,

ex=1+x+x22!+x33!+⋯=∑n=0∞xnn!.e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \dots = \sum_{n=0}^{\infty} \frac{x^n}{n!}.

In particular e=1+1+12!+13!+…e = 1 + 1 + \dfrac{1}{2!} + \dfrac{1}{3!} + \dots, and, since exey=ex+ye^x e^y = e^{x+y},

(∑n=0∞xnn!)(∑n=0∞ynn!)=∑n=0∞(x+y)nn!.\left(\sum_{n=0}^\infty \frac{x^n}{n!}\right)\left(\sum_{n=0}^\infty \frac{y^n}{n!}\right) = \sum_{n=0}^\infty \frac{(x+y)^n}{n!}.

Hardy calls the last identity the exponential theorem. Combined with ax=exlog⁡aa^x = e^{x \log a} (§214) it gives a series for every power:

Corollary Series for axa^x Hardy: §219 (4)

For a>0a > 0 and every real xx,

ax=1+xlog⁡a+(xlog⁡a)22!+(xlog⁡a)33!+… .a^x = 1 + x\log a + \frac{(x \log a)^2}{2!} + \frac{(x\log a)^3}{3!} + \dots.

Proofs

Proof The exponential series, by Taylor's theorem
Strategy

Write exe^x as the Taylor polynomial plus Lagrange’s remainder, bound the remainder by something that does not involve the unknown θ\theta, and show that this bound tends to 00.

Taylor's theorem applies

f(x)=exf(x) = e^x has derivatives of every order, all equal to exe^x (§213), so f(k)(0)=1f^{(k)}(0) = 1 for every kk. Lagrange’s form of Taylor’s theorem about 00 gives the displayed formula above, with some θ=θ(n,x)\theta = \theta(n, x) in (0,1)(0, 1).

Bound the remainder independently of θ\theta

Since ete^t increases, eθx≤e∣x∣e^{\theta x} \le e^{|x|}: if x≥0x \ge 0 then θx≤x\theta x \le x, and if x<0x < 0 then θx<0\theta x < 0, so eθx<1e^{\theta x} < 1. Hence

∣ex−∑k=0n−1xkk!∣≤∣x∣nn! e∣x∣.\left| e^x - \sum_{k=0}^{n-1} \frac{x^k}{k!} \right| \le \frac{|x|^n}{n!}\, e^{|x|}.

∣x∣n/n!→0|x|^n/n! \to 0

Fix xx and choose an integer N≥2∣x∣N \ge 2|x|. For n>Nn > N, each extra factor ∣x∣/n|x|/n is at most 12\tfrac12, so ∣x∣n/n!≤(∣x∣N/N!) (12)n−N|x|^n/n! \le (|x|^N/N!)\,(\tfrac12)^{n-N}, which tends to 00.

Conclude

The bound in step 2 is a fixed number e∣x∣e^{|x|} times a sequence tending to 00, so the partial sums tend to exe^x. Taking x=1x = 1 gives the series for ee, and the exponential theorem is just exey=ex+ye^x e^y = e^{x+y} rewritten with the series.

Hardy then gives a second proof that avoids Taylor’s theorem altogether. It uses only the limit (1+x/n)n→ex(1 + x/n)^n \to e^x of §215 and the binomial theorem. Write En(x)=1+x+⋯+xn/n!E_n(x) = 1 + x + \dots + x^n/n! for the partial sum ending with xn/n!x^n/n!.

Explore The partial sums caught in a vice

Try this. With x=2x = 2, step nn from 11 upwards. The filled ochre dots are (1+x/n)n(1+x/n)^n, the hollow ones (1−x/n)−n(1-x/n)^{-n}. Then raise xx to 44 or 55 and watch the upper dots appear only once n>xn > x.

nvalue
  • partial sum En(x)E_n(x)
  • lower (1+x/n)n(1+x/n)^n (filled), upper (1−x/n)−n(1-x/n)^{-n} (hollow, only for n > x)
  • exe^x
At n=8n = 8: lower (1+x/n)n=5.960464(1+x/n)^n = 5.960464, sum En(x)=7.387302E_n(x) = 7.387302, upper (1−x/n)−n=9.988721(1-x/n)^{-n} = 9.988721. The target is ex=7.389056e^{x} = 7.389056; the sum is off by 0.00175, the lower bound by 1.43.
What to notice

The blue partial sums always sit between the two ochre sequences. Both ochre sequences tend to exe^x (dashed), so the blue ones must too. Notice also how much faster the blue dots arrive: the squeeze proves convergence, but the series itself converges far more quickly than either bound.

Proof The exponential series, by squeezing (Hardy's second proof)
Strategy

For x>0x > 0, compare En(x)E_n(x) term by term with the binomial expansions of (1+x/n)n(1 + x/n)^n and (1−x/n)−n(1 - x/n)^{-n}. Both bounds tend to exe^x. Negative xx is then handled by the functional equation.

Lower bound: (1+x/n)n≤En(x)(1 + x/n)^n \le E_n(x)

By the binomial theorem,

(1+xn)n=∑k=0nn(n−1)⋯(n−k+1)nk xkk!.\Bigl(1 + \frac{x}{n}\Bigr)^n = \sum_{k=0}^{n} \frac{n(n-1)\cdots(n-k+1)}{n^k}\,\frac{x^k}{k!}.

Each fraction n(n−1)⋯(n−k+1)/nkn(n-1)\cdots(n-k+1)/n^k is a product of numbers at most 11, so each term is at most xk/k!x^k/k!, the matching term of En(x)E_n(x). (For n>1n > 1 the term with k=2k = 2 is strictly smaller, so the inequality is strict.)

Upper bound: En(x)<(1−x/n)−nE_n(x) < (1 - x/n)^{-n} when n>xn > x

When 0<x/n<10 < x/n < 1, the binomial series for a negative integral exponent gives

(1−xn)−n=∑k=0∞n(n+1)⋯(n+k−1)nk xkk!.\Bigl(1 - \frac{x}{n}\Bigr)^{-n} = \sum_{k=0}^{\infty} \frac{n(n+1)\cdots(n+k-1)}{n^k}\,\frac{x^k}{k!}.

Now every fraction is at least 11, so every term is at least xk/k!x^k/k!; and the series has infinitely many further positive terms beyond k=nk = n.

Squeeze

By §215, (1+x/n)n→ex(1 + x/n)^n \to e^x and (1−x/n)−n=1/(1−x/n)n→1/e−x=ex(1 - x/n)^{-n} = 1/(1 - x/n)^n \to 1/e^{-x} = e^x. A sequence trapped between two sequences with the same limit has that limit too, so En(x)→exE_n(x) \to e^x for every x>0x > 0 (and trivially for x=0x = 0).

Negative xx

Write F(x)=∑xn/n!F(x) = \sum x^n/n!, which converges absolutely for every xx. Multiplying two such series (Examples LXXXI, 7, at §202) gives F(x)F(y)=F(x+y)F(x)F(y) = F(x + y); this is worked out in §223. So for x>0x > 0, F(−x)=F(0)/F(x)=1/ex=e−xF(-x) = F(0)/F(x) = 1/e^x = e^{-x}.

Worked examples and exercises

Exercise The largest term ●○○ Hardy: Examples XCI, 2

Let x>0x > 0. Show that the largest term of ∑xn/n!\sum x^n/n! is x[x]/[x]!x^{[x]}/[x]!, and that when xx is an integer the term before it, xx−1/(x−1)!x^{x-1}/(x-1)!, is equally large.

Hint
Compare consecutive terms: the ratio of xn/n!x^{n}/n! to xn−1/(n−1)!x^{n-1}/(n-1)! is x/nx/n.

Solution

The ratio un/un−1u_n/u_{n-1} of consecutive terms un=xn/n!u_n = x^n/n! is x/nx/n. So the terms increase while n<xn < x and decrease once n>xn > x. The last increase happens at n=[x]n = [x] (when xx is not an integer, [x]<x<[x]+1[x] < x < [x] + 1), so u[x]u_{[x]} is the largest term. In Hardy’s counting, which starts with u0=1u_0 = 1 as the first term, this is the ([x]+1)([x] + 1)th term. If xx is an integer, ux/ux−1=x/x=1u_x/u_{x-1} = x/x = 1, so the two are equal. You can see the hump in the widget below: for x=10x = 10 the terms rise to about 27562756 at n=9,10n = 9, 10 before the factorial takes over.

Explore Big xx: the terms rise before they fall

Try this. Show the terms with the log scale on, at x=10x = 10. Then switch to the error and read off how many terms give six correct decimals.

∑n=0∞xnn!\sum_{n=0}^{\infty} \frac{x^n}{n!}
nuₙ (log scale)
  • uₙ for xnn!\frac{x^n}{n!}
Plot
After 30 terms s29=22026.46027s_{29} = 22026.46027; the sum is 22026.466, so ∣s−s29∣|s - s_{29}| = 0.00553. The series converges to 22026.466.
What to notice

The terms climb to a peak at n=9n = 9 and 1010 and then fall faster than any geometric sequence (the log plot bends downwards). The error stays enormous for the first ten terms; convergence is guaranteed, but it starts late when xx is large.

Exercise ●○○ Hardy: Examples XCI, 3

Show that n!>(n/e)nn! > (n/e)^n for every positive integer nn.

Hint
nn/n!n^n/n! is one of the terms of the series for ene^n.

Solution

All terms of en=∑knk/k!e^n = \sum_k n^k/k! are positive, so the series is larger than any one of its terms (there are others): en>nn/n!e^n > n^n/n!. Rearranged, n!>nn/en=(n/e)nn! > n^n/e^n = (n/e)^n. This crude bound is already the main factor in Stirling’s formula n!∼2πn (n/e)nn! \sim \sqrt{2\pi n}\,(n/e)^n.

Exercise ●○○ Hardy: Examples XCI, 5

Use the series to show that exe^x tends to infinity faster than any power of xx: x−kex→∞x^{-k}e^x \to \infty as x→∞x \to \infty, for every k>0k > 0.

Hint
Pick an integer n>kn > k and keep just one term of the series.

Solution

Let nn be an integer with n>kn > k. For x>0x > 0 every term is positive, so ex>xn/n!e^x > x^n/n!, and x−kex>xn−k/n!x^{-k}e^x > x^{n-k}/n!. Since n−k>0n - k > 0, the right-hand side tends to ∞\infty as x→∞x \to \infty. Compare the proof of the same fact in §215: the series gives it in one line.

Exercise ee is irrational ●●○ Hardy: Examples XCI, 6

Show that ee is not a rational number.

Hint
Suppose e=p/qe = p/q with integers p,q≥1p, q \ge 1. Multiply e=∑1/n!e = \sum 1/n! by q!q! and split the sum at n=qn = q.
Hint
The part with n≤qn \le q is an integer. Bound the rest by a geometric series.

Solution

Suppose e=p/qe = p/q. Then

q! e−q!(1+1+12!+⋯+1q!)=1q+1+1(q+1)(q+2)+… .q!\,e - q!\Bigl(1 + 1 + \frac{1}{2!} + \dots + \frac{1}{q!}\Bigr) = \frac{1}{q+1} + \frac{1}{(q+1)(q+2)} + \dots .

The left side is an integer: q! e=(q−1)! pq!\,e = (q-1)!\,p, and each q!/k!q!/k! with k≤qk \le q is an integer. The right side is positive and less than 1q+1+1(q+1)2+⋯=1q≤1\frac{1}{q+1} + \frac{1}{(q+1)^2} + \dots = \frac{1}{q} \le 1. A positive integer less than 11 is impossible, so ee is irrational.

Exercise ●●○ Hardy: Examples XCI, 9

Show that ∑n≥1n/n!=e\sum_{n \ge 1} n/n! = e, ∑n2/n!=2e\sum n^2/n! = 2e, ∑n3/n!=5e\sum n^3/n! = 5e, and that ∑nk/n!\sum n^k/n! is a positive integer multiple of ee for every positive integer kk.

Hint
n/n!=1/(n−1)!n/n! = 1/(n-1)!, and more generally n(n−1)⋯(n−j+1)/n!=1/(n−j)!n(n-1)\cdots(n-j+1)/n! = 1/(n-j)! for n≥jn \ge j.
Hint
Write n2=n(n−1)+nn^2 = n(n-1) + n and n3=n(n−1)(n−2)+3n(n−1)+nn^3 = n(n-1)(n-2) + 3n(n-1) + n.

Solution

For each j≥1j \ge 1, ∑n≥0n(n−1)⋯(n−j+1)n!=∑n≥j1(n−j)!=e\sum_{n \ge 0} \dfrac{n(n-1)\cdots(n-j+1)}{n!} = \sum_{n \ge j} \dfrac{1}{(n-j)!} = e, since the terms with n<jn < j vanish. Hence ∑n/n!=e\sum n/n! = e; ∑n2/n!=e+e=2e\sum n^2/n! = e + e = 2e; and ∑n3/n!=e+3e+e=5e\sum n^3/n! = e + 3e + e = 5e (check: n(n−1)(n−2)+3n(n−1)+n=n3−3n2+2n+3n2−3n+n=n3n(n-1)(n-2) + 3n(n-1) + n = n^3 - 3n^2 + 2n + 3n^2 - 3n + n = n^3).

In general nkn^k can be written as ∑j=1kck,j n(n−1)⋯(n−j+1)\sum_{j=1}^{k} c_{k,j}\, n(n-1)\cdots(n-j+1) with non-negative integer coefficients ck,jc_{k,j} and ck,k=1c_{k,k} = 1. (Induction: multiply by n=(n−j)+jn = (n - j) + j and use n(n−1)⋯(n−j+1)⋅(n−j)=n(n-1)\cdots(n-j+1)\cdot(n-j) = the next falling product.) Then ∑nk/n!=e∑jck,j\sum n^k/n! = e\sum_j c_{k,j}, a positive integer multiple of ee. Hardy’s Ex. 7 uses the same idea to sum ∑P(n)xn/n!\sum P(n)x^n/n! for any polynomial PP.

Check yourself

Check yourself Enter a number

What is the smallest NN for which 1+1+12!+⋯+1N!1 + 1 + \frac{1}{2!} + \dots + \frac{1}{N!} differs from ee by less than 10−610^{-6}?

Why

The error is the tail 1(N+1)!+1(N+2)!+…\frac{1}{(N+1)!} + \frac{1}{(N+2)!} + \dots, which is a little more than its first term. For N=8N = 8 it is about 3.06×10−63.06 \times 10^{-6} (the first term alone is 1/9!≈2.76×10−61/9! \approx 2.76 \times 10^{-6}), too big; for N=9N = 9 it is about 3.03×10−73.03 \times 10^{-7}. So N=9N = 9: ten terms give ee to six decimals.

Check yourself True or false?

For x=50x = 50 the terms 50n/n!50^n/n! increase for the first fifty steps, so the series for e50e^{50} diverges.

Why

False. Convergence depends only on the tail. The terms increase while n<50n < 50, but from then on each is multiplied by 50/n50/n, which falls below 12\tfrac12 once n>100n > 100; the tail is dominated by a geometric series. A series can start by growing and still converge; it simply converges late.

Check yourself Choose one

In the Taylor proof, the remainder is xnn!eθx\frac{x^n}{n!}e^{\theta x} with an unknown θ∈(0,1)\theta \in (0, 1) that depends on nn. Why does that not spoil the argument?

Why

We never need to know θ\theta, only a bound for eθxe^{\theta x} valid for all possible θ\theta. Nothing is claimed about how θ\theta behaves as nn changes (in fact θ(n,x)\theta(n, x) does tend to 00, but proving that is harder and unnecessary). The remainder is negative for some x<0x < 0 and odd nn, so the last option is false.

Check yourself Choose one

Hardy’s squeeze proof works directly only for x>0x > 0. What breaks for x<0x < 0?

Why

The inequality “each term of (1+x/n)n(1 + x/n)^n is at most the matching term of En(x)E_n(x)” turns into a statement about sums only when the terms are positive. For negative xx the limit in §215 is still true and the series still converges; the proof is simply finished by the functional equation F(x)F(−x)=F(0)=1F(x)F(-x) = F(0) = 1.

Hardy’s language

The reader will observe that the exponential series has the property of reproducing itself when every term is differentiated, and that no other series of powers of x would possess this property.

— G. H. Hardy, §219

Summary

Summary
  • ex=∑n≥0xn/n!e^x = \sum_{n \ge 0} x^n/n! for every real xx; in particular e=∑1/n!e = \sum 1/n!, and ax=∑(xlog⁡a)n/n!a^x = \sum (x\log a)^n/n!.
  • Taylor proof: the Lagrange remainder is at most e∣x∣ ∣x∣n/n!e^{|x|}\,|x|^n/n!, and ∣x∣n/n!→0|x|^n/n! \to 0 because the factorial eventually wins.
  • Squeeze proof: (1+x/n)n<En(x)<(1−x/n)−n(1 + x/n)^n < E_n(x) < (1 - x/n)^{-n} for x>0x > 0, n>xn > x; both bounds tend to exe^x.
  • For large xx the terms first rise, peaking at n=[x]n = [x], so many terms are needed; for small xx convergence is extremely fast.
  • One term of the series already gives useful inequalities: ex>xn/n!e^x > x^n/n!, n!>(n/e)nn! > (n/e)^n; and the series shows that ee is irrational.