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

Taylor polynomials and approximation

Polynomials are the only functions a computer really loves: add and multiply and you are done. Taylor polynomials imitate a complicated function near a point, matching its value, slope and curvature, and they come with a guaranteed error bound.

Imitating a function

How does a calculator find \(\sin(0.2)\)? It cannot look it up in an infinite table; it computes a short sum of additions and multiplications that lands on the answer. Polynomials are the functions that machines evaluate effortlessly, while sines, exponentials and logarithms are not. The strategy is local imitation: near a point \(a\) where you know everything about a function (its value, its slope, its concavity, every derivative), build the polynomial that matches the function as closely as possible. The tangent line was the first such imitation. This topic builds the whole ladder of better ones, and measures exactly how good each rung is.

Matching derivatives forces the coefficients

Take a polynomial written around the centre \(a\): \(P(x) = c_0 + c_1(x - a) + c_2(x - a)^2 + \cdots\). Its derivatives at \(a\) are especially easy to read off, because every term with \((x - a)\) in it dies at \(x = a\). You get \(P(a) = c_0\), \(P'(a) = c_1\), \(P''(a) = 2c_2\), \(P'''(a) = 6c_3\), and in general the \(k\)th derivative at \(a\) is \(k!\,c_k\). So if you want a degree-\(n\) polynomial whose derivatives at \(a\) agree with those of \(f\) all the way up to order \(n\), there is exactly one choice, and the factorials explain themselves: differentiating \((x - a)^k\) once \(k\) times produces exactly \(k!\). The coefficients must be \(c_k = \frac{f^{(k)}(a)}{k!}\).

The Taylor polynomial

The degree-\(n\) Taylor polynomial of \(f\) at the centre \(a\) is

T_n(x) = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x - a)^n

When the centre is \(a = 0\) it is called a Maclaurin polynomial, the name you will meet most. \(T_1\) is precisely the tangent line from the linear approximation topic: it matches the value and the slope. \(T_2\) adds the concavity, so it bends with the function instead of running straight through the turn. Each new term buys a factor of \((x - a)\), which is why the imitation is superb close to the centre and rougher far away.

Worked example: eˣ at the origin

Build the Maclaurin polynomial of \(e^x\) with \(n = 3\). Every derivative of \(e^x\) is \(e^x\), and at \(0\) every one equals 1, so the coefficients are \(\frac{1}{0!}, \frac{1}{1!}, \frac{1}{2!}, \frac{1}{3!}\):

T_3(x) = 1 + x + \frac{x^2}{2} + \frac{x^3}{6}

Estimate \(e^{0.1}\): \(T_3(0.1) = 1 + 0.1 + 0.005 + 0.0001\overline{6} \approx 1.10517\). The true value of \(e^{0.1}\) is \(1.1051709\ldots\), so the polynomial lands within about \(4 \times 10^{-6}\) using four cheap operations. Near the centre, even a low-degree Taylor polynomial is devastatingly accurate.

Taylor's inequality: a guaranteed error bound

How much can the imitation be off? Let \(M\) be any number that bounds the size of the \((n+1)\)th derivative on the stretch between \(a\) and \(x\), meaning \(\left|f^{(n+1)}(t)\right| \le M\) there. Then Taylor's inequality promises

\left|f(x) - T_n(x)\right| \le \frac{M}{(n+1)!}\,|x - a|^{n+1}

The pattern matches the last term you did not use, with the worst derivative value in place. For the \(e^{0.1}\) estimate, the fourth derivative is still \(e^x\), which is below 2 everywhere on \([0, 0.1]\) (since \(e < 3\)), so the error is at most \(\frac{2}{4!}(0.1)^4 \approx 8.3 \times 10^{-6}\). The true error, about \(4.2 \times 10^{-6}\), sits comfortably inside the guarantee. Bounds are promises, not exact errors, and honest ones usually overshoot a little.

Worked example: sin x by hand

Build the Maclaurin polynomial of \(\sin x\) with \(n = 3\). The derivatives cycle: \(\sin x, \cos x, -\sin x, -\cos x\), and at \(0\) their values are \(0, 1, 0, -1\). So

T_3(x) = 0 + x + 0 - \frac{x^3}{6} = x - \frac{x^3}{6}

Estimate \(\sin(0.2)\): \(T_3(0.2) = 0.2 - \frac{0.008}{6} = 0.2 - 0.001\overline{3} \approx 0.19867\). The true value is \(0.198669\ldots\), so the error is about \(3 \times 10^{-6}\). Taylor's inequality confirms it in advance: the fourth derivative is \(\sin x\), whose size stays below 1 everywhere, so the error is at most \(\frac{1}{4!}(0.2)^4 \approx 6.7 \times 10^{-5}\). Notice how the odd function came out odd: the zero coefficients are structural, not accidents.

Applied: the pendulum's small swings

Why does a pendulum swing so steadily? The restoring pull along its arc is proportional to \(\sin\theta\), where \(\theta\) is the angle from vertical, and \(\sin\theta\) is awkward. But for small angles the cubic term barely matters: the inequality \(\sin\theta \le \theta\) with error at most \(\frac{\theta^3}{6}\) means that at \(\theta = 15° \approx 0.26\) radians the approximation \(\sin\theta \approx \theta\) is off by only about one percent. Replacing \(\sin\theta\) by \(\theta\) turns the motion into the simple harmonic equation, whose period is

T = 2\pi\sqrt{\frac{L}{g}}

For a pendulum of one metre, that is \(2\pi\sqrt{1/9.8} \approx 2.0\) seconds. The stated assumption is small swings: an amplitude under about \(15°\) keeps the approximation within one percent, and clock makers have used this fact for centuries. The companion approximation \(\cos\theta \approx 1 - \frac{\theta^2}{2}\) serves the same role whenever a cosine appears near zero.

Degrees of accuracy

Two dials control how good the imitation is: the degree and the distance. Going from degree \(n\) to degree \(n + 1\) multiplies the promised error by \(\frac{|x - a|}{n + 2}\). Near the centre, say \(|x - a| = 0.1\), that factor is at most \(0.02\) once the degree passes 3, so each new term divides the error bound by fifty or more: degrees are cheap there. Far from the centre the story reverses. With \(|x - a| = 10\), the early bounds actually grow as \(n\) increases, because \(10^{n+1}\) outruns the factorial until the degree passes roughly \(|x - a|\), so low-degree polynomials genuinely barely help that far out. When a problem asks for a value to a given accuracy, work out the smallest \(n\) for which \(\frac{M}{(n+1)!}|x - a|^{n+1}\) fits under the tolerance.

Common mistakes to avoid

The classic slip is dropping the factorial: the quadratic coefficient is \(\frac{f''(a)}{2}\), not \(f''(a)\), because differentiating \((x - a)^2\) twice produces the 2. Second, evaluate derivatives at the centre \(a\), not at \(x\): the whole construction lives at one point. Third, do not quote an error bound without naming \(M\); a bound is only as good as the derivative estimate behind it, and \(M\) must hold on the entire stretch between \(a\) and \(x\). Fourth, do not expect one polynomial to work everywhere: the guarantee involves \(|x - a|^{n+1}\), so far from the centre even a high degree can disappoint. Fifth, remember the bound overestimates: the true error is usually smaller, which is fine, because the promise only needs an upper limit.

Key takeaways

The Taylor polynomial \(T_n\) matches a function's value and first \(n\) derivatives at a centre \(a\), forcing the coefficients \(\frac{f^{(k)}(a)}{k!}\); at \(a = 0\) it is a Maclaurin polynomial, and \(T_1\) is the tangent line. Taylor's inequality bounds the error by \(\frac{M}{(n+1)!}|x - a|^{n+1}\), where \(M\) dominates the \((n+1)\)th derivative between \(a\) and \(x\). Key examples: \(e^x \approx 1 + x + \frac{x^2}{2} + \frac{x^3}{6}\), \(\sin x \approx x - \frac{x^3}{6}\), \(\cos x \approx 1 - \frac{x^2}{2}\). Accuracy is superb near the centre, and each added degree multiplies the error bound by roughly \(\frac{|x - a|}{n + 2}\).

Flashcards

Flashcard

Taylor polynomial

Tₙ(x) = Σ f⁽ᵏ⁾(a)/k! · (x - a)ᵏ up to k = n

Matches value and first n derivatives at a.

Test your understanding

Question 1 of 5

What is the degree-3 Maclaurin polynomial for eˣ?

Question 2 of 5

A function has f(a) = 2 and f′(a) = 3, f″(a) = 6. What is the coefficient of (x - a)² in its Taylor polynomial at a?

Question 3 of 5

Using Taylor's inequality with M = 2, what is the error bound for T₃ of eˣ evaluated at x = 0.1?

Question 4 of 5

Using T₃(x) = x - x³/6 for sin x, what is sin(0.2) approximately?

Question 5 of 5

Why can a pendulum's small swings be treated as simple harmonic motion?

Standards: 10 (BC)

← Previous topicNext topic →