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.
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
- Cube:
0.1³ = 0.001. - Divide by 6:
0.001/6 ≈ 0.000166667. - Subtract:
0.1 − 0.000166667 ≈ 0.0998333. - 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
- Use two terms,
x − x³/6, to estimatesin(0.2). - Use three terms,
1 + x + x²/2, to estimatee^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.
Sources
- OpenStax, "Calculus Volume 2, 6.3 Taylor and Maclaurin Series": Taylor polynomials and series; series for sin x and eˣ
- College Board, "AP Calculus AB and BC Course and Exam Description": Unit 10, Taylor polynomial approximations; Taylor or Maclaurin series for a function (BC only)
- Wolfram MathWorld, "Taylor Series": definition and examples
- Wikipedia, "CORDIC": the shift-and-add method many calculators use for sine
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
- Calculus EP26Average value of a function
- Calculus EP27Parametric equations
- Calculus EP28Polar coordinates
- Calculus EP29Do infinite sums add up?