math calculus analysis history

Taylor Series: Approximating the World One Term at a Time

Your calculator is hiding something from you.

When you type sin(0.1) and press Enter, the chip inside doesn't consult a lookup table and it doesn't perform some mystical trigonometric ritual. Instead, it runs a short loop of addition and multiplication — the most primitive arithmetic operations available — and out comes the answer, accurate to every decimal place the display can show. The secret behind that trick is one of the most useful ideas in all of mathematics: the Taylor series.

A Taylor series lets you swap any smooth function — sine, cosine, the exponential, the logarithm — for an infinite polynomial. And polynomials are just addition and multiplication. That's the whole game.

The Concept

Polynomials are the simplest functions we know. x, , , x⁴ — to evaluate one of these at a given point, all you need is multiplication. Add a few together and you have a polynomial. Any computer, any calculator, any human with a pencil can compute a polynomial to arbitrary precision.

The remarkable fact is this: almost every function you encounter in physics, engineering, or finance can be rewritten as an infinite sum of polynomial terms, at least near any point you care about.

The Taylor series of a function f(x) centered at a point a looks like this:

> f(x) = f(a) + f′(a)·(x−a) + f″(a)/2! · (x−a)² + f‴(a)/3! · (x−a)³ + ...

The notation f′, f″, f‴ means the first, second, and third derivative of f. The denominators are factorials: 2! = 2, 3! = 6, 4! = 24, and so on, growing rapidly so that each successive term shrinks fast.

Read this formula carefully and something strange emerges. The coefficients — the numbers multiplying each power of (x−a) — come entirely from the function's derivatives at the single point a. Not at x. Not at some average. At a.

That means: if you stand at one point and measure everything — the function's value, its slope, its curvature, the rate its curvature changes, and every higher derivative — you can reconstruct the function's behavior everywhere nearby. The function's global personality is encoded in its infinitely fine local structure. That's not obvious. It's not even intuitive. But it's true for all the functions we care about most.

When a = 0 (the most common choice), the series has a special name: the Maclaurin series, after the Scottish mathematician Colin Maclaurin, who popularized this special case in his 1742 work Treatise of Fluxions.

Why It Matters

Let's see what the formula produces for the functions you actually use.

The exponential function: > e^x = 1 + x + x²/2! + x³/3! + x⁴/4! + ...

This series works for every value of x, positive, negative, or imaginary. Each successive term is smaller than the previous one by a factor of x/n, so for modest values of x, just a handful of terms gives you engineering-level precision.

Sine: > sin(x) = x − x³/3! + x⁵/5! − x⁷/7! + ...

Only odd powers appear, and the signs alternate. This is not a coincidence — it falls directly out of the fact that the derivatives of sine cycle through {cos, −sin, −cos, sin, ...}, and every even derivative at zero happens to be exactly zero.

Cosine: > cos(x) = 1 − x²/2! + x⁴/4! − x⁶/6! + ...

Only even powers, alternating signs. The mirror image of sine's pattern.

These aren't approximations — they're equalities when you include infinitely many terms. In practice, you stop after five or eight terms, and the error is smaller than any calculator can display.

The History — A Long Chain of Priority

The series is named after Brook Taylor, an English mathematician born in 1685 who published the general result in his 1715 book Methodus Incrementorum Directa et Inversa (roughly: "Direct and Indirect Methods of Incrementation"). Taylor's version was the first systematic, published, general statement of the theorem.

But Taylor wasn't first. The Scottish astronomer James Gregory — who died at 36, cutting short one of the era's most productive mathematical careers — communicated the core idea in a letter to mathematician John Collins on February 15, 1671, more than forty years before Taylor's book appeared. Gregory had independently discovered the series expansions for sine, cosine, and arctangent, and even used them to compute the arctangent series: arctan(x) = x − x³/3 + x⁵/5 − x⁷/7 + ..., which yields the first infinite series for π when x = 1.

Gregory chose not to publish, fearing priority disputes. His results sat quietly in correspondence for decades.

And Gregory wasn't first either. Mādhava of Sangamagrāma, a mathematician in Kerala, India in the 14th century, discovered the power-series expansions for arctan, sine, and cosine roughly 300 years before Gregory — entirely independently and unknown to European mathematicians. The arctangent series is sometimes called the Mādhava–Gregory series in recognition of his priority.

It wasn't until 1772 that Joseph-Louis Lagrange declared Taylor's theorem the foundational result of differential calculus. For fifty-seven years after publication, the mathematical community had mostly overlooked it.

The Details

A Single Point Knows Everything

Here's what makes the Taylor series philosophically strange.

Suppose I hand you the function e^x and ask you to evaluate it at x = 100. That's a huge number — e^100 ≈ 2.7 × 10^43. Now I tell you: you can recover this from the derivatives of e^x at x = 0.

The first derivative of e^x is e^x itself. So f(0) = 1, f′(0) = 1, f″(0) = 1, and every derivative at 0 is 1. The Taylor series is just 1 + x + x²/2! + x³/3! + ..., and it converges to e^100 no matter how far away x = 100 seems.

The function has "remembered" its behavior at a distant point inside its infinitely detailed local structure at zero. Mathematicians call functions with this property analytic. All the elementary functions — e^x, sin(x), cos(x), ln(x) — are analytic.

(There's a beautiful caveat: not every smooth function is analytic. The function e^(−1/x²) is perfectly smooth, infinitely differentiable at x = 0, yet every one of its derivatives there equals zero. Its Taylor series is identically zero — which is obviously not the function itself. This shows that "smooth" and "can be reconstructed from a Taylor series" are not the same thing. It's one of the deeper surprises of real analysis.)

How Many Terms Do You Need?

For sin(0.1 radians), three terms give you accuracy to about ten decimal places. The first term alone, sin(x) ≈ x, is accurate to about one part in a thousand for angles under 10 degrees. That single-term approximation — the small-angle approximation — is everywhere in physics.

The exact equation for a pendulum is d²θ/dt² + (g/L)·sin(θ) = 0, which has no closed-form solution. Replace sin(θ) with just θ (the first Taylor term), and you get d²θ/dt² + (g/L)·θ = 0 — simple harmonic motion, with the famous period formula T = 2π√(L/g). Every grandfather clock, every physics class, every earthquake seismometer calibration depends on that single-term approximation being good enough. For angles under about 15 degrees, the error in the period is under 1%.

The Radius of Convergence

Not every Taylor series works for every value of x. The series for ln(1+x) — which is x − x²/2 + x³/3 − x⁴/4 + ... — converges only for −1 < x ≤ 1. Plug in x = 2 and the terms grow rather than shrink; the series diverges.

Each Taylor series has a radius of convergence: how far from the center point a the series remains valid. For e^x, sin(x), cos(x), it's infinite — you can go anywhere. For ln(1+x), it's 1.

The reason is geometric and elegant: the radius of convergence equals the distance to the nearest singularity in the complex plane. The logarithm has a singularity at x = −1, which is exactly distance 1 from the center a = 0. The series "knows" the singularity is there even if you're only working with real numbers, because the convergence boundary in the complex plane casts a shadow onto the real line.

Euler's Formula, Revealed

The most spectacular application of Taylor series might be the derivation of Euler's formula: e^(iπ) + 1 = 0.

Take the series for e^x and substitute x = iθ, where i is the square root of −1:

> e^(iθ) = 1 + iθ + (iθ)²/2! + (iθ)³/3! + ... > = 1 + iθ − θ²/2! − iθ³/3! + θ⁴/4! + iθ⁵/5! − ...

Now separate the real and imaginary parts:

> = (1 − θ²/2! + θ⁴/4! − ...) + i(θ − θ³/3! + θ⁵/5! − ...)

The first parenthesis is the Taylor series for cos(θ). The second is the series for sin(θ). So:

> e^(iθ) = cos(θ) + i·sin(θ)

Setting θ = π gives e^(iπ) = cos(π) + i·sin(π) = −1 + 0 = −1, hence e^(iπ) + 1 = 0.

This derivation is purely mechanical — you just substitute and sort terms by whether they contain i. Yet the result is one of the most celebrated equations in mathematics, uniting the exponential, the trig functions, complex numbers, and the constants e, π, i, 0, and 1 in a single line. Taylor series aren't just a computation tool; they're the bridge that reveals these connections.

Taylor Series in the Wild

GPS receivers can't solve their position equations directly — the relationship between a satellite's known position and your unknown position is nonlinear. The standard algorithm applies a first-order Taylor expansion to linearize those equations, solves the linear system, then refines the estimate iteratively. Every phone that gives you turn-by-turn directions is doing Taylor calculus many times per second.

Options traders use what they call "the Greeks" — Delta, Gamma, Theta, Vega — to track how an option's price changes. These are literally the first and second derivatives of the option-pricing formula. Daily profit-and-loss attribution is computed using a second-order Taylor expansion of the option's value: dV ≈ Δ·dS + ½Γ·(dS)² + Θ·dt. Every derivatives desk on Wall Street is running applied calculus built on this foundation.

Machine learning uses Taylor series implicitly in optimization. Gradient descent follows the first-order Taylor approximation of the loss function. Newton's method uses the second-order term (the Hessian matrix). The XGBoost gradient-boosting library — one of the most widely used tools in competitive data science — explicitly applies first- and second-order Taylor expansions when fitting each decision tree.

Computer hardware evaluates transcendental functions using polynomial approximations that descend from Taylor series. The specific algorithms used in practice — CORDIC (developed by Jack Volder in 1959) for some hardware, and minimax polynomial approximations for modern software libraries — are refinements designed to minimize error uniformly across an interval rather than just near the center. But the Taylor series is the conceptual ancestor of all of them.

Takeaways

  • Taylor series converts any smooth function into an infinite polynomial, which computers can evaluate using only addition and multiplication.
  • The coefficients come entirely from derivatives at a single point — a deep fact saying that a function's local structure contains its global behavior (within the radius of convergence).
  • The key formulas — sin(x) = x − x³/6 + ..., e^x = 1 + x + x²/2 + ..., cos(x) = 1 − x²/2 + ... — are among the most-used identities in applied science.
  • The small-angle approximation sin(θ) ≈ θ is the Taylor series at work in every pendulum, every optics equation, every small-oscillation problem in physics.
  • Euler's formula e^(iπ) + 1 = 0 is most naturally understood as a consequence of plugging imaginary numbers into the Taylor series for e^x — not a mysterious coincidence, but a straightforward algebraic consequence.
  • The radius of convergence is determined by the nearest singularity in the complex plane, even when you're only interested in real numbers — a reminder that complex numbers aren't a detour but the natural home of analysis.

Resources: - Calculus, Vol. 2 by James Stewart (Chapter on infinite series) — the standard undergraduate reference - 3Blue1Brown, "Taylor series" on YouTube — visual intuition for the approximation - MacTutor: Brook Taylor — history and original sources - MacTutor: James Gregory — the unsung prior discoverer