Watch on Instagram

Math Bytes · Calculus · Episode 31 · Infinite sequences and series (BC)

Taylor series

A Taylor series builds a polynomial that copies a function near a point, matching its value, slope, bend and more. Near 0, sin x = x − x³/6 + x⁵/120 − … and eˣ = 1 + x + x²/2 + x³/6 + …, and each extra term keeps the polynomial close over a wider stretch.

Posted · About a 1 minute watch, 3 minute read · Take the quiz

Copy a function with a polynomial

Polynomials only need adding and multiplying, so they are easy to compute. A Taylor series picks the polynomial that matches a function at one point as closely as possible:

  • the same value there,
  • the same slope (first derivative),
  • the same bend (second derivative),
  • and so on, one derivative per new term.

In general, the Taylor series of f at a is f(a) + f′(a)(x − a) + f″(a)(x − a)²/2! + f‴(a)(x − a)³/3! + …. When a = 0 it is also called a Maclaurin series.

Sine near zero

Angles are in radians. The series for sine is

sin x = x − x³/3! + x⁵/5! − … = x − x³/6 + x⁵/120 − …

The line x matches sine only very close to 0. Adding − x³/6 keeps the curve close a bit further out, and adding + x⁵/120 further still. Each new term hugs the real curve over a wider stretch.

Worked example: sin(0.1) with two terms

  1. Cube: 0.1³ = 0.001.
  2. Divide by 6: 0.001/6 ≈ 0.000166667.
  3. Subtract: 0.1 − 0.000166667 ≈ 0.0998333.
  4. Compare: the true value is sin(0.1) ≈ 0.0998334. They agree to six decimal places (0.099833).

eˣ works the same way

eˣ = 1 + x + x²/2! + x³/3! + … = 1 + x + x²/2 + x³/6 + …

Both of these series work for every x, but with only a few terms the copy is best near 0.

Try it yourself

  1. Use two terms, x − x³/6, to estimate sin(0.2).
  2. Use three terms, 1 + x + x²/2, to estimate e^0.1.

(Answers: 1. 0.2 − 0.008/6 ≈ 0.1986667; the true value is sin(0.2) ≈ 0.1986693. 2. 1 + 0.1 + 0.005 = 1.105; the true value is about 1.10517.)

Good to know

  • Taylor series are in AP Calculus BC only (Unit 10, "Taylor Polynomial Approximations of Functions" and "Taylor or Maclaurin Series for a Function"). This is Calculus 2 level.
  • Real calculators and computer libraries usually use other methods, such as CORDIC or carefully tuned polynomials after shrinking the angle. A Taylor polynomial is one way a machine can get sine from adding and multiplying.
  • How big the error is can be bounded (Lagrange error bound, alternating series bound); that was left out of the video.

Answer to the comment question

Use the first three terms, 1 + x + x²/2, at x = 1 to estimate e. 2.5. 1 + 1 + 1/2 = 2.5. The true value is e ≈ 2.718, so three terms are rough this far from 0; more terms get closer.

Test your knowledge

Quick quiz: Taylor series

4 multiple-choice questions. Pick one answer for each, then check how you did.

1What does a Taylor series match at its center point?
2Which is the series for sin x near 0?
3What happens as you add more terms?
4Using two terms, about what is sin(0.1)?

Sources

Video transcript

How can a calculator find a sine using only adding and multiplying?

A Taylor series builds a polynomial that copies a function near a point: its value, slope, bend, and more.

For sine near zero, it's x, minus x cubed over six, plus x to the fifth over one hundred twenty, and so on. Each new term hugs the real curve over a wider stretch.

At zero point one, just two terms give zero point zero nine nine eight three three, correct to six decimal places.

e to the x works the same way: one plus x plus x squared over two, and on.

Your turn. Use just the first three terms, one plus x plus x squared over two, to estimate e. Comment your answer below!

That's your byte.

More from Calculus

All Calculus lessons