Sequences & Series · Lesson 4 of 4 · ~6 min

Functions as infinite polynomials

Predict

Build polynomials from $\sin$'s derivatives at $0$ and keep adding terms: $P_1 = x$, then $P_3 = x - \frac{x^3}{6}$, and so on. Each new term improves the fit to $\sin x$ — improves it how?

Hold that thought. Step through degree N and watch where the gray polynomial peels away from the ink $\sin$ curve.
Try
Try itSet degree N to $1$ and drag probe x outward from $0$ to watch the error stat grow. Then park the probe at $x = 2.00$ and step $N$ up through $3, 5, 7, 9$. Finish by sliding the probe out to $x = 6.00$ with $N = 9$.
Notice

$P_1(x) = x$ hugs $\sin x$ only in a tight window — at the probe's default $x = 2.00$ its error is $1.0907$. Now climb the degrees with the probe parked there: $P_3$ misses by $0.2426$, $P_7$ by $0.0014$, $P_9$ by $5.00\text{e-}5$. Each new term buys another digit or more of accuracy there. But slide the probe to $x = 6.00$ and even $P_9$ misses by $7.3080$ — the peel-away point moves outward with every term; it never disappears.

Explain

The recipe is Taylor's: match every derivative you can afford at one point. At $0$, the derivatives of $\sin$ cycle $1, 0, -1, 0, \dots$, so only odd powers survive, with alternating signs:

$$\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots$$

The $3! = 6$ under $x^3$ is bookkeeping from matching the third derivative. Truncating after degree $N$ gives $P_N$. For $\sin$, the full series converges to the function at every $x$ — an infinite polynomial that is the function — but any finite $P_N$ carries an error like the first omitted term, $\frac{|x|^{N+1}}{(N+1)!}$: microscopic near $0$, brutal at $x = 6$. A truncated Taylor series is a local instrument.

APPLICATIONThis is the idea behind how machines evaluate sin: fold the input into a small interval near 0, then run a short polynomial there — or CORDIC shift-and-add in calculator hardware.
About this model

What it represents: the exact Taylor polynomials of $\sin$ about $0$, degrees $1$ through $9$, and the exact pointwise error $|\sin x - P_N(x)|$ at the probe.

What it leaves out: every degree past $9$, and the remainder theory that bounds the error without ever computing $\sin$ — Lagrange's form gives $|\text{error}| \le \frac{|x|^{N+1}}{(N+1)!}$. One honesty note about the application: production math libraries do not use raw Taylor coefficients. They reduce the argument to a small interval, then evaluate a short polynomial whose coefficients are tuned to minimize worst-case error, with Taylor as the starting point.

Source: the theorem and the Lagrange remainder — Taylor's theorem.

Apply
Checkpoint — prove it to yourself

At $x = 2$ the errors fell $0.2426 \to 0.0014$ from degree $3$ to $7$, yet at $x = 6$ degree $9$ still missed by $7.3080$. What does adding a term actually buy?

$P_3(x) = x - \dfrac{x^3}{6}$. Where does the $6$ come from?

Transfer: you need $\sin(0.1)$ to within $10^{-6}$. What is enough?

Key idea

A Taylor series rebuilds a function from its derivatives at one point. The infinite series equals $\sin$ everywhere; every finite truncation is a local instrument — superb near the center, useless far away — and the starting point for how machines evaluate functions.

← All lessons