Calculus › Section J · Infinite series › Topic J.10

Taylor and Maclaurin series

Take the Taylor polynomial from the approximation topic and never stop adding terms: the result is a power series that can equal the whole function. This is the library of series that mathematics actually runs on.

From polynomial to infinite series

The Taylor polynomial \(T_n\) matched a function's first \(n\) derivatives at a centre, and Taylor's inequality showed the match improving as \(n\) grows. The natural question: let \(n\) run to infinity. The infinite sum

f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x - a)^n

is the Taylor series of \(f\) at \(a\), and at \(a = 0\) it is a Maclaurin series. Inside its interval of convergence, this series is not an imitation of the function: for the familiar functions of this course, it equals the function exactly, term for term, digit for digit. A transcendental object like \(e^x\) turns out to be nothing more than a very long polynomial.

Convergence is part of the answer

A Taylor series is a power series, so the power series topic applies in full: a radius from the ratio test, endpoints checked separately, and an interval of validity that must travel with the answer. The honest statement, true for every series built here: inside its interval of convergence the series equals the function, and outside it the series is not usable at all, even though the function lives on. So each entry in the library below comes stamped with its interval.

Worked example: eˣ and the number e

Every derivative of \(e^x\) is \(e^x\), and every derivative value at 0 is 1, so

e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots = \sum_{n=0}^{\infty} \frac{x^n}{n!}

The ratio test gives \(\frac{|x|}{n+1} \to 0\) for every \(x\), so the radius is infinite: the series is valid everywhere. Put \(x = 1\) and you compute \(e\) itself: \(1 + 1 + \frac{1}{2} + \frac{1}{6} + \frac{1}{24} + \cdots\). Stopping after the \(\frac{1}{7!}\) term gives \(2.71825\ldots\), and Taylor's inequality with every derivative of \(e^x\) bounded by \(M = 3\) on \([0, 1]\) promises an error under \(\frac{3}{8!} \approx 7 \times 10^{-5}\); the true gap is about \(3 \times 10^{-5}\)

Worked example: sine and cosine

The derivative cycle of \(\sin x\) is \(\sin x, \cos x, -\sin x, -\cos x\), repeating every four steps, so the derivative values at 0 run \(0, 1, 0, -1\) and repeat. Only odd powers survive:

\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}

Cosine runs \(1, 0, -1, 0\) at 0, leaving only even powers:

\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots

The ratio test on either series gives \(\frac{|x|^2}{(2n+2)(2n+3)} \to 0\): both converge for every \(x\). The structure is memorable: sine is odd powers, cosine even powers, both alternating, with factorials making the match astonishingly accurate near the origin.

The library to memorise

Five series do almost all the work, and every one has already appeared in these topics:

e^x = \sum \frac{x^n}{n!}\ \text{(all } x\text{)}, \quad \sin x = \sum \frac{(-1)^n x^{2n+1}}{(2n+1)!}\ \text{(all } x\text{)}, \quad \cos x = \sum \frac{(-1)^n x^{2n}}{(2n)!}\ \text{(all } x\text{)}
\frac{1}{1-x} = \sum x^n\ (|x| < 1), \quad \ln(1+x) = \sum \frac{(-1)^{n+1} x^n}{n}\ (-1 < x \le 1), \quad \arctan x = \sum \frac{(-1)^n x^{2n+1}}{2n+1}\ (-1 \le x \le 1)

The geometric, logarithm and arctangent entries came from the representation topic; the exponential and trigonometric ones are new here. New series are rarely computed from the coefficient formula \(\frac{f^{(n)}(a)}{n!}\): they are built from these five by substitution, multiplication, differentiation and integration.

Building by substitution

Substituting into a known series is faster than computing derivatives, and the interval of validity transforms with the substitution. Replace \(x\) by \(-x^2\) in the \(e^x\) series:

e^{-x^2} = 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots

valid for every \(x\), since the exponential series tolerates any substitution. Multiplication works too: \(x\cos x = x - \frac{x^3}{2!} + \frac{x^5}{4!} - \cdots\), from multiplying the cosine series by \(x\). The substitution rule for the interval: the series in \(u\) is valid where \(|u| <\) its radius, so translate it into a condition on \(x\). The \(e^{-x^2}\) series needs nothing, but substituting \(x \to x^3\) into the geometric series would demand \(|x^3| < 1\), that is \(|x| < 1\).

Worked example: a series with no antiderivative

The integral \(\int_0^1 e^{-x^2}\,dx\) matters deeply in statistics, where \(e^{-x^2}\) shapes the normal distribution, yet it has no elementary antiderivative. Series make it computable. Integrate the \(e^{-x^2}\) series term by term from 0 to 1:

\int_0^1 e^{-x^2}\,dx = 1 - \frac{1}{3} + \frac{1}{2! \cdot 5} - \frac{1}{3! \cdot 7} + \frac{1}{4! \cdot 9} - \cdots

Adding terms gives partial sums 1, 0.6667, 0.7667, 0.7429, 0.7475, 0.7467, 0.7468, …, and the alternating terms shrink in size, so the alternating series error bound pins the value once the next term is small enough. The sum is \(0.7468\ldots\), correct to four decimals after seven terms. An impossible integral becomes a few divisions and additions.

Worked example: ln x at a new centre

The library entry \(\ln(1+x)\) is centred at 0, which approximates \(\ln\) only near 1. To work near other values, change the centre. Build the Taylor series of \(\ln x\) at \(a = 1\): the derivatives are \(\frac{1}{x}, -\frac{1}{x^2}, \frac{2}{x^3}, -\frac{6}{x^4}\), and in general the \(n\)th derivative is \(\frac{(-1)^{n-1}(n-1)!}{x^n}\), whose value at 1 is \((-1)^{n-1}(n-1)!\). Dividing by \(n!\):

\ln x = (x-1) - \frac{(x-1)^2}{2} + \frac{(x-1)^3}{3} - \cdots

The ratio test gives radius 1 around the centre, and the endpoints at \(x = 0\) and \(x = 2\) behave like the \(\ln(1+x)\) series did: divergence at 0, alternating convergence at 2. The interval is \(0 < x \le 2\). Notice this is the same series as \(\ln(1+x)\) with \(x - 1\) in place of \(x\): shifting the centre and shifting the variable are two views of one move.

The binomial series

One more library entry covers every power of a binomial: for any real exponent \(k\),

(1+x)^k = 1 + kx + \frac{k(k-1)}{2!}x^2 + \frac{k(k-1)(k-2)}{3!}x^3 + \cdots

with radius 1, the coefficients coming from the power rule and the chain rule rather than anything combinatorial once \(k\) stops being a whole number. Take \(k = \frac{1}{2}\) to expand a root:

\sqrt{1+x} = 1 + \frac{x}{2} - \frac{x^2}{8} + \frac{x^3}{16} - \cdots

For a taste of its power, set \(x = 0.06\): the first four terms give \(1 + 0.03 - 0.00045 + 0.0000135 = 1.0295635\), and \(\sqrt{1.06} = 1.0295630\ldots\), so the two agree to five decimal places from three divisions.

Common mistakes to avoid

First, the factorials: every Taylor coefficient is divided by \(n!\), and the series for \(\sin\) and \(\cos\) need the factorial in every denominator, not just the powers. Second, keep the parities straight: sine is odd powers only, cosine even powers only, and a series for sine containing an \(x^2\) term is wrong at a glance. Third, never quote a series outside its interval: \(\frac{1}{1-x}\) is \(\sum x^n\) only for \(|x| < 1\), and the exponential series is the one valid everywhere, not the geometric one. Fourth, respect the centre: the series for \(\ln x\) at 1 is built from powers of \(x - 1\), and a series in \(x\) itself is the Maclaurin case. Fifth, when substituting into \(e^x\), keep the factorials: \(e^{-x^2}\) has \(\frac{x^4}{2!}\), not \(x^4\); the coefficient pattern without factorials belongs to the geometric series, a different function entirely.

Key takeaways

The Taylor series \(\sum \frac{f^{(n)}(a)}{n!}(x-a)^n\) extends the Taylor polynomial to infinity; centred at 0 it is a Maclaurin series, and it equals the function on its interval of convergence. The library to memorise: \(e^x = \sum \frac{x^n}{n!}\) and \(\sin x\), \(\cos x\) valid for every \(x\); \(\frac{1}{1-x} = \sum x^n\) for \(|x| < 1\); \(\ln(1+x)\) on \((-1, 1]\); \(\arctan x\) on \([-1, 1]\); and the binomial series \((1+x)^k\) with radius 1. Build new series from the library by substitution, multiplication, differentiation and integration, adjusting the interval with the substitution. Series make the uncomputable computable, from \(e\) and \(\sqrt{1.06}\) to \(\int_0^1 e^{-x^2}\,dx\).

Flashcards

Flashcard

Taylor series

f(x) = Σ f⁽ⁿ⁾(a)/n! · (x - a)ⁿ

The Taylor polynomial extended forever.

Test your understanding

Question 1 of 5

The Maclaurin series for eˣ is Σ xⁿ/n!. For which x does it converge?

Question 2 of 5

What is the Maclaurin series for cos x?

Question 3 of 5

What is the Maclaurin series for e^(-x²)?

Question 4 of 5

What is the Taylor series of ln x centred at a = 1?

Question 5 of 5

What are the first three terms of the binomial series for √(1 + x)?

Standards: 10 (BC)

← Previous topicNext topic →