Nalanda

mathematics / ConceptMTH-CN-041

Taylor approximation

A Taylor approximation rebuilds a smooth function near a point using nothing but that point's value and its successive derivatives, one derivative order at a time, and the leftover error after stopping at any order can itself be written down and bounded exactly.

Essence

A function's value alone tells you almost nothing about its neighbors, but its value together with how it is changing, and how that change is changing, and so on, turns out to be enough information to rebuild the whole curve nearby out of ordinary polynomial pieces, with a precise receipt for how much is left unaccounted for.

In brief

Before calculators contained lookup tables, someone had to compute the sine of an angle, or the value of e raised to some power, using nothing but addition, multiplication, and a starting fact or two. The trick that makes this possible is to rebuild a curved, complicated function out of a straight and simple one: start with the function's value at a known point, correct that guess using how the function is currently changing, correct the correction using how that change is itself changing, and keep layering corrections built from successively higher derivatives. Each new layer uses only information already sitting at the single starting point, yet the accumulated layers reconstruct the function's behavior over an entire neighborhood. This is Taylor approximation, and its most valuable feature is not just that it approximates, but that the size of what it leaves out can be written down and bounded.

The full treatment

First look: matching a value and a slope

The crudest possible approximation to a function f near a point a is a flat, constant guess: assume f(x) is roughly f(a) for x near a. This ignores that f is changing. The next improvement is the tangent line: f(x) is approximately f(a) plus f'(a) times (x minus a), where f'(a) is the derivative of f at a, the instantaneous rate of change there (see the derivative as local sensitivity). This linear approximation matches both the value of f at a and its slope at a, and for x close enough to a it tracks the true curve far better than the flat guess. But a straight line cannot capture curvature: it will drift away from a curving function faster than the function actually bends.

Matching curvature: why the next term needs a factor of one half

To fix the curvature mismatch, add a quadratic correction term, c times (x minus a) squared, and ask what value of c makes the second derivative of the whole approximation, at the point a, match the second derivative of f at a. Differentiate c*(x minus a)^2 once: you get 2c(x minus a). Differentiate again: you get 2*c, a constant. For this to equal f''(a), the true second derivative of f at a, you need c = f''(a) divided by 2. The factor of 2 in the denominator is not decoration; it appears because differentiating a squared term twice brings down a factor of 2 that has to be divided back out to make the match exact. Add this quadratic term to the linear approximation, and now the approximation matches f's value, slope, and curvature at a, all at once.

The general pattern: matching every derivative up to some order

The same reasoning extends to any order. Include a cubic term d*(x minus a)^3 and ask what d makes the third derivative match; differentiating three times brings down a factor of 3 times 2 times 1, so d = f'''(a) divided by (3 times 2 times 1), written 3 factorial, or 3!. In general, the coefficient of the (x minus a)^n term must be f raised to the nth derivative, evaluated at a, divided by n factorial, written n!, where n! means n times (n minus 1) times all the way down to 1. Building up term by term through order N gives the Taylor polynomial of degree N centered at a: the sum, for n running from 0 to N, of f^(n)(a) divided by n!, times (x minus a) to the power n, where f^(0)(a) just means f(a) itself. Each successive term is built entirely from information available at the single point a, the function's derivatives of increasing order there, yet together they approximate f over a whole stretch of nearby x values.

A worked case: rebuilding e to the power x

Take f(x) = e^x, centered at a = 0. A distinctive feature of this function is that every derivative of e^x is e^x itself, so f, f', f'', and every higher derivative, evaluated at 0, all equal e^0, which is 1. Plugging into the general pattern, every coefficient f^(n)(0) divided by n! becomes simply 1 divided by n!. The Taylor polynomial, extended without ever stopping, is: e^x = 1 + x + x^2/2! + x^3/3! + x^4/4! + and so on forever. This is not a coincidence or a curve-fit; it follows directly from matching every derivative of e^x, at the single point zero, to the corresponding derivative of the polynomial, exactly the construction carried out above.

The remainder: what is left over, and how big it is

Stopping the Taylor polynomial at some finite order N leaves an error, the difference between the true f(x) and the degree-N polynomial. This error is not a mystery; it can be written exactly as an integral involving the (N+1)th derivative of f, a fact that follows from applying the fundamental link between change and accumulation repeatedly to peel derivatives off one at a time. A more usable version, due to Lagrange, states the error equals f raised to the (N+1)th derivative, evaluated at some unspecified point c lying between a and x, divided by (N+1) factorial, times (x minus a) to the power (N+1). The point c is not known exactly, but if you can bound how large the (N+1)th derivative gets anywhere between a and x, you get a concrete, provable ceiling on how wrong the truncated approximation can possibly be. This is what separates Taylor approximation from an ordinary curve fit: the leftover error comes with a receipt, not just a hope that it is small.

Lineage

Special cases of series expansions for particular functions, sine, cosine, and arctangent among them, were known to James Gregory and Isaac Newton in the late seventeenth century, developed as isolated tricks for specific functions. Brook Taylor generalized the pattern into a single systematic method in 1715, matching successive derivatives at a point for any sufficiently smooth function, giving the construction its name. Colin Maclaurin popularized the special case centered at zero in his 1742 treatise, which is why that particular case is often called a Maclaurin series. Joseph-Louis Lagrange, near the end of the eighteenth century, supplied the remainder formula that turns the approximation from an unverified pattern into a rigorously bounded one, and Augustin-Louis Cauchy later gave an alternative integral form of the same remainder, tying it directly to the fundamental theorem of calculus.

The strongest case for it

Taylor approximation converts the evaluation of functions that have no simple closed arithmetic definition, sine, cosine, the exponential, the logarithm, into ordinary addition and multiplication of a polynomial, which is exactly how early mechanical calculators and the earliest digital computers evaluated these functions, and remains the conceptual basis for how they are computed today. Beyond raw computation, the method is the standard way physicists and engineers replace a complicated nonlinear relationship with a simpler linear or quadratic one near a point of interest; the small-angle approximation used to turn a pendulum's true nonlinear equation into the clean linear oscillator of second-order dynamics is nothing more than a first-order Taylor approximation of the sine function.

Its reach is bounded

The remainder formula is what makes the approximation trustworthy rather than merely convenient: an engineer can state, in advance, exactly how many terms are needed to guarantee an answer accurate to a specified tolerance over a specified range, rather than trusting that "more terms is better" without proof.

The strongest case against it

Taylor approximation is inherently local: it is built entirely from information at a single point a, and it can drift arbitrarily far from the true function as x moves far from a, even when the function itself remains perfectly well behaved everywhere. A more surprising limitation is that even an infinitely differentiable function is not guaranteed to equal its own full Taylor series anywhere except at the center point; the function e raised to the power of negative one over x squared, defined to be zero at x equals zero, has every derivative equal to zero at that point, so its Taylor series is the zero function everywhere, despite the true function being positive everywhere except at zero itself. A second honest boundary is that a Taylor series can have a limited radius of convergence: the series for 1 divided by (1 plus x squared), centered at zero, only converges for x between minus one and one, even though the original function is perfectly smooth for every real x. A common misconception is assuming that adding more terms always makes the approximation better everywhere; outside the radius of convergence, adding more terms makes the polynomial worse, not better.

Where it stands now

The construction and its remainder bound have been settled since Lagrange and Cauchy and are not in dispute. The method remains a central practical tool wherever a smooth process needs to be approximated by simple arithmetic with a guaranteed error ceiling, from calculator algorithms to the linearization of physical models throughout engineering and applied mathematics.

Test yourself

Build the Taylor polynomial of degree three for the natural logarithm of (1 plus x), centered at x equals zero, by computing the function's first three derivatives at that point and applying the pattern developed above. Use your polynomial to estimate the natural logarithm of 1.1, then use the Lagrange remainder form to state a concrete bound on how far your estimate could be from the true value. Finally, describe what would go wrong, in terms of the remainder and the radius of convergence, if you tried to use the same degree-three polynomial, still centered at zero, to estimate the natural logarithm of 5.

Primary sources and further reading

  • Brook Taylor, Methodus Incrementorum Directa et Inversa (1715)The original general method for building a polynomial approximation from a function's successive derivatives at a point.
  • Joseph-Louis Lagrange, Theorie des Fonctions Analytiques (1797)Supplies the remainder formula that turns the Taylor polynomial into a bounded, quantified approximation rather than an unverified guess.
  • Michael Spivak, Calculus (1967)A standard modern derivation of the Taylor polynomial from matching successive derivatives, together with the integral form of the remainder.
Taylor approximation · Nalanda