MATH1231 6,811 words·35 min read

Taylor Series

4.1 Taylor polynomials#

Polynomials are the nicest functions there are. You can evaluate one with a finite number of additions and multiplications, you can differentiate and integrate one in your head, and the results are polynomials again. Almost nothing else is that well behaved, which raises an obvious question: given some function that is not a polynomial, can we find a polynomial that behaves nearly the same?

The motivating problem is embarrassingly concrete. Recall that f(x)=exf(x) = e^x is defined as the inverse of ln⁡\ln, and ln⁡\ln is itself defined by an integral. So how does one actually evaluate e0.1e^{0.1}? (If the answer is "use a calculator", then we simply ask how the calculator does it.)

One approach is to set y=e0.1y = e^{0.1}, so that we must solve ln⁡y=0.1\ln y = 0.1, i.e. the integral equation

∫1ydtt=0.1,\int_1^y \frac{dt}{t} = 0.1,

guessing a value of yy and checking it with Riemann sums. This is clearly a hopeless way to go about it.

A far better idea is one you have already met: approximate ff locally by a linear function, using the fact that the tangent line hugs the graph near the point of contact. For f(x)=exf(x) = e^x the tangent at 00 is

p1(x)=1+x,p_1(x) = 1 + x,

so ex≈1+xe^x \approx 1 + x near 00, giving e0.1≈1.1e^{0.1} \approx 1.1. The thing to notice is why p1p_1 was the right line: it is the unique degree-11 polynomial whose value and gradient at 00 match those of ff,

p1(0)=f(0),p1′(0)=f′(0).p_1(0) = f(0), \qquad p_1'(0) = f'(0).

That immediately suggests how to do better. Ask for a degree-22 polynomial p2(x)=b0+b1x+b2x2p_2(x) = b_0 + b_1x + b_2x^2 matching the value, gradient and concavity of ff at 00:

p2(0)=f(0),p2′(0)=f′(0),p2′′(0)=f′′(0).p_2(0) = f(0), \qquad p_2'(0) = f'(0), \qquad p_2''(0) = f''(0).

Differentiating, p2′(x)=b1+2b2xp_2'(x) = b_1 + 2b_2x and p2′′(x)=2b2p_2''(x) = 2b_2, so evaluating at 00 gives b0=1b_0 = 1, b1=1b_1 = 1 and 2b2=12b_2 = 1. Hence

p2(x)=1+x+x22,p_2(x) = 1 + x + \frac{x^2}{2},

and e0.1≈p2(0.1)=1.105e^{0.1} \approx p_2(0.1) = 1.105, which is noticeably better. Continuing with a cubic p3p_3 and matching one more derivative gives a better approximation again.

Basically, each extra derivative you force to agree buys you one more order of contact with the graph, and the approximation hugs the curve over a wider interval. Running this argument for a general degree nn gives the pattern: if pn(x)=∑k=0nckxkp_n(x) = \sum_{k=0}^n c_k x^k then pn(k)(0)=k! ckp_n^{(k)}(0) = k!\,c_k, so matching pn(k)(0)=f(k)(0)p_n^{(k)}(0) = f^{(k)}(0) forces ck=f(k)(0)k!c_k = \frac{f^{(k)}(0)}{k!}. There is nothing special about the point 00, so we make the general definition.

Note

Definition
Suppose ff is nn times differentiable at aa. The nnth Taylor polynomial of ff about aa is

pn(x)=f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)n=∑k=0nf(k)(a)k!(x−a)k.p_n(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^n = \sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k.

When a=0a = 0 it is also called the nnth Maclaurin polynomial of ff.

The factor of 1k!\frac{1}{k!} is not decoration; it is exactly what cancels the k!k! produced by differentiating xkx^k down to a constant kk times. Forgetting it is the single most common slip in this section.

Example. Find the nnth Maclaurin polynomial of f(x)=exf(x) = e^x.
Every derivative of exe^x is exe^x, so f(k)(0)=e0=1f^{(k)}(0) = e^0 = 1 for every kk. Therefore

pn(x)=∑k=0nxkk!=1+x+x22!+x33!+⋯+xnn!,p_n(x) = \sum_{k=0}^{n}\frac{x^k}{k!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots + \frac{x^n}{n!},

which is exactly the pattern we found by hand above.

Example. Find the Maclaurin polynomials of f(x)=sin⁡xf(x) = \sin x.
The derivatives cycle with period four, which is what makes this one clean:

kk f(k)(x)f^{(k)}(x) f(k)(0)f^{(k)}(0)
00 sin⁡x\sin x 00
11 cos⁡x\cos x 11
22 −sin⁡x-\sin x 00
33 −cos⁡x-\cos x −1-1
44 sin⁡x\sin x 00

and then it repeats. So every even-index coefficient vanishes and the odd ones alternate in sign:

pn(x)=x−x33!+x55!−x77!+⋯(n odd).p_n(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots \quad (n \text{ odd}).

Therefore the Maclaurin polynomials of sin⁡\sin contain only odd powers. Notice this had to happen; sin⁡\sin is an odd function, and the Taylor polynomial about 00 of an odd function contains only odd powers, while that of an even function contains only even powers. Checking this parity is a free sanity check on any Maclaurin computation.

Example. Find the nnth Maclaurin polynomial of g(x)=ln⁡(1+x)g(x) = \ln(1+x).
Differentiating repeatedly,

g′(x)=(1+x)−1,g′′(x)=−(1+x)−2,g′′′(x)=2(1+x)−3,g(4)(x)=−6(1+x)−4,\begin{align*} g'(x) &= (1+x)^{-1}, \\ g''(x) &= -(1+x)^{-2}, \\ g'''(x) &= 2(1+x)^{-3}, \\ g^{(4)}(x) &= -6(1+x)^{-4}, \end{align*}

and in general g(k)(x)=(−1)k−1(k−1)! (1+x)−kg^{(k)}(x) = (-1)^{k-1}(k-1)!\,(1+x)^{-k} for k≥1k \geq 1, so g(k)(0)=(−1)k−1(k−1)!g^{(k)}(0) = (-1)^{k-1}(k-1)!. Dividing by k!k! leaves just (−1)k−1k\frac{(-1)^{k-1}}{k}, and since g(0)=ln⁡1=0g(0) = \ln 1 = 0,

qn(x)=x−x22+x33−x44+⋯+(−1)n−1xnn.q_n(x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \cdots + (-1)^{n-1}\frac{x^n}{n}.

Therefore the coefficients decay only like 1k\frac{1}{k}, not like 1k!\frac{1}{k!}. Keep this contrast with exe^x in mind — it is the whole reason the next section exists. The factorial in the denominator of the exponential's coefficients crushes the terms very fast; a mere 1k\frac1k does not, and we will see that ln⁡(1+x)\ln(1+x) pays for this with a much smaller range of usefulness.

Example. Find the Taylor polynomial of degree 33 for f(x)=xf(x) = \sqrt{x} about a=4a = 4, and use it to estimate 4.2\sqrt{4.2}.
Here we expand about 44 rather than 00, because 44 is a perfect square close to 4.24.2. Differentiating,

f(x)=x1/2,f(4)=2,f′(x)=12x−1/2,f′(4)=14,f′′(x)=−14x−3/2,f′′(4)=−132,f′′′(x)=38x−5/2,f′′′(4)=3256.\begin{align*} f(x) &= x^{1/2}, & f(4) &= 2, \\ f'(x) &= \tfrac12 x^{-1/2}, & f'(4) &= \tfrac14, \\ f''(x) &= -\tfrac14 x^{-3/2}, & f''(4) &= -\tfrac{1}{32}, \\ f'''(x) &= \tfrac38 x^{-5/2}, & f'''(4) &= \tfrac{3}{256}. \end{align*}

So

p3(x)=2+14(x−4)−164(x−4)2+1512(x−4)3,p_3(x) = 2 + \frac{1}{4}(x-4) - \frac{1}{64}(x-4)^2 + \frac{1}{512}(x-4)^3,

using f′′(4)2!=−164\frac{f''(4)}{2!} = -\frac{1}{64} and f′′′(4)3!=3256×6=1512\frac{f'''(4)}{3!} = \frac{3}{256 \times 6} = \frac{1}{512}. Putting x=4.2x = 4.2,

p3(4.2)=2+0.24−0.0464+0.008512=2+0.05−0.000625+0.000015625=2.049390625.\begin{align*} p_3(4.2) &= 2 + \frac{0.2}{4} - \frac{0.04}{64} + \frac{0.008}{512} \\ &= 2 + 0.05 - 0.000625 + 0.000015625 \\ &= 2.049390625. \end{align*}

The true value is 4.2=2.04939015…\sqrt{4.2} = 2.04939015\ldots, so we are right to seven decimal places. Therefore 4.2≈2.0493906\sqrt{4.2} \approx 2.0493906. Choosing the centre aa well is most of the battle: expanding about 00 would have been useless here, since x\sqrt{x} is not even differentiable at 00.

4.2 Taylor's theorem#

All of the last section was optimism. We produced polynomials that agree with ff to high order at a single point and then cheerfully evaluated them somewhere else, with no guarantee whatsoever about how wrong the answer might be.

Suppose a calculator with a ten-digit display uses Taylor polynomials to compute e0.1e^{0.1}. What degree should it use so that every displayed digit is correct? And crucially — is there a way to answer that without already knowing the decimal expansion of e0.1e^{0.1}? If we had to know the answer to bound the error, the whole enterprise would be circular.

Two cautionary examples show how badly intuition can fail here. For f(x)=sin⁡xf(x) = \sin x, the Maclaurin polynomials pnp_n approximate f(7)f(7) well once nn reaches about 1919 or 2121 — even though 77 is nowhere near 00, and even though the intermediate polynomials are wildly wrong there. But for g(x)=ln⁡(1+x)g(x) = \ln(1+x), the Maclaurin polynomials approximate gg beautifully on roughly (−0.7,0.7)(-0.7, 0.7), tolerably on (0.7,1)(0.7, 1), and to the right of 11 they are useless — and worse, the higher-degree polynomials are further from gg there than the lower-degree ones. So "take more terms" is not a universally safe strategy, and we need something rigorous.

What we want is an exact expression for the difference f(x)−pn(x)f(x) - p_n(x). Remarkably, repeated integration by parts delivers one. Suppose ff has n+1n+1 continuous derivatives on an open interval II containing 00, and fix x∈Ix \in I. Start from the fundamental theorem of calculus,

∫0xf′(t) dt=f(x)−f(0).(1)\int_0^x f'(t)\,dt = f(x) - f(0). \tag{1}

Now evaluate that same integral by parts, with the deliberately odd choice v=−(x−t)v = -(x-t) (any antiderivative of 11 will do, and this one is engineered to vanish at t=xt = x):

u=f′(t),v=−(x−t),dudt=f′′(t),dvdt=1,\begin{align*} u &= f'(t), & v &= -(x-t), \\ \frac{du}{dt} &= f''(t), & \frac{dv}{dt} &= 1, \end{align*}

so

∫0xf′(t) dt=[−f′(t)(x−t)]0x+∫0xf′′(t)(x−t) dt=f′(0)x+∫0xf′′(t)(x−t) dt.\begin{align*} \int_0^x f'(t)\,dt &= \Big[-f'(t)(x-t)\Big]_0^x + \int_0^x f''(t)(x-t)\,dt \\ &= f'(0)x + \int_0^x f''(t)(x-t)\,dt. \tag{2} \end{align*}

Comparing (1)(1) and (2)(2),

f(x)=f(0)+f′(0)x+∫0xf′′(t)(x−t) dt,f(x) = f(0) + f'(0)x + \int_0^x f''(t)(x-t)\,dt,

where the first two terms are exactly p1(x)p_1(x) and the integral is exactly the error. Integrating by parts again with u=f′′(t)u = f''(t) and v=−12(x−t)2v = -\frac{1}{2}(x-t)^2 gives

f(x)=f(0)+f′(0)x+f′′(0)2!x2+12!∫0xf′′′(t)(x−t)2 dt,f(x) = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{1}{2!}\int_0^x f'''(t)(x-t)^2\,dt,

and now the pattern is clear. After nn steps we have pnp_n plus a single leftover integral.

Note

Theorem (Taylor's theorem)
Suppose ff has n+1n+1 continuous derivatives on an open interval II containing aa. Then for each x∈Ix \in I,

f(x)=pn(x)+Rn+1(x),f(x) = p_n(x) + R_{n+1}(x),

where pnp_n is the nnth Taylor polynomial of ff about aa and the remainder term is

Rn+1(x)=1n!∫axf(n+1)(t)(x−t)n dt.R_{n+1}(x) = \frac{1}{n!}\int_a^x f^{(n+1)}(t)(x-t)^n\,dt.

So the error in f(x)≈pn(x)f(x) \approx p_n(x) is exactly Rn+1(x)R_{n+1}(x) — no approximation, no hand-waving. The catch is that this integral is usually impossible to evaluate, since it involves the very function we could not handle in the first place. Fortunately there is a much more usable form.

Note

Corollary (Lagrange formula for the remainder)
Suppose ff has n+1n+1 continuous derivatives on an open interval II containing aa. Then for each x∈Ix \in I,

f(x)=pn(x)+Rn+1(x),Rn+1(x)=f(n+1)(c)(n+1)!(x−a)n+1f(x) = p_n(x) + R_{n+1}(x), \qquad R_{n+1}(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}

for some real number cc between aa and xx.

Basically, the remainder looks exactly like "the next term of the Taylor polynomial", except that the derivative is evaluated at some mystery point cc instead of at aa. In almost every problem it is impossible to find cc exactly — and you never need to. You only need to know where cc lives, namely between aa and xx, which is enough to bound ∣f(n+1)(c)∣|f^{(n+1)}(c)| and hence bound the error. That is the entire technique of this section.

Notice that Taylor's theorem with Lagrange remainder generalises the mean value theorem: taking n=0n = 0 gives f(x)−f(a)=f′(c)(x−a)f(x) - f(a) = f'(c)(x-a), i.e.

f(x)−f(a)x−a=f′(c)\frac{f(x)-f(a)}{x-a} = f'(c)

for some cc between aa and xx, which is the MVT exactly.

Example. Let f(x)=cos⁡xf(x) = \cos x. Using the second Taylor polynomial about 00, estimate f ⁣(15)f\!\left(\frac15\right) and find an upper bound for the error.
The second Taylor polynomial is

p2(x)=f(0)+f′(0)x+f′′(0)2!x2=cos⁡0−(sin⁡0)x−cos⁡02!x2=1−x22,\begin{align*} p_2(x) &= f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 \\ &= \cos 0 - (\sin 0)x - \frac{\cos 0}{2!}x^2 \\ &= 1 - \frac{x^2}{2}, \end{align*}

so cos⁡15≈p2 ⁣(15)=1−150=4950\cos\frac15 \approx p_2\!\left(\frac15\right) = 1 - \frac{1}{50} = \frac{49}{50}. For the error, apply the Lagrange formula with n=2n = 2, noting f′′′(x)=sin⁡xf'''(x) = \sin x:

∣error∣=∣f(1/5)−p2(1/5)∣=∣R3(1/5)∣=∣f′′′(c)3!(15)3∣(for some c∈[0,1/5])=∣sin⁡c∣6×1125≤16×1125(since ∣sin⁡c∣≤1)=1750≈0.001333.\begin{align*} |\text{error}| &= \left|f(1/5) - p_2(1/5)\right| \\ &= |R_3(1/5)| \\ &= \left|\frac{f'''(c)}{3!}\left(\tfrac15\right)^3\right| \quad (\text{for some } c \in [0, 1/5]) \\ &= \frac{|\sin c|}{6}\times\frac{1}{125} \\ &\leq \frac{1}{6}\times\frac{1}{125} \quad (\text{since } |\sin c| \leq 1) \\ &= \frac{1}{750} \approx 0.001333. \end{align*}

Therefore cos⁡15≈4950\cos\frac15 \approx \frac{49}{50} with error at most 1750\frac{1}{750}.

That bound is quite crude, because ∣sin⁡c∣≤1|\sin c| \leq 1 throws away everything we know about where cc is. Using instead the sharper inequality sin⁡t<t\sin t < t for t>0t > 0, we get sin⁡c<c<15\sin c < c < \frac15, and hence

∣error∣<16×15×1125=13750≈0.0002667.|\text{error}| < \frac{1}{6}\times\frac15\times\frac{1}{125} = \frac{1}{3750} \approx 0.0002667.

(The true error is about 0.00006660.0000666, so even this is conservative.) Any valid bound on ∣f(n+1)(c)∣|f^{(n+1)}(c)| over the relevant interval gives a valid error bound; the tighter your bound on the derivative, the tighter your answer, and marks are usually given for a correct bound rather than the tightest one.

Example. A calculator with a ten-digit display uses a Maclaurin polynomial to estimate e0.1e^{0.1}. What degree polynomial guarantees that every displayed digit is correct?
Let f(x)=exf(x) = e^x. By Taylor's theorem, ex=pn(x)+Rn+1(x)e^x = p_n(x) + R_{n+1}(x) with

pn(x)=1+x+x22!+⋯+xnn!,Rn+1(x)=ec(n+1)!xn+1p_n(x) = 1 + x + \frac{x^2}{2!} + \cdots + \frac{x^n}{n!}, \qquad R_{n+1}(x) = \frac{e^c}{(n+1)!}x^{n+1}

for some cc between 00 and xx. To be sure of ten displayed digits it suffices that

∣Rn+1(0.1)∣<10−10.|R_{n+1}(0.1)| < 10^{-10}.

Now bound the remainder without ever computing e0.1e^{0.1}:

∣Rn+1(0.1)∣=ec(n+1)!(0.1)n+1(for some c∈[0,0.1])≤e0.1(n+1)!(0.1)n+1(since exp⁡ is increasing)<2(n+1)!(0.1)n+1(since e0.1<30.1<31/2<2)=2(n+1)! 10−(n+1).\begin{align*} |R_{n+1}(0.1)| &= \frac{e^c}{(n+1)!}(0.1)^{n+1} \quad (\text{for some } c \in [0, 0.1]) \\ &\leq \frac{e^{0.1}}{(n+1)!}(0.1)^{n+1} \quad (\text{since } \exp \text{ is increasing}) \\ &< \frac{2}{(n+1)!}(0.1)^{n+1} \quad (\text{since } e^{0.1} < 3^{0.1} < 3^{1/2} < 2) \\ &= \frac{2}{(n+1)!}\,10^{-(n+1)}. \end{align*}

Since 2(n+1)!<1\frac{2}{(n+1)!} < 1 whenever n≥1n \geq 1, a very crude conclusion is ∣Rn+1(0.1)∣<10−(n+1)|R_{n+1}(0.1)| < 10^{-(n+1)}, which already gives n=9n = 9. But we can do better by not throwing the factorial away. Testing values:

nn 2(n+1)!10−(n+1)\dfrac{2}{(n+1)!}10^{-(n+1)}
44 1.67×10−71.67\times10^{-7}
55 2.78×10−92.78\times10^{-9}
66 3.97×10−113.97\times10^{-11}

Therefore n=6n = 6 is the first degree that works, and the calculator should display the first ten digits of p6(0.1)p_6(0.1). Notice that at no point did we use the decimal expansion of e0.1e^{0.1} — which was exactly the requirement, and is what makes error bounds genuinely useful rather than circular.

4.2.1 Classifying stationary points#

Taylor's theorem also repairs a gap you may have noticed in the second derivative test. The function f(x)=(x−3)4f(x) = (x-3)^4 has a stationary point at 33, but f′′(3)=0f''(3) = 0, so the second derivative test is silent — even though it is obvious from the formula that 33 is a minimum. The fix is to keep differentiating until something is non-zero.

Note

Corollary
Suppose ff is nn times differentiable at aa, that f′(a)=0f'(a) = 0, and that

f′′(a)=f′′′(a)=⋯=f(k−1)(a)=0butf(k)(a)≠0,f''(a) = f'''(a) = \cdots = f^{(k-1)}(a) = 0 \quad \text{but} \quad f^{(k)}(a) \neq 0,

where k≤nk \leq n. Then
(i) aa is a local minimum point if kk is even and f(k)(a)>0f^{(k)}(a) > 0;
(ii) aa is a local maximum point if kk is even and f(k)(a)<0f^{(k)}(a) < 0;
(iii) aa is a horizontal point of inflexion if kk is odd.

Sketch proof. Assume additionally that f(k)f^{(k)} exists near aa and is continuous at aa. Taylor's theorem with Lagrange remainder gives

f(x)=f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+⋯+f(k−1)(a)(k−1)!(x−a)k−1+f(k)(c)k!(x−a)k=f(a)+0+0+⋯+0+f(k)(c)k!(x−a)k=f(a)+f(k)(c)k!(x−a)k\begin{align*} f(x) &= f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(k-1)}(a)}{(k-1)!}(x-a)^{k-1} + \frac{f^{(k)}(c)}{k!}(x-a)^k \\ &= f(a) + 0 + 0 + \cdots + 0 + \frac{f^{(k)}(c)}{k!}(x-a)^k \\ &= f(a) + \frac{f^{(k)}(c)}{k!}(x-a)^k \end{align*}

for some cc between xx and aa, since every middle term vanishes by hypothesis. For case (i): if kk is even then (x−a)k>0(x-a)^k > 0 for x≠ax \neq a; and since f(k)(a)>0f^{(k)}(a) > 0 with f(k)f^{(k)} continuous at aa, we have f(k)(c)>0f^{(k)}(c) > 0 for all xx (and hence cc) sufficiently close to aa. Combining, f(x)≥f(a)f(x) \geq f(a) near aa, so aa is a local minimum. Cases (ii) and (iii) go the same way. ■\blacksquare

Basically, near aa the function looks exactly like f(a)+(constant)(x−a)kf(a) + (\text{constant})(x-a)^k, so the shape of the stationary point is decided entirely by the parity of kk and the sign of that constant — an even power sits on one side of its vertex, an odd power passes straight through.

Example. You are given that 33 is a stationary point of

f(x)=x7−17x6+101x5−229x4+3x3+621x2−297x−567.f(x) = x^7 - 17x^6 + 101x^5 - 229x^4 + 3x^3 + 621x^2 - 297x - 567.

Classify it.
Differentiating and evaluating at 33 gives

f′(3)=f′′(3)=f′′′(3)=0,f(4)(3)=−1536≠0,f'(3) = f''(3) = f'''(3) = 0, \qquad f^{(4)}(3) = -1536 \neq 0,

so the corollary applies with k=4k = 4. Since kk is even and f(4)(3)<0f^{(4)}(3) < 0, we are in case (ii). Therefore 33 is a local maximum point of ff. Note how useless the ordinary second derivative test was here; it would have reported f′′(3)=0f''(3) = 0 and stopped.

4.2.2 Some questions arising from Taylor's theorem#

Return to the calculator problem. We showed

e0.1=1+(0.1)+(0.1)22!+(0.1)33!+⋯+(0.1)nn!+Rn+1(0.1),(3)e^{0.1} = 1 + (0.1) + \frac{(0.1)^2}{2!} + \frac{(0.1)^3}{3!} + \cdots + \frac{(0.1)^n}{n!} + R_{n+1}(0.1), \tag{3}

with

0<∣Rn+1(0.1)∣<210n+1(n+1)!.0 < |R_{n+1}(0.1)| < \frac{2}{10^{n+1}(n+1)!}.

That bound plainly shrinks to nothing as nn grows, so it seems reasonable to expect Rn+1(0.1)→0R_{n+1}(0.1) \to 0, and letting n→∞n \to \infty in (3)(3) suggests the striking identity

e0.1=1+(0.1)+(0.1)22!+(0.1)33!+(0.1)44!+⋯ ,e^{0.1} = 1 + (0.1) + \frac{(0.1)^2}{2!} + \frac{(0.1)^3}{3!} + \frac{(0.1)^4}{4!} + \cdots,

an infinite sum equalling an exact value. But every word of that sentence needs justification, which sets the agenda for the rest of the chapter:

  • What does Rn+1(0.1)→0R_{n+1}(0.1) \to 0 as n→∞n \to \infty actually mean? More generally, given a list of numbers a1,a2,a3,…a_1, a_2, a_3, \dots, how do we pin down the limiting behaviour of ana_n? This is Section 4.3.
  • What does an infinite sum mean, and how do we tell whether one converges to a real number or diverges? This is Sections 4.4 and 4.5.
  • For which xx does lim⁡n→∞Rn+1(x)=0\lim_{n\to\infty}R_{n+1}(x) = 0, and when the infinite series converges, does it converge to f(x)f(x) itself? The ln⁡(1+x)\ln(1+x) picture warns that the answer is not always yes. This is Sections 4.6 to 4.8.

4.3 Sequences#

A sequence is a real-valued function defined on (a subset of) the natural numbers. So f:N→Rf : \mathbb{N} \to \mathbb{R} with f(n)=n2f(n) = n^2 is a sequence; but for sequences we traditionally write ana_n rather than a(n)a(n), and denote the whole object by {an}\{a_n\} or {an}n=0∞\{a_n\}_{n=0}^{\infty}.

Example. The Fibonacci sequence is defined recursively by a0=0a_0 = 0, a1=1a_1 = 1 and an+2=an+1+ana_{n+2} = a_{n+1} + a_n, giving {0,1,1,2,3,5,8,13,… }\{0, 1, 1, 2, 3, 5, 8, 13, \dots\}. Not every sequence comes with a formula for ana_n.

4.3.1 Describing the limiting behaviour of sequences#

Our objective is to describe what ana_n does as n→∞n \to \infty. There are two broad outcomes: either ana_n approaches a finite number LL, in which case {an}\{a_n\} is convergent and we write lim⁡n→∞an=L\lim_{n\to\infty}a_n = L; or it does not, in which case {an}\{a_n\} is divergent. Divergent sequences subdivide:

  • if an→∞a_n \to \infty, the sequence diverges to infinity;
  • if an→−∞a_n \to -\infty, it diverges to negative infinity;
  • if {an}\{a_n\} has no limit but stays bounded, it is boundedly divergent;
  • if none of the above, it is unboundedly divergent.

Example. Describe the behaviour of each sequence as n→∞n \to \infty.
(a) an=n3a_n = n^3; (b) an=sin⁡(nπ/2)a_n = \sin(n\pi/2); (c) an=3n2n2+4n+3a_n = \dfrac{3n^2}{n^2+4n+3}; (d) an=(−1)n2na_n = (-1)^n2^n.

(a) an→∞a_n \to \infty, so {an}\{a_n\} diverges to infinity.

(b) The terms run {0,1,0,−1,0,1,0,−1,… }\{0, 1, 0, -1, 0, 1, 0, -1, \dots\}, which is bounded but has no limit; so {an}\{a_n\} is boundedly divergent.

(c) Dividing top and bottom by n2n^2,

3n2n2+4n+3=31+4/n+3/n2→31+0+0=3,\frac{3n^2}{n^2+4n+3} = \frac{3}{1 + 4/n + 3/n^2} \to \frac{3}{1+0+0} = 3,

so {an}\{a_n\} converges to 33.

(d) The terms run {1,−2,4,−8,16,−32,… }\{1, -2, 4, -8, 16, -32, \dots\}, which is unbounded, and the even terms head to +∞+\infty while the odd terms head to −∞-\infty. Therefore {an}\{a_n\} is unboundedly divergent.

Note

Definition (formal limit of a sequence)
Suppose {an}n=0∞\{a_n\}_{n=0}^{\infty} is a sequence of real numbers and L∈RL \in \mathbb{R}. We write lim⁡n→∞an=L\lim_{n\to\infty}a_n = L if, for every positive number ε\varepsilon, there is a number MM such that

∣an−L∣<εwhenever n>M.|a_n - L| < \varepsilon \quad \text{whenever } n > M.

Basically, draw any horizontal band of half-width ε\varepsilon around the height LL, however thin; the definition says the sequence eventually enters that band and never leaves. The crucial logical order is that ε\varepsilon comes first and MM is allowed to depend on it — a thinner band is allowed to need a longer wait.

4.3.2 Techniques for calculating limits of sequences#

Most of the machinery you learned for limits of functions transfers directly.

Note

Proposition (limit laws)
Suppose lim⁡n→∞an\lim_{n\to\infty}a_n and lim⁡n→∞bn\lim_{n\to\infty}b_n both exist. Then

(i)lim⁡n→∞(an+bn)=lim⁡n→∞an+lim⁡n→∞bn;(ii)lim⁡n→∞(anbn)=lim⁡n→∞an×lim⁡n→∞bn;(iii)lim⁡n→∞anbn=lim⁡n→∞anlim⁡n→∞bn, provided lim⁡n→∞bn≠0 and bn≠0 for all n;(iv)lim⁡n→∞(αan)=αlim⁡n→∞an for every α∈R.\begin{align*} \text{(i)} \quad &\lim_{n\to\infty}(a_n + b_n) = \lim_{n\to\infty}a_n + \lim_{n\to\infty}b_n; \\ \text{(ii)} \quad &\lim_{n\to\infty}(a_nb_n) = \lim_{n\to\infty}a_n \times \lim_{n\to\infty}b_n; \\ \text{(iii)} \quad &\lim_{n\to\infty}\frac{a_n}{b_n} = \frac{\lim_{n\to\infty}a_n}{\lim_{n\to\infty}b_n}, \text{ provided } \lim_{n\to\infty}b_n \neq 0 \text{ and } b_n \neq 0 \text{ for all } n; \\ \text{(iv)} \quad &\lim_{n\to\infty}(\alpha a_n) = \alpha\lim_{n\to\infty}a_n \text{ for every } \alpha \in \mathbb{R}. \end{align*}

Every one of these requires the individual limits to exist first. Writing lim⁡(anbn)=lim⁡an×lim⁡bn\lim(a_nb_n) = \lim a_n \times \lim b_n when one factor diverges is meaningless, and is where marks go missing.

Example. Let an=n2+4n−na_n = \sqrt{n^2+4n} - n. Find the limiting behaviour of ana_n.
This is an ∞−∞\infty - \infty form, so the limit laws do not apply directly; we rationalise, exactly as we would for the corresponding function limit:

an=n2+4n−n=(n2+4n−n)(n2+4n+n)n2+4n+n(multiplying by the conjugate)=n2+4n−n2n2+4n+n(difference of two squares)=4nn2+4n+n=41+4/n+1(dividing top and bottom by n).\begin{align*} a_n &= \sqrt{n^2+4n} - n \\ &= \frac{\left(\sqrt{n^2+4n}-n\right)\left(\sqrt{n^2+4n}+n\right)}{\sqrt{n^2+4n}+n} \quad (\text{multiplying by the conjugate}) \\ &= \frac{n^2+4n-n^2}{\sqrt{n^2+4n}+n} \quad (\text{difference of two squares}) \\ &= \frac{4n}{\sqrt{n^2+4n}+n} \\ &= \frac{4}{\sqrt{1+4/n}+1} \quad (\text{dividing top and bottom by } n). \end{align*}

Since 4/n→04/n \to 0, the limit laws now apply and an→41+1=2a_n \to \frac{4}{1+1} = 2. Therefore {an}\{a_n\} converges to 22. (Numerically, a10000=1.9998a_{10000} = 1.9998, which agrees.)

Note

Proposition
Suppose lim⁡n→∞an=a\lim_{n\to\infty}a_n = a and ff is continuous at aa. Then lim⁡n→∞f(an)=f(a)\lim_{n\to\infty}f(a_n) = f(a).

Note

Proposition
Suppose {an}\{a_n\} is a sequence and ff is a function defined on some interval [N,∞)[N, \infty) with f(n)=anf(n) = a_n for every integer n≥Nn \geq N. If lim⁡x→∞f(x)=L\lim_{x\to\infty}f(x) = L then lim⁡n→∞an=L\lim_{n\to\infty}a_n = L.

This last one is what lets us use l'Hôpital's rule on sequences, which is otherwise illegal — you cannot differentiate a function of a discrete variable. The implication only runs one way. If the function limit fails to exist, the sequence limit may still exist perfectly well; for instance f(x)=sin⁡(πx)f(x) = \sin(\pi x) has no limit as x→∞x \to \infty, but an=sin⁡(πn)=0a_n = \sin(\pi n) = 0 for every integer nn, so an→0a_n \to 0.

Example. Let an=(1+1n)na_n = \left(1 + \frac1n\right)^n. Find lim⁡n→∞an\lim_{n\to\infty}a_n.
Set f(x)=(1+1x)xf(x) = \left(1+\frac1x\right)^x, which is the corresponding function. This is a 1∞1^\infty indeterminate form, so take logarithms:

ln⁡f(x)=xln⁡(1+1x)=ln⁡(1+1/x)1/x,\ln f(x) = x\ln\left(1+\frac1x\right) = \frac{\ln(1+1/x)}{1/x},

which is a 00\frac00 form as x→∞x \to \infty. By l'Hôpital's rule,

lim⁡x→∞ln⁡f(x)=lim⁡x→∞11+1/x⋅(−1x2)−1x2=lim⁡x→∞11+1/x=1.\begin{align*} \lim_{x\to\infty}\ln f(x) &= \lim_{x\to\infty}\frac{\frac{1}{1+1/x}\cdot\left(-\frac{1}{x^2}\right)}{-\frac{1}{x^2}} \\ &= \lim_{x\to\infty}\frac{1}{1+1/x} \\ &= 1. \end{align*}

Since exp⁡\exp is continuous, f(x)→e1=ef(x) \to e^1 = e, and hence by the function-to-sequence proposition, an→ea_n \to e. Therefore lim⁡n→∞(1+1n)n=e\lim_{n\to\infty}\left(1+\frac1n\right)^n = e. (Checking, a100000=2.718268…a_{100000} = 2.718268\ldots, against e=2.718281…e = 2.718281\ldots)

Note

Proposition (the pinching theorem for sequences)
Suppose {an}\{a_n\}, {bn}\{b_n\} and {cn}\{c_n\} are sequences with an≤bn≤cna_n \leq b_n \leq c_n for all sufficiently large nn, and that

lim⁡n→∞an=lim⁡n→∞cn=L.\lim_{n\to\infty}a_n = \lim_{n\to\infty}c_n = L.

Then lim⁡n→∞bn=L\lim_{n\to\infty}b_n = L.

Example. Find lim⁡n→∞sin⁡(n2+n)n\lim_{n\to\infty}\dfrac{\sin(n^2+n)}{n}.
We cannot say anything sensible about sin⁡(n2+n)\sin(n^2+n) itself, but we do not need to; we only need that it is trapped. Since −1≤sin⁡θ≤1-1 \leq \sin\theta \leq 1 for all θ\theta,

−1n≤sin⁡(n2+n)n≤1n-\frac1n \leq \frac{\sin(n^2+n)}{n} \leq \frac1n

for all n≥1n \geq 1, and both outer sequences tend to 00. Therefore by the pinching theorem the limit is 00. Whenever a bounded but wildly behaved factor is divided by something growing, reach for pinching; trying to compute the oscillating part is a trap.

It is worth having a feel for the relative speeds at which standard sequences grow, since a great many limits are settled by nothing more than knowing which of two expressions wins:

ln⁡n ≪ np ≪ cn ≪ n! ≪ nn(p>0, c>1),\boxed{\ln n \ \ll \ n^p \ \ll \ c^n \ \ll \ n! \ \ll \ n^n \qquad (p > 0,\ c > 1),}

where ≪\ll means the left-hand side is eventually negligible compared with the right. In particular cnn!→0\frac{c^n}{n!} \to 0 for every fixed cc, which is precisely the fact that makes the exponential's remainder term vanish.

Note

Definition
A sequence {an}\{a_n\} is increasing if an≤an+1a_n \leq a_{n+1} for all nn, decreasing if an≥an+1a_n \geq a_{n+1} for all nn, and monotonic if it is one or the other. It is bounded if there is some KK with ∣an∣≤K|a_n| \leq K for all nn.

Note

Theorem (monotone convergence)
If {an}n=0∞\{a_n\}_{n=0}^{\infty} is a bounded monotonic sequence of real numbers, then it converges.

Basically, an increasing sequence with a ceiling has nowhere to go but up towards some limit; it cannot oscillate, because it is monotonic, and it cannot escape, because it is bounded. This is the one convergence result that does not require you to know the limit in advance, which makes it invaluable for recursively defined sequences where no formula for ana_n exists.

4.3.3 [X] Suprema and infima#

The monotone convergence theorem rests on a deep property of R\mathbb{R} that we should state properly.

Note

Definition
Suppose {an}\{a_n\} is a sequence of real numbers. A number UU is an upper bound if an≤Ua_n \leq U for all nn, and a lower bound if an≥La_n \geq L for all nn. The least upper bound (or supremum) is the smallest such UU, and the greatest lower bound (or infimum) is the largest such LL.

Note

Fact (the least upper bound axiom)
Every non-empty set of real numbers that is bounded above has a least upper bound in R\mathbb{R}.

This is an axiom of the real numbers, not a theorem — and it is exactly what Q\mathbb{Q} lacks. The rationals less than 2\sqrt2 are bounded above but have no least rational upper bound, which is precisely the hole that R\mathbb{R} was built to fill.

Example. Find the greatest lower bound and least upper bound of {an}n=1∞\{a_n\}_{n=1}^{\infty} where an=1na_n = \frac{1}{n}.
The terms are 1,12,13,…1, \frac12, \frac13, \dots, all positive and all at most 11. The least upper bound is 11, and it is attained at n=1n=1. The greatest lower bound is 00: every an>0a_n > 0, so 00 is a lower bound; and no positive number ϵ\epsilon can be a lower bound, since 1n<ϵ\frac1n < \epsilon once n>1ϵn > \frac1\epsilon. Therefore sup⁡=1\sup = 1 and inf⁡=0\inf = 0. Notice the infimum is not attained — a supremum or infimum need not be a member of the sequence, which is exactly why "maximum" and "supremum" are different words.

Given this axiom, the monotone convergence theorem is nearly immediate for an increasing bounded sequence: let LL be the least upper bound of {an}\{a_n\}. For any ε>0\varepsilon > 0, L−εL - \varepsilon is not an upper bound, so some aM>L−εa_M > L - \varepsilon; and since the sequence increases and is capped by LL, every n>Mn > M has L−ε<aM≤an≤LL - \varepsilon < a_M \leq a_n \leq L, giving ∣an−L∣<ε|a_n - L| < \varepsilon.

4.4 Infinite series#

We can now say what an infinite sum means. The idea is the only sensible one available: add up finitely many terms, and see whether those running totals settle down.

Note

Definition
Suppose {ak}k=0∞\{a_k\}_{k=0}^{\infty} is a sequence of real numbers. For each nn, the nnth partial sum is

sn=a0+a1+⋯+an=∑k=0nak.s_n = a_0 + a_1 + \cdots + a_n = \sum_{k=0}^{n}a_k.

If the sequence of partial sums {sn}\{s_n\} converges to a real number ss, we say the series ∑k=0∞ak\sum_{k=0}^{\infty}a_k converges (or is summable) with sum ss, and write ∑k=0∞ak=s\sum_{k=0}^{\infty}a_k = s. Otherwise the series diverges.

A series is not a sum; it is the limit of a sequence of sums. Every question about series is secretly a question about the sequence {sn}\{s_n\}, and keeping that in mind resolves most of the confusion in this topic.

Example. Determine whether the geometric series ∑k=0∞rk\sum_{k=0}^{\infty}r^k converges, and find its sum when it does.
The partial sums have a closed form. For r≠1r \neq 1,

sn=1+r+r2+⋯+rn,rsn=r+r2+⋯+rn+rn+1,sn−rsn=1−rn+1,sn=1−rn+11−r.\begin{align*} s_n &= 1 + r + r^2 + \cdots + r^n, \\ rs_n &= r + r^2 + \cdots + r^n + r^{n+1}, \\ s_n - rs_n &= 1 - r^{n+1}, \\ s_n &= \frac{1-r^{n+1}}{1-r}. \end{align*}

Now rn+1→0r^{n+1} \to 0 if ∣r∣<1|r| < 1, and {rn+1}\{r^{n+1}\} diverges if ∣r∣>1|r| > 1 or r=−1r = -1; while for r=1r=1 we have sn=n+1→∞s_n = n+1 \to \infty. Therefore

∑k=0∞rk=11−r if ∣r∣<1, and the series diverges if ∣r∣≥1.\boxed{\sum_{k=0}^{\infty}r^k = \frac{1}{1-r} \text{ if } |r| < 1, \text{ and the series diverges if } |r| \geq 1.}

This is the single most useful series in the course, both in its own right and as the comparison against which other series are judged.

Example. Evaluate ∑k=1∞1k(k+1)\sum_{k=1}^{\infty}\dfrac{1}{k(k+1)}.
Partial fractions (see Section 2.4) give 1k(k+1)=1k−1k+1\frac{1}{k(k+1)} = \frac1k - \frac{1}{k+1}, so the partial sums telescope:

sn=∑k=1n(1k−1k+1)=(1−12)+(12−13)+⋯+(1n−1n+1)=1−1n+1,\begin{align*} s_n &= \sum_{k=1}^{n}\left(\frac1k - \frac{1}{k+1}\right) \\ &= \left(1 - \frac12\right) + \left(\frac12 - \frac13\right) + \cdots + \left(\frac1n - \frac{1}{n+1}\right) \\ &= 1 - \frac{1}{n+1}, \end{align*}

since every interior term cancels with its neighbour. Hence sn→1s_n \to 1. Therefore ∑k=1∞1k(k+1)=1\sum_{k=1}^{\infty}\frac{1}{k(k+1)} = 1. Geometric and telescoping series are essentially the only ones whose exact sum you can find by hand; for everything else the realistic goal is deciding convergence, not evaluating.

Note

Proposition
Suppose ∑k=0∞ak\sum_{k=0}^{\infty}a_k and ∑k=0∞bk\sum_{k=0}^{\infty}b_k are convergent series. Then

∑k=0∞(ak+bk)=∑k=0∞ak+∑k=0∞bk,∑k=0∞αak=α∑k=0∞ak(α∈R).\sum_{k=0}^{\infty}(a_k+b_k) = \sum_{k=0}^{\infty}a_k + \sum_{k=0}^{\infty}b_k, \qquad \sum_{k=0}^{\infty}\alpha a_k = \alpha\sum_{k=0}^{\infty}a_k \quad (\alpha \in \mathbb{R}).

Proof. Apply the corresponding limit laws to the sequences of partial sums, noting that the nnth partial sum of ∑(ak+bk)\sum(a_k+b_k) is exactly sn+tns_n + t_n where sn,tns_n, t_n are those of ∑ak\sum a_k and ∑bk\sum b_k. ■\blacksquare

It is worth recording one structural remark. While every term contributes to the value of a convergent series, only the tail matters for the question of convergence: the first hundred, thousand or billion terms are irrelevant to whether the series converges, since changing finitely many terms changes every partial sum past a point by the same fixed constant. This is why the tests below are all allowed to say "for all sufficiently large kk".

4.5 Tests for series convergence#

4.5.1 Some preliminary results on series summation#

Since exact sums are almost never available, we need tests that decide convergence from the shape of aka_k alone. The first one is free.

4.5.2 The kkth term divergence test#

Note

Theorem
If ∑k=0∞ak\sum_{k=0}^{\infty}a_k converges, then ak→0a_k \to 0 as k→∞k \to \infty.

Proof. Suppose ∑ak\sum a_k converges to LL, and let sns_n be the nnth partial sum, so sn→Ls_n \to L and also sn−1→Ls_{n-1} \to L (it is the same sequence shifted). Then

an=sn−sn−1→L−L=0.■a_n = s_n - s_{n-1} \to L - L = 0. \qquad \blacksquare

Note

Theorem (the kkth term test for divergence)
If ak↛0a_k \not\to 0 as k→∞k \to \infty, then ∑k=0∞ak\sum_{k=0}^{\infty}a_k diverges.

This is just the contrapositive of the previous theorem, and it is the cheapest test there is — always try it first. But the converse is emphatically false: ak→0a_k \to 0 does NOT imply that ∑ak\sum a_k converges. The harmonic series below is the standard counterexample, and mis-using this test in the wrong direction is the most common error in the entire chapter.

Example. Determine whether ∑k=0∞kk2+2k\sum_{k=0}^{\infty}\dfrac{k}{\sqrt{k^2+2k}} converges.
Looking at the terms,

kk2+2k=11+2/k→1≠0\frac{k}{\sqrt{k^2+2k}} = \frac{1}{\sqrt{1+2/k}} \to 1 \neq 0

as k→∞k \to \infty. Therefore the series diverges by the kkth term test. Intuitively we are adding infinitely many numbers each close to 11, so the partial sums grow without bound.

4.5.3 The integral test#

Note

Theorem (the integral test)
Suppose ∑ak\sum a_k is a series with positive terms, and ff is a positive integrable function, decreasing on [1,∞)[1,\infty), with f(k)=akf(k) = a_k for each positive integer kk. Then ∑k=1∞ak\sum_{k=1}^{\infty}a_k converges if and only if ∫1∞f(x) dx\int_1^{\infty}f(x)\,dx converges.

Basically, the terms aka_k are the areas of rectangles of width 11 and height f(k)f(k), and those rectangles can be lined up to sit just under or just over the graph of ff. Sliding them one way gives ∑k=2nak≤∫1nf\sum_{k=2}^{n}a_k \leq \int_1^n f, and the other way gives ∫1nf≤∑k=1n−1ak\int_1^n f \leq \sum_{k=1}^{n-1}a_k; so the sum and the integral are trapped within one term of each other and must live or die together. The hypotheses matter — ff must be positive and decreasing, or the rectangle picture collapses.

Example. For which pp does the pp-series ∑k=1∞1kp\sum_{k=1}^{\infty}\dfrac{1}{k^p} converge?
Take f(x)=x−pf(x) = x^{-p}, which is positive and decreasing on [1,∞)[1,\infty) when p>0p > 0. For p≠1p \neq 1,

∫1∞x−p dx=lim⁡b→∞[x1−p1−p]1b=lim⁡b→∞b1−p−11−p,\int_1^{\infty}x^{-p}\,dx = \lim_{b\to\infty}\left[\frac{x^{1-p}}{1-p}\right]_1^b = \lim_{b\to\infty}\frac{b^{1-p}-1}{1-p},

which converges (to 1p−1\frac{1}{p-1}) exactly when 1−p<01-p < 0, i.e. p>1p > 1. For p=1p = 1,

∫1∞dxx=lim⁡b→∞ln⁡b=∞.\int_1^{\infty}\frac{dx}{x} = \lim_{b\to\infty}\ln b = \infty.

For p≤0p \leq 0 the terms do not even tend to 00. Therefore

∑k=1∞1kp converges if and only if p>1.\boxed{\sum_{k=1}^{\infty}\frac{1}{k^p} \text{ converges if and only if } p > 1.}

Note

Proposition (convergence of pp-series)
The series ∑k=1∞1kp\sum_{k=1}^{\infty}\frac{1}{k^p} converges if p>1p > 1 and diverges if p≤1p \leq 1.

The case p=1p = 1 deserves its own name: ∑k=1∞1k\sum_{k=1}^{\infty}\frac1k is the harmonic series, and it diverges even though its terms tend to 00. It does so extraordinarily slowly — the partial sums grow like ln⁡n\ln n, so summing the first hundred thousand terms gives only about 12.0912.09 — which is exactly why the kkth term test cannot possibly be a test for convergence.

4.5.4 The comparison test#

Note

Theorem (the comparison test)
Suppose {ak}\{a_k\} and {bk}\{b_k\} are positive sequences with ak≤bka_k \leq b_k for every kk.
(i) If ∑k=0∞bk\sum_{k=0}^{\infty}b_k converges, then ∑k=0∞ak\sum_{k=0}^{\infty}a_k converges.
(ii) If ∑k=0∞ak\sum_{k=0}^{\infty}a_k diverges, then ∑k=0∞bk\sum_{k=0}^{\infty}b_k diverges.

Proof. The partial sums of a positive series are increasing. In case (i), they are also bounded above by ∑bk\sum b_k, so they converge by monotone convergence. Case (ii) is the contrapositive of (i) with the roles swapped. ■\blacksquare

Basically, a smaller positive series cannot escape past a convergent one, and a bigger one cannot stay below a divergent one. Get the direction right: bounding your series above by a convergent one proves convergence, and below by a divergent one proves divergence. The other two combinations tell you nothing at all.

Example. Determine whether ∑k=1∞1k2+3k\sum_{k=1}^{\infty}\dfrac{1}{k^2+3k} converges.
For k≥1k \geq 1 we have k2+3k>k2>0k^2+3k > k^2 > 0, so

0<1k2+3k<1k2,0 < \frac{1}{k^2+3k} < \frac{1}{k^2},

and ∑1k2\sum\frac{1}{k^2} converges as a pp-series with p=2>1p = 2 > 1. Therefore the series converges by comparison.

Example. Determine whether ∑k=2∞1ln⁡k\sum_{k=2}^{\infty}\dfrac{1}{\ln k} converges.
Since ln⁡k<k\ln k < k for all k≥2k \geq 2, we have 1ln⁡k>1k>0\frac{1}{\ln k} > \frac1k > 0, and ∑1k\sum\frac1k diverges as the harmonic series. Therefore the series diverges by comparison. Notice the direction: we bounded below by something divergent.

4.5.5 [X] The limit form of the comparison test#

Finding an exact inequality is often fiddly, and there is a version that only needs the terms to be of the same order.

Note

Theorem (limit comparison test)
Suppose {ak}\{a_k\} and {bk}\{b_k\} are positive sequences and

lim⁡k→∞akbk=L\lim_{k\to\infty}\frac{a_k}{b_k} = L

where 0<L<∞0 < L < \infty. Then ∑ak\sum a_k and ∑bk\sum b_k either both converge or both diverge.

Example. Determine whether ∑k=1∞2k2+54k4−3k+1\sum_{k=1}^{\infty}\dfrac{2k^2+5}{4k^4-3k+1} converges.
For large kk the terms behave like 2k24k4=12k2\frac{2k^2}{4k^4} = \frac{1}{2k^2}, so compare with bk=1k2b_k = \frac{1}{k^2}:

lim⁡k→∞akbk=lim⁡k→∞k2(2k2+5)4k4−3k+1=lim⁡k→∞2+5/k24−3/k3+1/k4=12,\lim_{k\to\infty}\frac{a_k}{b_k} = \lim_{k\to\infty}\frac{k^2(2k^2+5)}{4k^4-3k+1} = \lim_{k\to\infty}\frac{2+5/k^2}{4-3/k^3+1/k^4} = \frac12,

which is finite and non-zero. Since ∑1k2\sum\frac{1}{k^2} converges, the given series converges. For any ratio of polynomials, just compare with k(deg⁡ bottom)−(deg⁡ top)k^{(\deg \text{ bottom}) - (\deg \text{ top})} and the limit test settles it instantly — here 4−2=24 - 2 = 2, giving the 1k2\frac{1}{k^2} we used.

4.5.6 The ratio test#

Note

Theorem (the ratio test)
Suppose ∑ak\sum a_k is a series with positive terms and that

lim⁡k→∞ak+1ak=r.\lim_{k\to\infty}\frac{a_{k+1}}{a_k} = r.

Then the series converges if r<1r < 1, diverges if r>1r > 1, and the test gives no information if r=1r = 1.

Basically, the ratio test asks whether the series is eventually behaving like a geometric series of ratio rr; if it shrinks by a factor bounded below 11 at each step, the tail is dominated by a convergent geometric series.

The r=1r = 1 case really does give no information, and saying "the series diverges because r=1r=1" is simply wrong. Both ∑1k\sum\frac1k (divergent) and ∑1k2\sum\frac{1}{k^2} (convergent) have r=1r = 1, so the test cannot distinguish them; when r=1r=1 you must switch to another test. As a rule of thumb, the ratio test is powerful when factorials or kkth powers are present and useless for ratios of polynomials.

Example. Determine whether ∑k=0∞2kk!\sum_{k=0}^{\infty}\dfrac{2^k}{k!} converges.
Here ak=2kk!a_k = \frac{2^k}{k!}, so

ak+1ak=2k+1(k+1)!×k!2k=2k+1→0\begin{align*} \frac{a_{k+1}}{a_k} &= \frac{2^{k+1}}{(k+1)!}\times\frac{k!}{2^k} \\ &= \frac{2}{k+1} \\ &\to 0 \end{align*}

as k→∞k \to \infty. Since r=0<1r = 0 < 1, the series converges by the ratio test. (Indeed we will see in Section 4.6 that its sum is e2e^2.)

Example. Determine whether ∑k=1∞k!kk\sum_{k=1}^{\infty}\dfrac{k!}{k^k} converges.
Computing the ratio,

ak+1ak=(k+1)!(k+1)k+1×kkk!=(k+1)kk(k+1)k+1=(kk+1)k=1(1+1k)k→1e\begin{align*} \frac{a_{k+1}}{a_k} &= \frac{(k+1)!}{(k+1)^{k+1}}\times\frac{k^k}{k!} \\ &= \frac{(k+1)k^k}{(k+1)^{k+1}} \\ &= \left(\frac{k}{k+1}\right)^k \\ &= \frac{1}{\left(1+\frac1k\right)^k} \\ &\to \frac{1}{e} \end{align*}

by the limit computed earlier. Since r=1e≈0.368<1r = \frac1e \approx 0.368 < 1, the series converges. Notice how the earlier sequence limit did real work here; the (1+1n)n→e\left(1+\frac1n\right)^n \to e limit turns up constantly in ratio-test calculations.

4.5.7 Leibniz' test for alternating series#

All the tests so far demanded positive terms. Series whose signs alternate behave quite differently, and much more forgivingly.

Note

Theorem (alternating series test)
Suppose {ak}k=0∞\{a_k\}_{k=0}^{\infty} satisfies
(a) ak≥0a_k \geq 0;
(b) ak≥ak+1a_k \geq a_{k+1} for all kk (the sequence is non-increasing); and
(c) lim⁡k→∞ak=0\lim_{k\to\infty}a_k = 0.
Then the alternating series ∑k=0∞(−1)kak\sum_{k=0}^{\infty}(-1)^ka_k converges.
Moreover, the error in stopping after nn terms is at most the first omitted term: ∣ ∑k=0∞(−1)kak−sn∣≤an+1\left|\,\sum_{k=0}^{\infty}(-1)^ka_k - s_n\right| \leq a_{n+1}.

Basically, the partial sums leapfrog back and forth over the eventual limit, each step shorter than the last, so they close in on it like a spiral — and because each step overshoots, the true sum is always trapped between two consecutive partial sums. That is where the beautifully simple error bound comes from.

All three hypotheses are needed, and (b) is the one people forget to check. A sequence can tend to 00 without being monotonic, and the test then does not apply.

Example. Show that the alternating harmonic series ∑k=1∞(−1)k−1k\sum_{k=1}^{\infty}\dfrac{(-1)^{k-1}}{k} converges, and estimate its sum to within 0.010.01.
Take ak=1ka_k = \frac1k. Then ak≥0a_k \geq 0; ak=1k≥1k+1=ak+1a_k = \frac1k \geq \frac{1}{k+1} = a_{k+1}; and ak→0a_k \to 0. All three hypotheses hold, so the series converges by the alternating series test. For the estimate, we need an+1=1n+1≤0.01a_{n+1} = \frac{1}{n+1} \leq 0.01, i.e. n≥99n \geq 99; so summing the first 9999 terms is guaranteed to be within 0.010.01. Therefore the series converges, and its sum is in fact ln⁡2≈0.6931\ln 2 \approx 0.6931 (which we will prove in Section 4.8). Compare this with the harmonic series ∑1k\sum\frac1k, which diverges: putting alternating signs on exactly the same terms turns a divergent series into a convergent one. The cancellation is doing all the work.

4.5.8 Absolute and conditional convergence#

That last observation demands a name for the distinction.

Note

Definition
A series ∑k=0∞ak\sum_{k=0}^{\infty}a_k is absolutely convergent if ∑k=0∞∣ak∣\sum_{k=0}^{\infty}|a_k| converges. It is conditionally convergent if it converges but ∑k=0∞∣ak∣\sum_{k=0}^{\infty}|a_k| diverges.

Note

Theorem
If a series is absolutely convergent then it converges.

Proof. Suppose ∑∣ak∣\sum|a_k| converges. For each kk we have −∣ak∣≤ak≤∣ak∣-|a_k| \leq a_k \leq |a_k|, so

0≤ak+∣ak∣≤2∣ak∣.0 \leq a_k + |a_k| \leq 2|a_k|.

By the comparison test, ∑(ak+∣ak∣)\sum(a_k + |a_k|) converges, since ∑2∣ak∣\sum 2|a_k| does. Hence

∑ak=∑(ak+∣ak∣)−∑∣ak∣\sum a_k = \sum\big(a_k + |a_k|\big) - \sum|a_k|

is a difference of two convergent series, and therefore converges. ■\blacksquare

The converse fails: the alternating harmonic series converges, but taking absolute values gives the harmonic series, which diverges. So it is conditionally convergent, not absolutely convergent.

Basically, absolute convergence means the series converges because the terms are small, while conditional convergence means it converges because of cancellation. That distinction is not academic, as the following astonishing fact shows.

Note

Theorem (rearrangement)
Suppose ∑k=0∞ak\sum_{k=0}^{\infty}a_k is an infinite series.
(i) If it converges absolutely, then every rearrangement converges absolutely to the same sum.
(ii) If it converges conditionally, then for any real number LL there is a rearrangement of the series converging to LL; and there are rearrangements diverging to ±∞\pm\infty.

Part (ii) is genuinely disturbing and worth pausing on: for a conditionally convergent series, "the sum" depends on the order of addition. The alternating harmonic series sums to ln⁡2\ln 2, but its terms can be reordered to sum to 77, or to −π-\pi, or to diverge. The reason is that its positive terms alone (∑12k−1\sum\frac{1}{2k-1}) and its negative terms alone both diverge, so by taking positive terms until you overshoot your target, then negative ones until you undershoot, and repeating, you can steer the partial sums anywhere you like. Absolute convergence is what licenses you to treat an infinite sum like a finite one, and it is exactly the hypothesis the power series manipulations of Section 4.8 will rely on.

To finish the section, here is the order to attack a convergence question in — reaching for these in the wrong order is what makes series problems feel harder than they are:

Step Ask If it works
11 Does ak↛0a_k \not\to 0? Diverges, by the kkth term test. Costs one line.
22 Is it geometric or telescoping? Sum it exactly.
33 Is it a pp-series, or a ratio of polynomials? Use the pp-test or limit comparison with kdeg⁡bot−deg⁡topk^{\deg\text{bot}-\deg\text{top}}.
44 Are there factorials or kkth powers? Ratio test.
55 Do the signs alternate? Check absolute convergence first, then Leibniz.
66 Is ak=f(k)a_k = f(k) for a nice decreasing ff you can integrate? Integral test.
77 Otherwise Comparison, after guessing the dominant behaviour of aka_k.

4.6 Taylor series#

We now have everything needed to answer the questions raised in Section 4.2.2. Taylor's theorem gave us a finite polynomial plus a remainder; the natural move is to let the degree run to infinity and see what survives.

Note

Definition
Suppose ff has derivatives of all orders at aa. The Taylor series of ff about aa is the infinite series

∑k=0∞f(k)(a)k!(x−a)k=f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+⋯ .\sum_{k=0}^{\infty}\frac{f^{(k)}(a)}{k!}(x-a)^k = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots.

When a=0a=0 it is also called the Maclaurin series of ff.

Note carefully what this definition does not claim. It says nothing about whether the series converges, and nothing about whether — if it does converge — it converges to f(x)f(x). Writing down a Taylor series requires only that all the derivatives exist at the single point aa; it is a completely separate question whether that series has anything to do with ff elsewhere. The bridge between the two is the remainder.

Note

Corollary
Suppose ff has derivatives of all orders at aa and xx lies in the domain of ff. Let Rn+1(x)R_{n+1}(x) be the remainder term. If

lim⁡n→∞Rn+1(x)=0,\lim_{n\to\infty}R_{n+1}(x) = 0,

then

f(x)=∑k=0∞f(k)(a)k!(x−a)k.f(x) = \sum_{k=0}^{\infty}\frac{f^{(k)}(a)}{k!}(x-a)^k.

Proof. By Taylor's theorem, f(x)=pn(x)+Rn+1(x)f(x) = p_n(x) + R_{n+1}(x) for every nn, so pn(x)=f(x)−Rn+1(x)p_n(x) = f(x) - R_{n+1}(x). But pn(x)p_n(x) is exactly the nnth partial sum of the Taylor series. Letting n→∞n \to \infty, the partial sums converge to f(x)−0=f(x)f(x) - 0 = f(x), which by the definition of a convergent series says precisely that the Taylor series converges to f(x)f(x). ■\blacksquare

Basically, showing that a function equals its Taylor series is exactly the same job as showing the remainder dies, and the remainder is bounded using the Lagrange formula exactly as in Section 4.2. When this happens we say ff is represented by its Taylor series.

Example. Show that exe^x is represented by its Maclaurin series for every x∈Rx \in \mathbb{R}.
Here f(n+1)(t)=etf^{(n+1)}(t) = e^t for all nn, so the Lagrange formula gives

Rn+1(x)=ec(n+1)!xn+1R_{n+1}(x) = \frac{e^c}{(n+1)!}x^{n+1}

for some cc between 00 and xx. Since cc lies between 00 and xx we have ec≤e∣c∣≤e∣x∣e^c \leq e^{|c|} \leq e^{|x|}, so setting M=e∣x∣M = e^{|x|} (a constant, once xx is fixed),

0≤∣Rn+1(x)∣=ec(n+1)!∣x∣n+1≤M∣x∣n+1(n+1)!→0\begin{align*} 0 \leq |R_{n+1}(x)| &= \frac{e^c}{(n+1)!}|x|^{n+1} \\ &\leq \frac{M|x|^{n+1}}{(n+1)!} \\ &\to 0 \end{align*}

as n→∞n \to \infty, because cnn!→0\frac{c^n}{n!} \to 0 for any fixed cc. By the pinching theorem, Rn+1(x)→0R_{n+1}(x) \to 0. Therefore

ex=∑k=0∞xkk!for all x∈R.e^x = \sum_{k=0}^{\infty}\frac{x^k}{k!} \quad \text{for all } x \in \mathbb{R}.

Notice that MM depends on xx but not on nn, which is exactly what makes the argument work — the factorial in the denominator eventually outruns any fixed constant times ∣x∣n+1|x|^{n+1}, no matter how enormous xx is.

Similar arguments (occasionally needing the integral form of the remainder rather than the Lagrange form) establish the standard library. These are worth memorising; nearly every power series question in the course is solved by manipulating one of them rather than by differentiating from scratch.

Note

Theorem (standard Maclaurin series)
The following hold whenever xx lies in the stated interval, and the series diverges outside it.

Function Maclaurin series Valid for
11−x\dfrac{1}{1-x} 1+x+x2+x3+x4+⋯1 + x + x^2 + x^3 + x^4 + \cdots x∈(−1,1)x \in (-1,1)
exe^x 1+x+x22!+x33!+x44!+⋯1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \dfrac{x^4}{4!} + \cdots x∈Rx \in \mathbb{R}
sin⁡x\sin x x−x33!+x55!−x77!+⋯x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dfrac{x^7}{7!} + \cdots x∈Rx \in \mathbb{R}
cos⁡x\cos x 1−x22!+x44!−x66!+⋯1 - \dfrac{x^2}{2!} + \dfrac{x^4}{4!} - \dfrac{x^6}{6!} + \cdots x∈Rx \in \mathbb{R}
sinh⁡x\sinh x x+x33!+x55!+x77!+⋯x + \dfrac{x^3}{3!} + \dfrac{x^5}{5!} + \dfrac{x^7}{7!} + \cdots x∈Rx \in \mathbb{R}
cosh⁡x\cosh x 1+x22!+x44!+x66!+⋯1 + \dfrac{x^2}{2!} + \dfrac{x^4}{4!} + \dfrac{x^6}{6!} + \cdots x∈Rx \in \mathbb{R}
ln⁡(1+x)\ln(1+x) x−x22+x33−x44+⋯x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \dfrac{x^4}{4} + \cdots x∈(−1,1]x \in (-1, 1]
tan⁡−1x\tan^{-1}x x−x33+x55−x77+⋯x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \dfrac{x^7}{7} + \cdots x∈[−1,1]x \in [-1,1]

Notice the pattern in the intervals. The three built from exe^x (namely ex,sin⁡,cos⁡e^x, \sin, \cos, and likewise sinh⁡,cosh⁡\sinh, \cosh) are valid on all of R\mathbb{R}, because their coefficients carry factorials. The three built from the geometric series (11−x\frac{1}{1-x}, ln⁡(1+x)\ln(1+x), tan⁡−1x\tan^{-1}x) are confined to roughly [−1,1][-1,1], because their coefficients only decay like 1k\frac1k. This is exactly the contrast we noticed back in Section 4.1, and it is also why the graphs of the Taylor polynomials of ln⁡(1+x)\ln(1+x) went haywire past x=1x=1.

It does not follow that every infinitely differentiable function is represented by its Taylor series. The standard counterexample is

f(x)={e−1/x2,x≠0,0,x=0,f(x) = \begin{cases} e^{-1/x^2}, & x \neq 0, \\ 0, & x = 0,\end{cases}

which is infinitely differentiable everywhere and has f(k)(0)=0f^{(k)}(0) = 0 for every kk — the function is so flat at the origin that every derivative is crushed to zero there. Its Maclaurin series is therefore identically 00, which converges everywhere but equals f(x)f(x) only at x=0x=0. So the series exists, and converges, and is still useless. This is precisely why the remainder corollary is stated as a hypothesis to be checked rather than a triviality.

Example. Find the Maclaurin series of f(x)=e−x2f(x) = e^{-x^2} and state where it is valid.
Rather than differentiate e−x2e^{-x^2} repeatedly (which rapidly becomes horrible), substitute −x2-x^2 for xx in the exponential series:

e−x2=∑k=0∞(−x2)kk!=∑k=0∞(−1)kx2kk!=1−x2+x42!−x63!+⋯ .\begin{align*} e^{-x^2} &= \sum_{k=0}^{\infty}\frac{(-x^2)^k}{k!} \\ &= \sum_{k=0}^{\infty}\frac{(-1)^kx^{2k}}{k!} \\ &= 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots. \end{align*}

Since the exponential series is valid for all real arguments, and −x2-x^2 is real for every real xx, this is valid for all x∈Rx \in \mathbb{R}. Substitution into a known series is almost always faster than differentiating, and it is the intended method — computing f(6)(0)f^{(6)}(0) directly here would take a page.

Example. Find the Taylor series of f(x)=1xf(x) = \frac1x about a=2a = 2.
Force the expression into the shape 11−(something)\frac{1}{1-(\text{something})}:

1x=12+(x−2)=12⋅11+x−22=12⋅11−(−x−22)=12∑k=0∞(−x−22)k=∑k=0∞(−1)k2k+1(x−2)k.\begin{align*} \frac1x &= \frac{1}{2 + (x-2)} \\ &= \frac{1}{2}\cdot\frac{1}{1 + \frac{x-2}{2}} \\ &= \frac{1}{2}\cdot\frac{1}{1 - \left(-\frac{x-2}{2}\right)} \\ &= \frac12\sum_{k=0}^{\infty}\left(-\frac{x-2}{2}\right)^k \\ &= \sum_{k=0}^{\infty}\frac{(-1)^k}{2^{k+1}}(x-2)^k. \end{align*}

The geometric series requires ∣−x−22∣<1\left|-\frac{x-2}{2}\right| < 1, i.e. ∣x−2∣<2|x-2| < 2, i.e. 0<x<40 < x < 4. Therefore

1x=∑k=0∞(−1)k2k+1(x−2)kfor 0<x<4.\frac1x = \sum_{k=0}^{\infty}\frac{(-1)^k}{2^{k+1}}(x-2)^k \quad \text{for } 0 < x < 4.

Notice the interval stops exactly at x=0x=0, where the function blows up. The interval of validity is very often explained by the nearest bad point of the function, and checking that your interval is symmetric about aa and stops somewhere sensible is a good way to catch errors.

4.7 Power series#

Taylor series are a special case of a more general object, in which we forget where the coefficients came from.

Note

Definition
A power series about aa is a series of the form

∑k=0∞ak(x−a)k=a0+a1(x−a)+a2(x−a)2+⋯ ,\sum_{k=0}^{\infty}a_k(x-a)^k = a_0 + a_1(x-a) + a_2(x-a)^2 + \cdots,

where the aka_k are real constants. A power series about 00 has the form ∑k=0∞akxk\sum_{k=0}^{\infty}a_kx^k.

A power series is not a number; it is a function of xx, defined at exactly those xx for which the series converges. So the first question about any power series is: where does it converge? Notice that x=ax = a always works, since every term after the first vanishes there, so the set of such xx is never empty.

Example. For which xx does ∑k=0∞xk3k\sum_{k=0}^{\infty}\dfrac{x^k}{3^k} converge?
This is geometric with ratio r=x3r = \frac{x}{3}, so it converges exactly when ∣x3∣<1\left|\frac{x}{3}\right| < 1, i.e. ∣x∣<3|x| < 3, and diverges otherwise. Its sum on that interval is 11−x/3=33−x\frac{1}{1-x/3} = \frac{3}{3-x}.

4.7.1 Radius of convergence#

That example converged on an interval symmetric about the centre, and this turns out to be the universal behaviour.

Note

Definition
If a power series ∑k=0∞ak(x−a)k\sum_{k=0}^{\infty}a_k(x-a)^k converges at all points of the interval (a−R,a+R)(a-R, a+R) — equivalently, for ∣x−a∣<R|x - a| < R — then RR is the radius of convergence and (a−R,a+R)(a-R, a+R) is the open interval of convergence. If the series converges for all real xx, the radius of convergence is infinite.

The word "radius" looks odd for an interval; it comes from replacing xx by a complex variable zz, where the condition ∣z−a∣<R|z - a| < R describes an open disc in the Argand plane and RR really is its radius.

Note

Theorem
Suppose {ak}k=0∞\{a_k\}_{k=0}^{\infty} is a sequence of real numbers with

lim⁡k→∞∣akak+1∣=R\lim_{k\to\infty}\left|\frac{a_k}{a_{k+1}}\right| = R

for some real number RR. Then the power series ∑k=0∞ak(x−a)k\sum_{k=0}^{\infty}a_k(x-a)^k
(i) converges absolutely whenever ∣x−a∣<R|x - a| < R, and
(ii) diverges whenever ∣x−a∣>R|x-a| > R.

Proof sketch. Apply the ratio test to ∑k=0∞∣ak(x−a)k∣\sum_{k=0}^{\infty}|a_k(x-a)^k|. The ratio of consecutive terms is

∣ak+1(x−a)k+1ak(x−a)k∣=∣ak+1ak∣∣x−a∣→∣x−a∣R,\left|\frac{a_{k+1}(x-a)^{k+1}}{a_k(x-a)^k}\right| = \left|\frac{a_{k+1}}{a_k}\right||x-a| \to \frac{|x-a|}{R},

which is less than 11 exactly when ∣x−a∣<R|x-a| < R and greater than 11 exactly when ∣x−a∣>R|x-a| > R. ■\blacksquare

Note the theorem says nothing about the endpoints x=a±Rx = a \pm R, where the ratio-test limit is exactly 11 and the test is silent. Those two points must always be checked separately by substituting them in and testing the resulting numerical series, and they genuinely can behave differently from each other. In practice: find the open interval with the ratio test first, then test the two endpoints by hand, then read off the radius.

Example. Find the radius and interval of convergence of ∑k=1∞(x−2)kk\sum_{k=1}^{\infty}\dfrac{(x-2)^k}{k}.
Applying the ratio test to the absolute values,

∣(x−2)k+1/(k+1)(x−2)k/k∣=kk+1∣x−2∣→∣x−2∣,\left|\frac{(x-2)^{k+1}/(k+1)}{(x-2)^k/k}\right| = \frac{k}{k+1}|x-2| \to |x-2|,

so the series converges absolutely for ∣x−2∣<1|x-2| < 1 and diverges for ∣x−2∣>1|x-2| > 1; the radius of convergence is R=1R = 1 and the open interval is (1,3)(1,3). Now the endpoints:

  • At x=3x = 3: the series becomes ∑k=1∞1k\sum_{k=1}^{\infty}\frac1k, the harmonic series, which diverges.
  • At x=1x = 1: the series becomes ∑k=1∞(−1)kk\sum_{k=1}^{\infty}\frac{(-1)^k}{k}, which converges by the alternating series test.

Therefore the interval of convergence is [1,3)[1, 3) and the radius of convergence is 11. Notice the two endpoints behaved differently, which is exactly why each must be checked individually.

Example. Find the radius of convergence of ∑k=0∞k! xk\sum_{k=0}^{\infty}k!\,x^k.
Here

∣(k+1)!xk+1k!xk∣=(k+1)∣x∣→∞\left|\frac{(k+1)!x^{k+1}}{k!x^k}\right| = (k+1)|x| \to \infty

for every x≠0x \neq 0. So the series diverges for all x≠0x \neq 0 and converges only at x=0x = 0. Therefore the radius of convergence is R=0R = 0. A radius of 00 is a genuine possibility and does not mean you made a mistake — this series defines no function at all.

Example. Find the radius of convergence of ∑k=0∞xkk!\sum_{k=0}^{\infty}\dfrac{x^k}{k!}.
Here

∣xk+1/(k+1)!xk/k!∣=∣x∣k+1→0<1\left|\frac{x^{k+1}/(k+1)!}{x^k/k!}\right| = \frac{|x|}{k+1} \to 0 < 1

for every xx, so the series converges absolutely for all real xx and the radius of convergence is infinite. Therefore R=∞R = \infty, which we already knew, since this series is exe^x.

4.7.2 [X] Convergence of power series at endpoints#

The endpoint behaviour can be delicate, and all four combinations of open and closed occur.

Example. Determine the interval of convergence of each of the following.
(a) ∑k=1∞xkk2\sum_{k=1}^{\infty}\dfrac{x^k}{k^2}; (b) ∑k=0∞xk\sum_{k=0}^{\infty}x^k; (c) ∑k=1∞xkk\sum_{k=1}^{\infty}\dfrac{x^k}{k}.

Each has radius 11 by the ratio test, since in every case the ratio tends to ∣x∣|x|. The endpoints differ:

(a) At x=1x = 1 we get ∑1k2\sum\frac{1}{k^2}, convergent as a pp-series with p=2p=2; at x=−1x=-1 we get ∑(−1)kk2\sum\frac{(-1)^k}{k^2}, which converges absolutely. So the interval is [−1,1][-1,1], closed at both ends.

(b) At x=±1x = \pm 1 the terms do not tend to 00, so both endpoints diverge by the kkth term test. The interval is (−1,1)(-1,1), open at both ends.

(c) At x=1x=1 we get the divergent harmonic series; at x=−1x=-1 we get the convergent alternating harmonic series. The interval is [−1,1)[-1, 1), half-open.

Therefore all three shapes occur even among these very similar-looking series. The size of the coefficients decides everything: 1k2\frac{1}{k^2} is small enough to survive both endpoints, 1k\frac1k survives only where cancellation helps, and 11 survives neither.

4.8 Manipulation of power series#

Inside its open interval of convergence, a power series behaves as beautifully as one could hope — you may differentiate and integrate it term by term, exactly as if it were a polynomial. This is the payoff for all the work on absolute convergence, and it is far from obvious; infinite sums of functions do not in general commute with limits.

Note

Theorem
Suppose ff and gg are defined on an interval II by

f(x)=∑k=0∞ak(x−a)k,g(x)=∑k=0∞bk(x−a)k,f(x) = \sum_{k=0}^{\infty}a_k(x-a)^k, \qquad g(x) = \sum_{k=0}^{\infty}b_k(x-a)^k,

both convergent on II. Then for x∈Ix \in I,

f(x)+g(x)=∑k=0∞(ak+bk)(x−a)k,αf(x)=∑k=0∞αak(x−a)k.f(x) + g(x) = \sum_{k=0}^{\infty}(a_k+b_k)(x-a)^k, \qquad \alpha f(x) = \sum_{k=0}^{\infty}\alpha a_k(x-a)^k.

Moreover, if f=gf = g on II then ak=bka_k = b_k for every kk.

That last sentence is the uniqueness of power series and is used constantly: if you obtain a power series representation of ff by any legitimate route, it must be the Taylor series, so there is no need to compute a single derivative. It also justifies "equating coefficients", which is how power series are used to solve differential equations.

Note

Theorem (term-by-term differentiation and integration)
Suppose ff is defined on the open interval of convergence II by f(x)=∑k=0∞ak(x−a)kf(x) = \sum_{k=0}^{\infty}a_k(x-a)^k, with radius of convergence R>0R > 0. Then ff is differentiable on II, and for x∈Ix \in I,

f′(x)=∑k=1∞kak(x−a)k−1,∫f(x) dx=C+∑k=0∞akk+1(x−a)k+1,f'(x) = \sum_{k=1}^{\infty}ka_k(x-a)^{k-1}, \qquad \int f(x)\,dx = C + \sum_{k=0}^{\infty}\frac{a_k}{k+1}(x-a)^{k+1},

and both of these new series have the same radius of convergence RR.

Basically, on the inside of its interval a power series is a polynomial for all practical purposes. The radius is unchanged, but the endpoint behaviour can change — differentiating tends to destroy endpoint convergence and integrating tends to create it, since the coefficients get multiplied or divided by kk.

Applying the differentiation theorem repeatedly shows that ff has derivatives of all orders on II, and setting x=ax = a in the kkth derivative kills every term except one, leaving f(k)(a)=k! akf^{(k)}(a) = k!\,a_k. So we recover:

Note

Corollary
If f(x)=∑k=0∞ak(x−a)kf(x) = \sum_{k=0}^{\infty}a_k(x-a)^k on an open interval about aa, then ak=f(k)(a)k!a_k = \dfrac{f^{(k)}(a)}{k!}; that is, the series is necessarily the Taylor series of ff about aa.

Example. Find the Maclaurin series of tan⁡−1x\tan^{-1}x by integrating a geometric series, and hence obtain a series for π\pi.
Start from the geometric series with −x2-x^2 in place of xx:

11+x2=11−(−x2)=∑k=0∞(−x2)k=∑k=0∞(−1)kx2k,∣x∣<1.\frac{1}{1+x^2} = \frac{1}{1-(-x^2)} = \sum_{k=0}^{\infty}(-x^2)^k = \sum_{k=0}^{\infty}(-1)^kx^{2k}, \qquad |x| < 1.

Since ddxtan⁡−1x=11+x2\frac{d}{dx}\tan^{-1}x = \frac{1}{1+x^2}, integrating term by term gives

tan⁡−1x=C+∑k=0∞(−1)kx2k+12k+1,\tan^{-1}x = C + \sum_{k=0}^{\infty}\frac{(-1)^kx^{2k+1}}{2k+1},

and putting x=0x=0 gives tan⁡−10=0=C\tan^{-1}0 = 0 = C. Therefore

tan⁡−1x=x−x33+x55−x77+⋯ ,∣x∣<1,\tan^{-1}x = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \cdots, \qquad |x| < 1,

which is the entry in the standard table. At the endpoint x=1x=1 the series ∑(−1)k2k+1\sum\frac{(-1)^k}{2k+1} converges by the alternating series test (it is not covered by the theorem, but a finer argument shows it does converge to tan⁡−11\tan^{-1}1), giving the famous

π4=1−13+15−17+⋯ .\frac{\pi}{4} = 1 - \frac13 + \frac15 - \frac17 + \cdots.

This is a beautiful formula and a terrible way to compute π\pi; the error after nn terms is about 12n\frac{1}{2n}, so getting six decimal places would take around a million terms. Summing 200 001200\,001 terms gives 3.14159765…3.14159765\ldots, correct to only five places.

Example. Find the Maclaurin series of ln⁡(1+x)\ln(1+x) by integration.
Again from the geometric series,

11+x=∑k=0∞(−1)kxk,∣x∣<1,\frac{1}{1+x} = \sum_{k=0}^{\infty}(-1)^kx^k, \qquad |x|<1,

and integrating term by term with ln⁡1=0\ln 1 = 0 fixing the constant,

ln⁡(1+x)=∑k=0∞(−1)kxk+1k+1=x−x22+x33−x44+⋯ ,\ln(1+x) = \sum_{k=0}^{\infty}\frac{(-1)^kx^{k+1}}{k+1} = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4}+\cdots,

which agrees with the direct differentiation we did in Section 4.1 — but took three lines instead of a page. Setting x=1x=1 (again valid at this endpoint) gives

ln⁡2=1−12+13−14+⋯ ,\ln 2 = 1 - \frac12 + \frac13 - \frac14 + \cdots,

confirming the value of the alternating harmonic series claimed in Section 4.5.7.

Example. Evaluate ∫01e−x2 dx\displaystyle\int_0^{1}e^{-x^2}\,dx to three decimal places.
The integrand has no elementary antiderivative, so none of the techniques of Integration Techniques can touch it — but its series can be integrated term by term. From the earlier example,

e−x2=∑k=0∞(−1)kx2kk!,x∈R,e^{-x^2} = \sum_{k=0}^{\infty}\frac{(-1)^kx^{2k}}{k!}, \qquad x \in \mathbb{R},

so integrating over [0,1][0,1],

∫01e−x2 dx=∑k=0∞(−1)kk!∫01x2k dx=∑k=0∞(−1)kk!(2k+1)=1−13+110−142+1216−11320+⋯ .\begin{align*} \int_0^1e^{-x^2}\,dx &= \sum_{k=0}^{\infty}\frac{(-1)^k}{k!}\int_0^1x^{2k}\,dx \\ &= \sum_{k=0}^{\infty}\frac{(-1)^k}{k!(2k+1)} \\ &= 1 - \frac13 + \frac{1}{10} - \frac{1}{42} + \frac{1}{216} - \frac{1}{1320} + \cdots. \end{align*}

This is alternating with decreasing terms tending to 00, so by the Leibniz error bound stopping after a term leaves an error at most the size of the next one. Since 11320<0.001\frac{1}{1320} < 0.001, summing to the 1216\frac{1}{216} term and a little beyond suffices:

1−0.33333+0.10000−0.02381+0.00463−0.00076+0.00011=0.74684.1 - 0.33333 + 0.10000 - 0.02381 + 0.00463 - 0.00076 + 0.00011 = 0.74684.

Therefore ∫01e−x2 dx≈0.747\int_0^1e^{-x^2}\,dx \approx 0.747. This is how such integrals are actually computed in practice, and it is a genuinely important application — the same integral, suitably scaled, is the one behind the normal distribution tables in Introduction to Probability and Statistics.

Example. Find lim⁡x→0x−sin⁡xx3\displaystyle\lim_{x\to0}\frac{x - \sin x}{x^3} using series.
This is a 00\frac00 form that would need three applications of l'Hôpital's rule. With series it is immediate:

x−sin⁡x=x−(x−x33!+x55!−⋯ )=x36−x5120+⋯ ,\begin{align*} x - \sin x &= x - \left(x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots\right) \\ &= \frac{x^3}{6} - \frac{x^5}{120} + \cdots, \end{align*}

so

x−sin⁡xx3=16−x2120+⋯→16\frac{x-\sin x}{x^3} = \frac16 - \frac{x^2}{120} + \cdots \to \frac16

as x→0x \to 0. Therefore the limit is 16\frac16. Series turn indeterminate limits into ordinary arithmetic on the leading terms, and are usually faster and less error-prone than repeated l'Hôpital.

4.8.1 [X] Proof of theorems in Section 4.8#

The proofs of the manipulation theorems are more delicate than they look, and the reason is worth understanding even if the details are not examinable. The naive argument — "differentiate each term and add up" — assumes that

ddxlim⁡n→∞sn(x)=lim⁡n→∞ddxsn(x),\frac{d}{dx}\lim_{n\to\infty}s_n(x) = \lim_{n\to\infty}\frac{d}{dx}s_n(x),

that is, that differentiation and the limit may be swapped. This is false in general for sequences of functions. What rescues the power series case is that convergence on any closed subinterval of the open interval of convergence is uniform — the rate of convergence can be bounded independently of xx — and uniform convergence is exactly the hypothesis under which limits and integrals may be exchanged. The differentiation result then follows by applying the integration result to f′f'. Uniform convergence is developed properly in second-year analysis.

To summarise the whole chapter: Taylor polynomials approximate a function near a point by matching derivatives, and Taylor's theorem quantifies the error exactly, with the Lagrange form of the remainder making that error boundable in practice without knowing the answer in advance. Pushing the degree to infinity produces the Taylor series, which represents the function precisely on the set where the remainder vanishes — and the machinery of sequences and series is what gives that statement meaning. Finally, on the interior of its interval of convergence a power series may be added, differentiated and integrated term by term, which is what makes series a practical computational tool rather than a curiosity: it lets you build new expansions from the standard table instead of differentiating, evaluate integrals that have no elementary antiderivative, and reduce nasty limits to arithmetic.