Taylor Series
To build a polynomial that copies a function near a point, make it match the function's value there, then its slope, then its curvature, and so on forever. Each match pins down one coefficient, , and the result is the Taylor series.
What the symbols mean
- nth derivative at a
How the function bends at the center, at every order.
- Factorial
n·(n − 1)⋯2·1. It cancels the factors that differentiating (x − a)ⁿ produces.
- Center
Where the series matches the function exactly. With a = 0 it's called a Maclaurin series.
What the symbols mean
- Remainder
The error after using the degree-n Taylor polynomial.
- Derivative bound
Any number with |f⁽ⁿ⁺¹⁾| ≤ M between a and x.
Explanation
A Taylor series is simply a power series built to imitate one particular function near one particular point. (It's named after Brook Taylor, the English mathematician who published the general method in 1715.) It's how calculators find or : they add up a few polynomial terms. The formula looks heavy, but it's just (the function's value, slope, bend and so on at the center), (a correction factor that undoes the numbers differentiating produces), and (the powers we met last lesson). It's less scary than it looks, so bear with it.
Where the formula comes from. You already know the first step of this idea: the tangent line. It's the straight line that has the same value and the same slope as at , and near it's a decent stand-in for . So why stop at matching the slope? Match the curvature too, and the next derivative, and so on.
Here's how that pins down the coefficients. Suppose . Setting kills every term but the first, so . Differentiate and set again: . Differentiate once more and the term leaves behind , so . After derivatives, has turned into , so . That's where the factorial comes from.
Taylor polynomials. Stopping at degree gives . is the tangent line, also matches the curvature, and so on. Each extra term copies one more feature of the function, so it hugs the function over a wider stretch.
Series to know (all centered at 0):
| Function | Series | Valid for |
|---|---|---|
| all | ||
| all | ||
| all | ||
Does the series equal the function? , where is whatever error is left over. So the series equals exactly when , and Taylor's inequality is how you check. For , and the remainder goes to 0 for every , because eventually crushes any power .
A common mistake. It's tempting to think that matching every derivative at one point guarantees the series equals the function everywhere. It doesn't. The series for matches it perfectly at but is useless at , outside the radius of convergence. Even inside it, you need the remainder to go to 0. For the functions in the table it does, on the intervals listed.
Build new series from old ones. For or , substitute into a known series and multiply, exactly like last lesson. That's far faster than computing derivatives, and since a function has only one power series at a given center, you're guaranteed to get the same answer.
Where this leads: Euler's formula. Look at the first three rows of the table together. Substitute into the series for : the powers of cycle through , so the terms sort themselves into the cosine series plus times the sine series, and . That one line is why sines and cosines appear when a differential equation has complex roots: a spring or a circuit oscillates because of how these three series fit together.
See it
Worked examples
Find the Maclaurin series for .
- 1
Every derivative of is again, which equals 1 at .
Find for at and use it to estimate .
- 1
, so , and so .
Find the Maclaurin series for .
- 1
No derivatives needed: substitute for in the series for .
Practice
Type your answer and check it. Solve them all to complete the lesson.
What is the coefficient of in the Maclaurin series of ?
Find for at .
What is the coefficient of in the Maclaurin series of ?
Use Taylor's inequality with to bound the error of for on .
What is the coefficient of in the Maclaurin series of ?
Find .
A pendulum's period for a swing of amplitude (in radians) has the Taylor series , where is the small-swing period. For a swing, about what percent longer is the period than ? Use the first two terms.
The hardest one here. Get it, and you've got this lesson.
The coefficients of the Maclaurin series of are the Fibonacci numbers. Find the coefficient of .
Where it's used
Physics runs on Taylor polynomials: gives the simple pendulum, and expanding energy around an equilibrium gives Hooke's law. Newton's method and gradient descent are built on first- and second-order Taylor approximations.