Taylor Series

A Taylor series approximates any smooth function as an infinite sum of polynomial terms, with coefficients determined by the function’s derivatives at a single point. Brook Taylor formalized the result in 1715. The central idea: a polynomial that matches a function and all its derivatives at one point will closely match the function near that point. Taylor series let you replace complicated functions with manageable polynomials, which is why they show up everywhere in calculus, physics, computer science, and numerical analysis. They are also the foundation of essentially every transcendental-function calculator routine in software.

Taylor series approximation of sin(x)
Taylor series — a function is approximated by a polynomial that matches the function and all its derivatives at a chosen point. Higher-order Taylor polynomials fit a wider range of x.

The Definition

The Taylor series of a function \( f(x) \) centered at \( x = a \) is:

$$ f(x) = \sum_{n=0}^{\infty} \dfrac{f^{(n)}(a)}{n!} (x – a)^n $$

$$ = f(a) + f'(a)(x-a) + \dfrac{f”(a)}{2!}(x-a)^2 + \dfrac{f”'(a)}{3!}(x-a)^3 + \cdots $$

Each term involves a successively higher derivative of \( f \) evaluated at \( a \), divided by the corresponding factorial. The result is a polynomial in \( (x – a) \) of infinite degree.

When \( a = 0 \), the Taylor series is called a Maclaurin series — a special case used so often it has its own name.

Why It Works

Each term in a Taylor series makes the approximation match one more derivative of the function at the centering point \( a \).

  • The zeroth-order term \( f(a) \) makes the polynomial equal the function value at \( a \).
  • The first-order term \( f'(a)(x – a) \) makes the slope (first derivative) match.
  • The second-order term \( \dfrac{f”(a)}{2!}(x – a)^2 \) makes the concavity (second derivative) match.
  • Each subsequent term makes the next higher derivative match.

With enough terms, the polynomial matches the function exactly at the centering point and to a very good approximation in a neighborhood around it. For ‘nice’ functions (analytic functions), the Taylor series converges to the function value for every \( x \) in some neighborhood, and the polynomial is the function.

Common Maclaurin Series

A handful of Maclaurin series (Taylor series centered at zero) show up so often they should be memorized:

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

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

$$ \cos x = \sum_{n=0}^{\infty} \dfrac{(-1)^n x^{2n}}{(2n)!} = 1 – \dfrac{x^2}{2!} + \dfrac{x^4}{4!} – \dfrac{x^6}{6!} + \cdots $$

$$ \dfrac{1}{1-x} = \sum_{n=0}^{\infty} x^n = 1 + x + x^2 + x^3 + \cdots \quad (|x| < 1) $$

$$ \ln(1+x) = \sum_{n=1}^{\infty} \dfrac{(-1)^{n+1} x^n}{n} = x – \dfrac{x^2}{2} + \dfrac{x^3}{3} – \cdots \quad (-1 < x \le 1) $$

Notice the elegant relationship: \( \sin x \) has only odd powers (it is an odd function), \( \cos x \) has only even powers (it is an even function), and \( e^x \) has all powers (it is neither).

Euler’s Identity from Taylor Series

Substituting \( ix \) (where \( i = \sqrt{-1} \)) into the series for \( e^x \):

$$ e^{ix} = 1 + ix + \dfrac{(ix)^2}{2!} + \dfrac{(ix)^3}{3!} + \cdots = \left(1 – \dfrac{x^2}{2!} + \dfrac{x^4}{4!} – \cdots\right) + i\left(x – \dfrac{x^3}{3!} + \dfrac{x^5}{5!} – \cdots\right) $$

The two parts are exactly the Maclaurin series for \( \cos x \) and \( \sin x \). So:

$$ e^{ix} = \cos x + i \sin x $$

Setting \( x = \pi \) gives Euler’s famous identity \( e^{i\pi} + 1 = 0 \), often called the most beautiful equation in mathematics. It connects five fundamental constants (e, i, π, 1, 0) and three basic operations (addition, multiplication, exponentiation) in one expression.

Practical Use: Approximation

Truncating a Taylor series after a few terms gives a polynomial approximation valid near the centering point. The error gets smaller as you add more terms and as \( x \) gets closer to \( a \).

Example. Approximate \( \sin(0.1) \) using the first two terms of the Maclaurin series.

\( \sin(0.1) \approx 0.1 – (0.1)^3 / 6 = 0.1 – 0.000167 = 0.099833 \).

True value: \( \sin(0.1) \approx 0.0998334 \). Two terms of the Taylor series get five decimal places of accuracy. This is exactly how scientific calculators compute trig values — they reduce the angle to a small value near zero, then evaluate a truncated Taylor (or Padé) approximation.

Radius of Convergence

Not every Taylor series converges for every \( x \). The radius of convergence is the largest distance \( R \) from the centering point such that the series converges for all \( |x – a| < R \).

  • \( e^x, \sin x, \cos x \) — converge for all real \( x \). Infinite radius of convergence.
  • \( 1/(1-x) \) — converges only for \( |x| < 1 \). The function has a singularity at \( x = 1 \) that prevents the series from extending beyond.
  • \( \ln(1+x) \) — converges for \( -1 < x \le 1 \).

For most practical purposes, you need to know what the radius of convergence is for the function you are working with, and stay within it.

Related study notes: Exponential Function, Derivatives in Calculus, Limits in Calculus, Sine Cosine Tangent.

Frequently Asked Questions

What is a Taylor series?

A Taylor series approximates any smooth function as an infinite sum of polynomial terms, with coefficients determined by the function’s derivatives at a single point. The series centered at x = a is f(a) + f'(a)(x-a) + f”(a)(x-a)²/2! + f”'(a)(x-a)³/3! + … Each term makes the polynomial match one more derivative of the function at x = a.

What’s the difference between Taylor and Maclaurin series?

A Maclaurin series is just a Taylor series centered at x = 0 — a special case. So ‘Maclaurin series of e^x’ and ‘Taylor series of e^x centered at 0’ refer to the same expansion: 1 + x + x²/2! + x³/3! + … The name distinction is mostly historical (Colin Maclaurin published the special case separately in 1742, though Taylor had already covered it in 1715).

What is the Taylor series of sin x?

The Maclaurin series of sin x is x – x³/3! + x⁵/5! – x⁷/7! + … It contains only odd powers of x (because sine is an odd function) and the signs alternate. The series converges for all real x. Truncating after two or three terms gives excellent approximations for small angles, which is exactly how calculator routines compute sine.

Why is e^(iπ) + 1 = 0?

Substituting x = iπ into the Maclaurin series for e^x and separating real and imaginary parts gives e^(iπ) = cos(π) + i sin(π) = -1 + 0i = -1. Rearranging: e^(iπ) + 1 = 0. The identity is called Euler’s identity and is often celebrated as the most beautiful equation in mathematics because it connects five fundamental constants (e, i, π, 1, 0) and three operations (addition, multiplication, exponentiation).

What is the radius of convergence?

The radius of convergence is the largest distance R from the Taylor series’ centering point such that the series converges for all x within |x – a| < R. Some Taylor series (e^x, sin x, cos x) converge everywhere — infinite radius. Others (1/(1-x), ln(1+x)) converge only within a bounded interval. You need to know the radius before using a Taylor series in calculations.

What are Taylor series used for in practice?

Scientific calculator routines for sin, cos, exp, log all use truncated Taylor or related polynomial approximations. Physics uses Taylor expansions to linearize complex equations near equilibrium (small-angle pendulum, small-deformation elasticity). Numerical analysis uses Taylor truncation error to estimate accuracy. Computer graphics uses series to approximate transcendental functions on hardware. Without Taylor series, modern computation of these functions would be much slower and less accurate.