Lesson goal: Taylor Series & Polynomial Approximation

Previous: Function grapher with crosshairs | Home | Next: Linear vs exponential growth

Calculators and computer processors cannot directly compute functions like $\sin(x)$ or $e^x$. Instead, they use polynomial approximations!

In 1715, English mathematician Brook Taylor discovered that any smooth function can be represented near $x = 0$ as an infinite polynomial series: $$\sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \dots$$ where $3! = 6$, $5! = 120$, and $7! = 5040$.

The first few partial sums are called Taylor polynomials:
  • $P_1(x) = x$ (linear approximation)
  • $P_3(x) = x - \frac{x^3}{6}$ (cubic approximation)
  • $P_5(x) = x - \frac{x^3}{6} + \frac{x^5}{120}$ (quintic approximation)


Using the new plot2() function, we can plot $\sin(x)$ and its Taylor polynomial on the exact same chart to watch how closely the polynomial hugs the true curve!
plot2(x,y1,y2,label1,label2)
Move the mouse over a dotted box for more information.

Now you try. Add the next Taylor term (x^5 / 120) to see how much farther the approximation stays accurate!

Type your code here:


See your results here: