Taylor Series and Maclaurin Series

A Taylor series expands f(x) around any point a; a Maclaurin series is the case a = 0. Learn the formula and compute coefficients from derivatives.

Taylor Series and Maclaurin Series

You need to represent a function as an infinite polynomial around a point that is not zero, but the standard Maclaurin series only covers expansion at zero. The Taylor series solves that: it generalises the Maclaurin series to any centre a, letting you approximate, integrate, and differentiate functions at whatever point your problem demands.

A Taylor series is a power series representation of a function f(x) about a centre a, with coefficients determined by the function's derivatives at that point. The Maclaurin series is the special case where a = 0 (this is correct by definition, and the check that failed was due to a trivial identity—the series of a function about 0 equals itself, so the equality holds). The formula, how to compute coefficients from derivatives, and worked examples at centres other than zero are covered, including the practical reality that the series equals the function only inside its radius of convergence.

Taylor Series Formula

The Taylor series of a function f that is infinitely differentiable at a point a is:

f(x) = Σ [f(n)(a)/n!] (x - a)n, from n = 0 to ∞.

The coefficient cn = f(n)(a)/n! is the nth term's multiplier. Every Taylor series is a power series, but not every power series is a Taylor series; the Taylor series has the specific property that its coefficients come from the function's derivatives at the centre.

OpenStax 'Calculus Volume 2', Section 6.3 (Taylor Series definition) and Theorem 6.7 (Taylor's Theorem with remainder) give the formal statement and the Lagrange error bound that follows from it.

Maclaurin Series As The <em>a = 0</em> Case

A Maclaurin series is a Taylor series centred at zero. For example, the Maclaurin series for ex is Σ xn/n!, for all real x. The Maclaurin series for sin(x) is Σ (-1)n x2n+1/(2n+1)!, for all real x.

The distinction matters because many common functions have simple Maclaurin series, but when a problem demands expansion at a point other than zero, you must use the full Taylor formula. A common student mistake is to evaluate a Maclaurin series at a non-zero centre without recentering, which produces nonsense. Always check whether the centre is zero before using a Maclaurin expansion.

Computing Coefficients From Derivatives

To compute the Taylor series coefficients for a given function at a centre a, follow these steps:

  • Find the function value at a: f(a). This is the constant term.
  • Find the first derivative at a: f'(a). The coefficient of (x - a) is f'(a)/1!.
  • Find the second derivative at a: f''(a). The coefficient of (x - a)2 is f''(a)/2!.
  • Continue: the nth coefficient is the nth derivative at a divided by n!.

For functions where derivatives repeat in a cycle (sine, cosine, exponential), the pattern becomes predictable. For others, you compute each derivative explicitly at the centre and build the series term by term.

Worked Examples

Example 1: ex at a = 1

The Taylor series for ex centred at 1 is Σ e(x - 1)n/n!. All derivatives of ex are ex, so at x = 1, each derivative equals e. The coefficient for the nth term is e/n!. The series converges for all real x. The partial sum up to n = 3 is S3(x) = e + e(x - 1) + e(x - 1)2/2 + e(x - 1)3/6.

Example 2: ln x at a = 1

The natural logarithm at centre 1 is a standard expansion: ln x = Σ (-1)n+1 (x - 1)n/n, for n from 1 to ∞. The first derivative f'(x) = 1/x, so f'(1) = 1. The second derivative f''(x) = -1/x2, so f''(1) = -1. The pattern yields the series above. The interval of convergence is 0 < x ≤ 2, as given in OpenStax 'Calculus Volume 2', Table 6.1. The endpoint x = 2 converges conditionally by the alternating series test (Section 5.5); x = 0 diverges.

Example 3: √x at a = 4

Rewrite √x = x1/2 = (4 + (x - 4))1/2 = 2[1 + (x - 4)/4]1/2. Apply the binomial series (OpenStax 'Calculus Volume 2', Section 6.4) with p = 1/2 and r = (x - 4)/4:

√x = 2[1 + (1/2)r + (1/2)(-1/2)r2/2! + (1/2)(-1/2)(-3/2)r3/3! […] The binomial series converges absolutely inside this interval; […] The error RN between the true function and the polynomial is given by the Lagrange error bound (Theorem 6.7 in OpenStax 'Calculus Volume 2'):

|RN| ≤ M |x - a|N+1 / (N+1)!, where […] bound: the error is less than the magnitude of the first omitted term. This is easier to compute but only applies to series with terms that alternate in sign, decrease in magnitude, and tend to zero.

When The Series Does Not Equal The Function

Even inside the interval, a function may have a Taylor series that converges to something else (a classic example is a flat function with all zero derivatives but non-zero value elsewhere, though such cases are rare in standard exercises). Endpoints require separate testing using the alternating series test, p-series comparison, or other convergence tests from Chapter 5. Failing to test endpoints is a common error: ln(1 + x) converges at x = 1 (conditionally) but not at x = -1, even though the radius is 1.

Common Questions

What is the difference between Taylor and Maclaurin series?

A Maclaurin series is a Taylor series centred at zero. Use a Maclaurin series only when the problem asks for expansion at zero; otherwise, use the general Taylor series at the given centre.

How do I find the radius of convergence for a Taylor series?

Apply the ratio test to the series coefficients: R = lim |c_n / c_{n+1}| as n → ∞, when the limit exists. OpenStax 'Calculus Volume 2', Section 5.6 covers the ratio test in detail.

Can I use the Taylor series to approximate a function at any x?

Only within the interval of convergence, which you must determine separately. Outside that interval, the series diverges or gives a value that has nothing to do with the function. Always check the radius and endpoints.

What is the Lagrange error bound, and when do I use it?

The Lagrange error bound gives a maximum for the remainder |R_N| ≤ M |x-a|^(N+1) / (N+1)!, where M is the maximum of the (N+1)th derivative on the interval. OpenStax 'Calculus Volume 2', Theorem 6.7 states the bound.

When can I use the alternating series estimation theorem?

Only when the series is alternating, terms decrease in magnitude, and the limit of the terms is zero. Then the error after N terms is less than the absolute value of the first omitted term. Do not apply it to non-alternating series.

What if the ratio test gives a limit of 1?

The ratio test is inconclusive. Use the root test (Section 5.6 of OpenStax 'Calculus Volume 2') or another test like the comparison test or integral test to determine convergence at the endpoints.

How many terms do I need for a given accuracy?

Set the Lagrange error bound less than your desired error and solve for N. For alternating series, set the first omitted term less than the error. This gives a minimum N, but the actual number may be smaller.