No history yet

Introduction to Taylor Series

Approximating Functions

Many functions in mathematics are complicated. Think of trigonometric functions like sin(x)sin(x) or the exponential function exe^x. Calculating their exact values can be tough. But what if we could approximate them using something much simpler, like a polynomial? Polynomials are friendly. They're just sums of powers of xx, like 3x2+5x23x^2 + 5x - 2, and they're easy to calculate, differentiate, and integrate.

The core idea is to build a polynomial that acts just like our target function, at least around a specific point. Let's say we want to approximate a function f(x)f(x) near a point x=ax = a.

The simplest approximation is a constant. The best constant value to use near x=ax=a is simply the function's value at that point, f(a)f(a). This is a flat horizontal line. It's not a great approximation, but it's a start.

We can do better with a line. The best line that approximates the function at x=ax=a is its tangent line. From basic calculus, we know the equation for the tangent line is:

P1(x)=f(a)+f(a)(xa)P_1(x) = f(a) + f'(a)(x-a)

Notice that this polynomial, P1(x)P_1(x), has the same value as f(x)f(x) at x=ax=a, and it also has the same first derivative. It matches the function's value and its slope at that specific point.

To get an even better fit, we can use a quadratic polynomial that also matches the function's second derivative (its concavity). If we keep matching higher and higher order derivatives, our polynomial becomes a better and better approximation of the original function near our chosen point. Extending this idea to an infinite number of terms gives us the Taylor series.

The Taylor Series Formula

A Taylor series is an infinite polynomial that represents a function. It's constructed by matching all the derivatives of the function at a single point, x=ax=a. The general formula for the Taylor series of a function f(x)f(x) centered at aa is:

f(x)=n=0f(n)(a)n!(xa)nf(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n

Let's break that down:

  • f(n)(a)f^{(n)}(a) is the nth derivative of the function ff, evaluated at the point aa. For n=0n=0, it's just the function itself, f(a)f(a).
  • n!n! is the factorial of nn (e.g., 3!=3×2×1=63! = 3 \times 2 \times 1 = 6).
  • (xa)n(x-a)^n is the polynomial term.

When the series is centered at a=0a=0, it gets a special name: the Maclaurin series. The formula is a bit simpler:

f(x)=n=0f(n)(0)n!xn=f(0)+f(0)x+f(0)2!x2+f(0)3!x3+f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^n = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \cdots

Common Expansions

Let's see this in action by finding the Maclaurin series for exe^x. We need to find its derivatives and evaluate them at a=0a=0. The function is f(x)=exf(x) = e^x. The magic of exe^x is that its derivative is always itself. So, f(x)=exf'(x) = e^x, f(x)=exf''(x) = e^x, and so on.

Evaluating these at x=0x=0, we get f(0)=e0=1f(0) = e^0 = 1, f(0)=e0=1f'(0) = e^0 = 1, f(0)=e0=1f''(0) = e^0 = 1, etc. All derivatives are 1 at the origin.

Plugging these into the Maclaurin series formula gives us:

ex=10!x0+11!x1+12!x2+13!x3+e^x = \frac{1}{0!}x^0 + \frac{1}{1!}x^1 + \frac{1}{2!}x^2 + \frac{1}{3!}x^3 + \cdots

Since $0! = 1$ and $1! = 1$, this simplifies to one of the most famous series in mathematics:

ex=1+x+x22+x36+=n=0xnn!e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots = \sum_{n=0}^{\infty} \frac{x^n}{n!}

Other essential functions have well-known Maclaurin series. For sine and cosine, the derivatives cycle through a pattern of four.

The Maclaurin series for sin(x)sin(x) includes only the odd powers of xx:

sin(x)=xx33!+x55!x77!+=n=0(1)nx2n+1(2n+1)!\sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n+1}}{(2n+1)!}

The Maclaurin series for cos(x)cos(x) includes only the even powers of xx:

cos(x)=1x22!+x44!x66!+=n=0(1)nx2n(2n)!\cos(x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots = \sum_{n=0}^{\infty} (-1)^n \frac{x^{2n}}{(2n)!}

When Does This Work?

An infinite sum doesn't always produce a finite number. For a Taylor series to be useful, it must converge. That is, as you add more and more terms, the sum must get closer and closer to the actual value of the function.

For a given function and a center point aa, the Taylor series might converge for all values of xx, for some values of xx, or only for x=ax=a. The set of xx values for which the series converges is called the interval of convergence. The distance from the center aa to the edge of this interval is the radius of convergence.

Lesson image

Luckily, for the common functions we just looked at (exe^x, sin(x)sin(x), and cos(x)cos(x)), their Maclaurin series converge for all real numbers. Their radius of convergence is infinite. This means you can use these series to approximate the functions for any value of xx, though you'll need more terms to get a good approximation the farther you are from the center point.

However, not all functions are so well-behaved. The series for other functions might only converge within a specific range, which is crucial to know before using the approximation.

Quiz Questions 1/5

What is the primary purpose of constructing a Taylor series for a function?

Quiz Questions 2/5

A Taylor series that is centered at the point a=0a=0 is known by what special name?

Taylor series provide a powerful way to re-express functions as infinite polynomials, making them easier to analyze and compute.