The Lagrange remainder
Taylor's theorem with the Lagrange form of the remainder states: if
f is (n+1)-times differentiable on an
interval containing a and x, then there
is some point \xi strictly between a and
x with
R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}\,(x - a)^{n+1}.
It looks exactly like the next term of the Taylor series, except the derivative is evaluated
at the mystery point \xi instead of at the centre
a. (It generalises the
mean value theorem,
which is precisely the case n = 0.) We never learn which
\xi; we only need to bound
f^{(n+1)} over the interval, and that is usually enough.
Bounding the remainder for e^x
Let us prove the Maclaurin series of e^x actually converges to
e^x. Fix any x and work on the closed
interval between 0 and x. Take
a = 0.
Step 1 — write the remainder. All derivatives of
e^t are e^t, so
f^{(n+1)}(\xi) = e^{\xi}, and the Lagrange form gives
R_n(x) = \frac{e^{\xi}}{(n+1)!}\,x^{n+1}, \qquad \xi \text{ between } 0 \text{ and } x.
Step 2 — bound the unknown derivative. Since
\xi lies between 0 and
x, it is at most |x| in magnitude, and
e^t is increasing, so e^{\xi} \le e^{|x|}.
Therefore
|R_n(x)| = \frac{e^{\xi}}{(n+1)!}\,|x|^{n+1} \ \le \ e^{|x|}\,\frac{|x|^{n+1}}{(n+1)!}.
Step 3 — take the limit in n. Here
x is fixed, so e^{|x|} is a constant. The
only moving part is |x|^{n+1}/(n+1)!. A factorial outgrows any
fixed power, so for every fixed x
\lim_{n\to\infty}\frac{|x|^{n+1}}{(n+1)!} = 0.
Step 4 — squeeze. The remainder is trapped between
0 and a quantity going to 0:
0 \ \le \ |R_n(x)| \ \le \ e^{|x|}\,\frac{|x|^{n+1}}{(n+1)!} \ \longrightarrow \ 0.
Step 5 — conclude. Since R_n(x) \to 0 for every
real x, the partial sums P_n(x) converge
to f(x). The "\sim" becomes a genuine
equals sign, everywhere:
e^x = \sum_{n=0}^{\infty}\frac{x^n}{n!} \qquad \text{for all } x \in \mathbb{R}.
That is the payoff of the remainder estimate: controlling
R_n is what upgrades a formal series into an honest identity.
Let f be (n+1)-times differentiable on
an open interval containing a and x.
Then
f(x) = \sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k + R_n(x),
and there exists \xi strictly between
a and x such that
R_n(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1}.
Consequently the Taylor series of f converges to
f(x) at exactly those x where
R_n(x) \to 0. (The case n = 0 is the
mean value theorem.)
Convergence of the series is not automatic — the remainder really can fail to
vanish. The classic counterexample is
g(x) = \begin{cases} e^{-1/x^2}, & x \ne 0 \\ 0, & x = 0. \end{cases}
This function is infinitely differentiable at 0, yet
every derivative there is zero: g^{(n)}(0) = 0 for all
n (the exponential decay flattens the function faster than any
polynomial can detect). So its Maclaurin series is
\sum_{n=0}^{\infty}\frac{g^{(n)}(0)}{n!}x^n = 0 + 0 + 0 + \cdots = 0,
which converges everywhere — to the constant 0, not to
g. The series and the function agree only at the single point
x = 0; the remainder R_n(x) = g(x) \ne 0
for x \ne 0 and never shrinks. The moral: a Taylor series can be
perfectly convergent and still be the wrong answer. A function whose series does
reproduce it on a neighbourhood is called analytic — and
e^x, \sin,
\cos are, while g is the famous
smooth-but-not-analytic exception.
The remainder bound is not just theory — it is how a calculator decides when to stop. To
compute e to within 10^{-6}, take
x = 1 in the bound from Step 2:
|R_n(1)| \le e \cdot \frac{1}{(n+1)!} < \frac{3}{(n+1)!}.
We just need (n+1)! > 3 \times 10^6. Since
10! = 3{,}628{,}800, taking n+1 = 10,
i.e. summing through the n = 9 term, already guarantees the
target accuracy. No experimentation, no guesswork — the Lagrange remainder tells you in
advance exactly how many terms buy you a given number of correct digits. That is why Taylor
polynomials are the workhorse of numerical evaluation of e^x,
\sin, \log and the rest.