MAT159H1/Unit 04
Unit 04 · Analysis 1B

Taylor's Theorem

Approximating a function by a polynomial, with a precise formula for the error. This is the rigorous heart of "good enough" approximation, and the bridge from the Mean Value Theorem to the infinite series of the next two units.

Why it matters & where it comes from
Why it exists

Polynomials are easy to compute, differentiate, and integrate; most functions are not. Taylor's theorem says how well a polynomial approximates a function near a point, and — crucially — puts an exact, provable bound on how big the error can possibly be.

In the real world

It is how calculators and computers evaluate $\sin$, $\cos$, $e^x$ to many digits; how physics linearizes hard problems (small-angle $\sin\theta\approx\theta$ in a pendulum); and how Newton's method for root-finding is derived from the linear (degree-1) Taylor approximation.

Story & open questions

Brook Taylor published the series in 1715; Madhava in 14th-century India had found the key cases (sine, cosine, arctangent) three centuries earlier. A function can fail to equal its own Taylor series everywhere it converges — Cauchy's 1823 example $e^{-1/x^2}$ (at $x=0$) has every derivative zero at the origin, so its Taylor series is identically $0$, yet the function itself is not.

By the end you can

Taylor polynomials and the remainder theorem

Definition Taylor polynomial

$\displaystyle T_n(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k$ — the unique degree-$n$ polynomial matching $f$ and its first $n$ derivatives at $a$.

Theorem Taylor with Lagrange remainder

If $f$ is $n+1$ times differentiable on an interval containing $a$ and $x$, then $f(x)=T_n(x)+R_n(x)$ where $R_n(x)=\dfrac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}$ for some $c$ strictly between $a$ and $x$.

Proof sketch
The case $n=0$ is exactly the Mean Value Theorem: $f(x)-f(a)=f'(c)(x-a)$.
For general $n$, apply the Generalized (Cauchy) Mean Value Theorem to $g(t)=f(x)-T_n$-built-at-$t$ and $h(t)=(x-t)^{n+1}$; both vanish appropriately, and unwinding the ratio $g'/h'$ repeatedly isolates $f^{(n+1)}(c)$ in the remainder term.
Example

For $e^x$ about $a=0$: $e^x=1+x+\tfrac{x^2}{2}+\cdots+\tfrac{x^n}{n!}+R_n$, with $R_n(x)=\tfrac{e^c}{(n+1)!}x^{n+1}$ for some $c$ between $0$ and $x$.

Error bounds in practice

Example Cosine near $0$

View $1-\tfrac{x^2}{2}$ as the degree-3 Taylor polynomial of cosine (the cubic coefficient is zero, so $T_3=T_2$). Then $|f^{(4)}|=|\cos|\le1$ everywhere, so the Lagrange error at $x=0.1$ is at most $\dfrac{(0.1)^4}{4!}\approx4.2\times10^{-6}$.

Example How many terms for 4-decimal accuracy?

Estimate $e$ using $T_n(1)$ for $e^x$ at $a=0$, accurate to $10^{-4}$.

$|R_n(1)|=\dfrac{e^c}{(n+1)!}\le\dfrac{3}{(n+1)!}$ for $0<c<1$ (using $e<3$).
Need $\dfrac{3}{(n+1)!}<10^{-4}$: $n=7$ gives $\tfrac{3}{40320}\approx7.4\times10^{-5}$, small enough.
Why bound $f^{(n+1)}$, not compute $c$? The theorem guarantees $c$ exists but never tells you where — the whole technique is to bound $|f^{(n+1)}|$ over the entire interval between $a$ and $x$, giving a worst-case bound that holds no matter what $c$ turns out to be.
Common pitfalls

• The remainder point $c$ is unknown and generally different for each $x$ — bound $|f^{(n+1)}|$ over the whole interval, don't try to pin down $c$.
• A Taylor series can converge yet not equal $f$ — only $R_n\to0$ as $n\to\infty$ guarantees equality (Cauchy's $e^{-1/x^2}$ example above is the standard warning).
• Centre matters: expanding about a nearby $a$ shrinks $(x-a)^{n+1}$ and usually improves accuracy dramatically.
• $T_n$ has degree $n$ but may have fewer than $n$ nonzero terms (odd/even symmetry can make coefficients vanish, as with $\cos x$ above).

Practice

Practice 1

Write the degree-3 Taylor polynomial of $\sin x$ about $0$.

Answer
$x-\tfrac{x^3}{6}$.
Practice 2

Bound the error of approximating $e^{0.5}$ by $1+0.5+\tfrac{0.25}{2}$.

Solution
$R_2(0.5)= \dfrac{e^c(0.5)^3}{6}$ for $0<c<0.5$; using $e^{0.5}<2$, $|R_2|\le\tfrac{2(0.125)}{6}\approx0.042$.
Practice 3

Use a Taylor polynomial to estimate $\sqrt{1.1}$.

Answer
$\sqrt{1+x}\approx1+\tfrac{x}{2}-\tfrac{x^2}{8}$ at $x=0.1$ gives $\approx1.0488$.
Practice 4 · Degree needed

How large must $n$ be so that $T_n(1)$ for $\sin x$ about $0$ is accurate to within $10^{-6}$?

Solution
$|R_n(1)|\le \dfrac{1}{(n+1)!}$ (since all derivatives of $\sin$ are bounded by $1$). Need $(n+1)!>10^6$; $10!=3628800$ works, so $n=9$ suffices.
Practice 5 · Small-angle approximation

Bound the error in $\sin\theta\approx\theta$ for $|\theta|\le0.1$ radians.

Answer
$T_2(\theta)=\theta$ (the quadratic coefficient is $0$), with remainder $R_2(\theta)=-\tfrac{\cos c}{6}\theta^3$ for some $c$ between $0$ and $\theta$. Since $|\cos c|\le1$, $|R_2|\le\tfrac{(0.1)^3}{6}\approx1.7\times10^{-4}$.
Practice 6 · Centre choice

Why does expanding $\ln x$ about $a=1$ (rather than $a=0$, where it's undefined) make sense for estimating $\ln(1.05)$?

Answer
$a$ must be a point where $f$ is smooth, and the error term scales with $(x-a)^{n+1}$ — choosing $a=1$ close to $x=1.05$ makes $(x-a)=0.05$ small, giving fast convergence, whereas $a=0$ is not even in the domain.
Practice 7 · When the series misleads

Explain why "the Taylor series of $f$ at $a$ converges for all $x$" does not by itself prove $f(x)=T_\infty(x)$.

Answer
Convergence of the series only says the partial sums $T_n(x)$ converge to some number; whether that number is $f(x)$ additionally requires $R_n(x)\to0$, which is a separate condition (false for Cauchy's $e^{-1/x^2}$ example at $a=0$).
Practice 8 · Newton's method link

Show that Newton's method update $x_{n+1}=x_n-f(x_n)/f'(x_n)$ is exactly solving $T_1(x)=0$ for the degree-1 Taylor polynomial of $f$ centred at $x_n$.

Answer
$T_1(x)=f(x_n)+ f'(x_n)(x-x_n)$. Setting $T_1(x)=0$ and solving for $x$ gives exactly $x=x_n-f(x_n)/f'(x_n)$ — Newton's method takes one step toward the root of the linear approximation.

Expanded topic checklist

Course coverage. This unit is part of the complete MAT159H1 topic map. It should cover the following items before you move on:

Textbook/source alignment

Use the current UofT MAT159H1 calendar topics as the coverage spine, and pair lecture notes with a Spivak-style proof-calculus text for extra reading. The exact assigned textbook should still be checked against the instructor syllabus.

Core theorem map

The Taylor spine is: polynomial matching derivative data, theorem with remainder, and explicit error control on a stated interval.

Study routine. A Taylor answer without a remainder statement is only a formal polynomial; attach the error term whenever approximation is the point.

Deep practice extensions

Use these after the main practice set. They are designed to force definition-level reasoning, theorem selection, and mixed application rather than routine calculation only.

Extension 1 · Polynomial

Find the degree-4 Taylor polynomial for $\cos x$ at $0$.

Guide
$1-x^2/2+x^4/24$.
Extension 2 · Limit

Use Taylor expansion to compute $\lim_{x\to0}(\sin x-x)/x^3$.

Guide
$\sin x=x-x^3/6+O(x^5)$, so the limit is $-1/6$.
Extension 3 · Remainder bound

Bound the error of $\sin xpprox x$ for $|x|\le0.1$.

Guide
Using Taylor with remainder, $|\sin x-x|\le |x|^3/6\le 0.1^3/6$.
Extension 4 · Center

Why is a Taylor polynomial about $a=1$ different from one about $a=0$?

Guide
It matches derivatives at a different point, so it gives local accuracy near $1$ rather than near $0$.