Module 3 of 5 · Lesson 2 of 2

Power Series, Taylor Expansion and the Remainder

Taylor coefficients, the radius of convergence, and the remainder that bounds a truncation.

What you will be able to do

Given a function, the learner can produce its Taylor polynomial from derivatives at a point, find the radius of convergence of a power series, bound the truncation error by the Lagrange remainder, and distinguish a series that converges from one that represents its function.

Orientation

Which series represents a given function

A convergence test answers whether a given series has a sum. This unit asks the question from the other side: given a function, which series represents it, and how far can a truncation of that series be trusted?

The derivative gave the best linear approximation to f near a point. The Taylor series continues the pattern with every higher derivative, and for e 0.5 the errors fall by roughly a decimal place per term: 1.5 × 10 − 1 , 2.4 × 10 − 2 , 2.9 × 10 − 3 , 2.8 × 10 − 4 .

Two questions have to be kept apart, and the unit turns on the difference.

Where does the series converge? A power series converges on an interval centred at its expansion point, whose half-width is found by the ratio test from the previous unit. The endpoints escape that test and are examined one at a time.

Does it converge to the function? This is a separate question with a separate answer, and it is not automatic. The remainder R n = f − T n is what decides it, and there are functions whose Taylor series converges everywhere while equalling the function at exactly one point.

The Lagrange remainder answers both practical needs at once: it bounds the error of a truncation in advance, so a polynomial can be trusted to a stated accuracy, and it is the quantity whose vanishing turns a Taylor polynomial into a representation.

Figure

e^x with its first three Maclaurin polynomials

each added degree matches the curve over a wider interval

e x in heavy blue, with its Maclaurin polynomials T 1 = 1 + x , T 2 and T 3 drawn over it. All four agree at the expansion point and separate as you move away from it.

The pattern is the one the remainder bound predicts. Each extra degree multiplies the error by roughly x / ( n + 1 ) , so for a fixed degree the approximation deteriorates as | x | grows. At x = 0.5 the worked example needs only T 3 to reach 10 − 2 ; at x = 2 the same polynomial is visibly short of the curve.

What is local is the truncation, not the series. The Maclaurin series for e x converges for every real x , so there is no radius beyond which Taylor approximation fails here. Raising the degree extends the range over which a truncation is accurate, without limit. The figure shows three fixed degrees falling behind, which is a statement about T 1 , T 2 and T 3 , not about the series they come from.

Definition

Why a radius, and why convergence is not representation

The canonical statement gives the power series, the Taylor coefficients and the remainder. What follows is why each is stated as it is.

Why a power series has a radius rather than an arbitrary domain. Applying the ratio test to ∑ c n ( x − a ) n gives a condition of the form | x − a | < R , symmetric about a by construction. The endpoints escape the test entirely, since there L = 1 , and they must be examined one at a time, often with different verdicts at each end.

Why convergence of a Taylor series is not representation. The coefficients are built from f 's derivatives at a single point, so the series is determined by local information. That the resulting series converges says nothing about whether it converges to f . The gap is exactly the remainder: f = T n + R n always, and f equals the series only where R n → 0 . Establishing that is a separate argument, and for some functions it fails.

Derivation

Where the Taylor coefficients come from

Where the Taylor coefficients come from. Suppose f can be written as a power series about a :

f ( x ) = c 0 + c 1 ( x − a ) + c 2 ( x − a ) 2 + c 3 ( x − a ) 3 + ⋯

Setting x = a kills every term but the first, giving c 0 = f ( a ) .

Differentiating term by term,

f ′ ( x ) = c 1 + 2 c 2 ( x − a ) + 3 c 3 ( x − a ) 2 + ⋯ ,

and setting x = a leaves c 1 = f ′ ( a ) . Differentiating again,

f ″ ( x ) = 2 c 2 + 6 c 3 ( x − a ) + ⋯ ⟹ c 2 = f ″ ( a ) 2 .

The pattern is clear: differentiating n times brings down a factor n ! from the n th term and kills all lower ones, so

c n = f ( n ) ( a ) n ! .

The factorial is not a normalising convention; it is what the repeated differentiation produces.

What the argument assumes. It assumes f has such a representation and that term-by-term differentiation is valid. Both hold inside the radius of convergence, but the argument establishes only what the coefficients must be if a representation exists, not that it does. That second question is the remainder's business.

Checking the result. For f ( x ) = e x about a = 0 , every derivative is e x with value 1 at 0, so c n = 1 / n ! and

e x = ∑ n = 0 ∞ x n n ! .

At x = 0.5 the partial sums give 1.5 , 1.625 , 1.6458333 , 1.6484375 against e 0.5 = 1.6487213 , errors of 1.49 × 10 − 1 , 2.37 × 10 − 2 , 2.89 × 10 − 3 , 2.84 × 10 − 4 , each roughly a tenth of the last.

Theorem

Taylor's theorem with remainder

Statement. Let f have n + 1 continuous derivatives on an interval containing a and x . Then

f ( x ) = ∑ k = 0 n f ( k ) ( a ) k ! ( x − a ) k ⏟ T n ( x ) + R n ( x ) ,

and the remainder has the Lagrange form

R n ( x ) = f ( n + 1 ) ( c ) ( n + 1 ) ! ( x − a ) n + 1

for some c strictly between a and x .

The equality is exact. f = T n + R n holds for every n , with no approximation. The remainder is defined as the difference. The theorem's content is the form of the remainder, which is what makes it estimable.

The usable bound. The point c is not known, so bound the derivative instead. If | f ( n + 1 ) ( t ) | ≤ M for all t between a and x , then

| R n ( x ) | ≤ M | x − a | n + 1 ( n + 1 ) ! .

Checking it bites. For f ( x ) = e x at a = 0 , x = 0.5 , n = 3 : every derivative is e t , which on [ 0 , 0.5 ] is at most M = e 0.5 ≈ 1.6487 . The bound is

1.6487 × 0.5 4 4 ! = 1.6487 × 0.0625 24 ≈ 4.29 × 10 − 3 ,

and the actual error is 2.888 × 10 − 3 . The bound exceeds the error, as it must, and is the right order of magnitude.

Why ( n + 1 ) ! makes the series converge for e x . Fix x and let n grow. The bound is M | x | n + 1 ( n + 1 ) ! , and the factorial eventually outgrows any fixed power, so R n → 0 for every real x . That is the argument establishing

e x = ∑ n = 0 ∞ x n n ! for all  x ,

rather than merely that the series converges. The same argument works for sin and cos , whose derivatives are bounded by 1 everywhere, giving M = 1 and convergence on the whole line.

Where the argument fails. Consider

f ( x ) = { e − 1 / x 2 x ≠ 0 0 x = 0 .

Every derivative at 0 is zero, so every Taylor coefficient vanishes and the Maclaurin series is identically 0. It converges everywhere, to the zero function. But f ( x ) > 0 for every x ≠ 0 , so the series equals f only at the centre.

Nothing went wrong with the coefficients; the remainder simply does not tend to zero. This is the case that shows why "the series converges" and "the series represents f " are different statements, and why the theorem is stated with a remainder rather than as an identity.

How the bound is used in practice. Given a required accuracy ε , choose n so that M | x − a | n + 1 ( n + 1 ) ! < ε , then truncate. This is how library implementations of e x , sin and cos decide how many terms to compute. The error is bounded in advance rather than discovered afterwards.

Worked example

A Taylor expansion with an error bound chosen in advance

A Taylor expansion with an error bound: approximate e 0.5 to within 10 − 2 .

The Maclaurin series is ∑ x n / n ! . For the bound, every derivative of e x is e x , at most M = e 0.5 ≈ 1.6487 on [ 0 , 0.5 ] :

| R n ( 0.5 ) | ≤ 1.6487 × 0.5 n + 1 ( n + 1 ) ! .
n boundactual error
2 3.4 × 10 − 2 2.37 × 10 − 2
3 4.3 × 10 − 3 2.89 × 10 − 3

So n = 3 suffices for 10 − 2 . The polynomial is

T 3 ( 0.5 ) = 1 + 0.5 + 0.25 2 + 0.125 6 = 1.6458333 ,

and e 0.5 = 1.6487213 , an error of 2.888 × 10 − 3 , inside the predicted bound.

Here n was chosen before computing, from the bound alone.

Procedure

Finding a radius and bounding a truncation

For a power series. Apply the ratio test to | c n ( x − a ) n | and solve L < 1 for x . That gives the radius R . Then test x = a − R and x = a + R separately, since the ratio test is inconclusive there and the two endpoints often disagree.

For a Taylor expansion.

  1. Compute derivatives at a until the pattern is clear.
  2. Form T n ( x ) = ∑ k ≤ n f ( k ) ( a ) k ! ( x − a ) k .
  3. Bound | f ( n + 1 ) | by M on the interval between a and x .
  4. Use | R n | ≤ M | x − a | n + 1 ( n + 1 ) ! to choose n for a required accuracy, before computing the polynomial.
  5. To claim the series represents f , show R n → 0 as n grows. Convergence of the series alone is not enough.

Checks. For a Taylor approximation, compare the actual error against the bound. The bound must be the larger, and if it is not, one of the two is wrong.

Example

The series worth knowing by heart

1 1 − x = ∑ n = 0 ∞ x n for | x | < 1 . The geometric series, and the only one with an elementary closed form. Everything else in this list can be obtained from it by differentiating, integrating or substituting. At x = 0.5 the sum is 2, at x = 0.9 it is 10, and at x = 1.5 the terms grow and the series diverges.

e x = ∑ n = 0 ∞ x n n ! for all x . Every derivative is e x , so every coefficient is 1 / n ! . The factorial in the denominator is what gives an infinite radius of convergence. It eventually outgrows x n for any fixed x .

sin ⁡ x = x − x 3 3 ! + x 5 5 ! − ⋯ for all x . Odd powers only, because sin is odd. At x = 0.5 the successive truncations give 0.5 , 0.47917 , 0.47943 against the exact 0.47943 , three terms already agree to five decimals. At x = 1 they give 1 , 0.83333 , 0.84167 against 0.84147 , converging more slowly since x is larger.

cos ⁡ x = 1 − x 2 2 ! + x 4 4 ! − ⋯ for all x . Even powers only, being the derivative of the sin series term by term.

ln ⁡ ( 1 + x ) = x − x 2 2 + x 3 3 − ⋯ for − 1 < x ≤ 1 . Obtained by integrating the geometric series for 1 1 + x . The radius is 1, and the endpoints differ: at x = 1 the series is the alternating harmonic, converging to ln ⁡ 2 ; at x = − 1 it is the negative harmonic series and diverges. One endpoint in, one out, which is why endpoints are always checked separately.

∑ n = 1 ∞ x n n , radius 1. The ratio test gives | x | n n + 1 → | x | , so R = 1 . Inside, the sum is − ln ⁡ ( 1 − x ) : at x = 0.5 a 2000-term partial sum gives 0.69314718 against ln ⁡ 2 = 0.69314718 , and at x = 0.99 it gives 4.60517019 against − ln ⁡ ( 0.01 ) = 4.60517019 .

∑ 1 n p — the p -series. Converges exactly when p > 1 , by the integral test. At p = 2 the sum is π 2 / 6 ; at p = 1 it is the harmonic series and diverges. Useful mainly as the comparison standard, since the threshold is easy to remember and many series can be bounded against it.

Three have infinite radius because of a factorial; three have radius 1 because their coefficients decay only polynomially. The factorial is the difference between a series that converges everywhere and one that converges on an interval, and reading which case applies is usually a one-line ratio test.

Non-example

Inferences a Taylor expansion does not support

A power series says nothing about its endpoints. For ∑ x n / n the ratio test gives R = 1 , and the two endpoints behave differently: at x = 1 the series is harmonic and diverges, at x = − 1 it is alternating harmonic and converges. Reporting convergence on [ − 1 , 1 ] or on ( − 1 , 1 ) without checking is wrong in one case each way.

A Taylor series may converge without representing the function. Let

f ( x ) = { e − 1 / x 2 x ≠ 0 0 x = 0 .

Every derivative at 0 is zero, so every Maclaurin coefficient is zero and the series is identically 0. It converges for every x , to the zero function, while f ( x ) > 0 for all x ≠ 0 . The series represents f at exactly one point.

Nothing miscomputed: the coefficients are correct and the series converges. What fails is R n → 0 , which is the separate condition that turns a Taylor polynomial into a representation. This is why the theorem carries a remainder rather than an equals sign.

A Taylor polynomial is local. T 3 for e x about 0 has error 2.9 × 10 − 3 at x = 0.5 and about 7.1 at x = 3 . The bound M | x | 4 4 ! grows with the fourth power of the distance. An approximation validated near the centre says nothing about behaviour far from it.

Comparison needs the inequality in the right direction. Bounding a n below by a convergent series establishes nothing, and bounding it above by a divergent one establishes nothing either. Only above-by-convergent and below-by-divergent carry information.

Application

Where truncated series do the work

Computing transcendental functions. A processor evaluating sin , cos or e x does not consult a table; it sums a truncated series, with the number of terms chosen from the Lagrange bound to guarantee accuracy to the last representable bit. For e 0.5 to within 10 − 2 the bound 1.6487 × 0.5 n + 1 ( n + 1 ) ! picks n = 3 before any arithmetic is done. That is the practical content of the remainder theorem: the error is known in advance.

Integrals with no elementary antiderivative. ∫ e − x 2 d x has none, as the integration unit noted. Expanding the integrand as a series and integrating term by term gives

∫ 0 t e − x 2 d x = t − t 3 3 + t 5 10 − ⋯ ,

which converges for every t and is how the normal distribution's cumulative function is actually computed. Convergence is fast near 0 and slows as t grows: the four terms shown give 0.461272 at t = 0.5 against the true 0.461281 , but only 0.742857 at t = 1 against 0.746824 , so more terms are needed further out. The technique turns an impossible antidifferentiation into an arithmetic one, with the remainder bound saying how many terms that takes.

Solving differential equations. Where no closed-form solution exists, assuming y = ∑ c n x n and matching coefficients turns the equation into a recursion for the c n . Bessel and Legendre functions, which appear in every problem with cylindrical or spherical symmetry, are defined this way, by the series their equations force.

Approximation in physics and economics. Replacing sin ⁡ θ by θ for small θ is truncating the series after one term, and the remainder bound says the error is at most θ 3 / 6 , about 0.00017 at θ = 0.1 radians. That is what makes the pendulum equation linear and solvable. The same first-order truncation underlies marginal analysis, and the second-order term is what a risk calculation keeps when the first is not enough.

Moment generating functions. In probability, M X ( t ) = E [ e t X ] is expanded as a series whose coefficients are the moments of X divided by factorials. Reading a distribution's mean and variance off that expansion is a series manipulation, and the proof of the central limit theorem works by expanding a characteristic function to second order and bounding the remainder.

Geometric series in finance and probability. The present value of a perpetuity paying C each period at rate r is ∑ k = 1 ∞ C / ( 1 + r ) k = C / r , a geometric series with ratio 1 / ( 1 + r ) < 1 . The expected number of trials until a first success is another, and both fail to converge exactly when their ratio reaches 1, which corresponds to a zero interest rate and a zero success probability respectively.

The role of the error bound. Every application above replaces an exact object with a finite sum. What makes that legitimate rather than hopeful is knowing how large the discarded tail can be. An approximation without a bound is a guess; with one, it is a computation to a stated tolerance.

Next step

Practice Power Series, Taylor Expansion and the Remainder

Practice records what support you used, so the evidence reflects how you actually performed.

Practice this lessonSkip to Partial Derivatives, the Gradient and Critical Points

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.