## Taylor Series

The long polynomial from the last module is actually called a Taylor series about (this is referred to as a Maclaurin series in some textbooks, but this course will use the term Taylor series). The last module gave the Taylor series for , , and . The logical next question is to ask whether every function has a Taylor series.

The answer is that most *reasonable* functions, and almost all of the functions encountered in this course, have a Taylor series. That is, every reasonable function can be written as

This module describes how to compute the coefficients for a given function .

## The definition of a Taylor series at x=0

The definition of the Taylor series of at is

Taylor series at

where is the th derivative of evaluated at 0. In other words, the coefficient mentioned above is given by

This seems circular, since the definition uses the function, and its derivatives, to write down the function. However, the definition only actually requires information about the function at a single point (in this case, 0). It is best to think of the Taylor series as a way of turning a function into a polynomial.

**Example**
Compute the Taylor series for using the above definition to see that it matches the given series from the last module.

Here, , and every derivative of is . Therefore, for all we have

and so for all . Plugging into the Taylor series formula gives

as claimed.

**Example**
Compute the Taylor series for using the above definition, and verify it matches the series found using Euler's formula.

Computing the derivatives, and then evaluating at gives the following table:

Thus,

confirming what was found last time.

**Example**
Compute the Taylor series for .

Again, by directly using the definition:

So it follows that

(since all the subsequent derivatives are 0), which is the original function. This should not be a surprise, since the Taylor series represents a function as a long polynomial (henceforth called by its proper name: *series*). If was a polynomial to begin with, it stands to reason that the Taylor series for should just be itself.

## Why Taylor series matter

The big idea of this module is that the Taylor series can be thought of as an operator (a machine) which turns a function into a series. This is a useful operator because some functions are hard (or even impossible) to express using combinations of familiar functions. Nevertheless, these functions can often be understood by computing their Taylor series.

**Example**
The *Bessel function*, denoted , is best defined by its Taylor series:

This series has only the even powers of , and it alternates, which is reminiscent of the series for cosine. One difference is that the denominator in the Bessel function grows more quickly than the denominator in the series for cosine. Thus, we might expect the graph to be a wave with a decreasing amplitude, which is exactly what we find:

It turns out that the Bessel function describes many physical phenomena, including the shape of a hanging chain as it is rotated, and the shape of the waves formed after a stone is thrown into a pool of water.

## Taylor series as polynomial approximants

The main reason Taylor series are useful is that they turn a potentially complicated function into something simple: a polynomial. Granted, this polynomial is infinitely long in general, but in practice it is only necessary to compute the first few terms to get a good, local approximation of the function. The more terms one includes, the better the polynomial approximates the function.

As an example, consider a particle on the number line with position function . At time 0, say its position is 5. Then one approximation of its position as a function of time is . Given more information, say its velocity at time 0 is 3, the approximation becomes better. The next approximation as a function of time is . Now, suppose its acceleration at time 0 is . Then is an even better polynomial approximation of the position function.

## EXERCISES

- What is the Taylor series of . This should be an easy one!
- What is the Taylor series of ? This, also, should not be *too* hard...
- Compute a few derivatives and figure out the first few terms of the Taylor series of . Have you seen this series before?
- What are the first two nonzero terms in the Taylor series of ?
- What is the coefficient of the cubic term in the Taylor series of ?
- Use what you know about Taylor series to determine the third derivative of at . That's a *lot* easier than computing the derivatives!
- The ERF function is defined in terms of a difficult integral:

- Even if you don't remember integrals all that well, you know how to integrate a polynomial, right? So, Taylor expand the integrand and integrate term by term to get the Taylor series for ERF.
- What is the third derivative of ERF(x) at zero?
- Why does a Taylor series have all those terms in the denominator? Let's see. Compute the Taylor series of by (1) using the binomial theorem (or multiplication) to expand that power; then (2) by differentiating the function and using the Taylor series formula. What do you notice when you keep computing higher derivatives?