Lagrange Error Bound Lagrange Error Bound

Introduction

A Lagrange Error Bound is an interval showing how great the error could be between the actual value of a function and its Taylor polynomial approximation:

|R_n(x)| \leq \frac{f^{n+1}(z)}{(n+1)!}|x - a|^{n+1}

R_n(x)
: The error (Also known as the remainder)
a
: The center of the Taylor polynomial
n
: The degree of the Taylor polynomial
z
: The value between
a
and
x
where
f^{n+1}(z)
is at its maximum.


Since
f(x) = P_n(x) + R_n(x)
, if the error approaches zero, the Taylor polynomial converges to the function.
\text{If } \lim_{n \to \infty} R_n(x) = 0, \text{ then } \lim_{n \to \infty} P_n(x) = f(x)

Examples

Example 1:
Find the Lagrange Error Bound for the Taylor polynomial approximation of

f(x) = e^x
centered at
a = 0
, of degree
n = 2
, approximating
f(0.5)
.
\begin{align*} f(x) &= e^x \\ f'''(x) &= e^x \\ |R_2(0.5)| &\leq \frac{\max_{z \in [0, 0.5]} |e^z|}{(2+1)!}|0.5 - 0|^{2+1} \\ \end{align*}
On the interval
[0, 0.5]
,
e^z
is increasing, so its maximum value occurs at
z = 0.5
.
\begin{align*} |R_2(0.5)| &\leq \frac{e^{0.5}}{48} \\ \end{align*}
The error in approximating
e^{0.5}
is less than
0.035
.

Example 2:
Find the Lagrange Error Bound for the Taylor polynomial approximation of
f(x) = \sin(x)
centered at
a = 0
, of degree
n = 3
, approximating
f(0.2)
.
\begin{align*} f(x) &= \sin(x) \\ f^{(4)}(x) &= \sin(x) \\ |R_3(0.2)| &\leq \frac{\max_{z \in [0, 0.2]} |\sin(z)|}{(3+1)!}|0.2 - 0|^{3+1} \\ \end{align*}
For
z \in [0, 0.2]
,
|\sin(z)| \leq \sin(0.2)
.
\begin{align*} |R_3(0.2)| &\leq \frac{\sin(0.2)}{4!} (0.2)^4 \\ &= \frac{\sin(0.2)}{15000} \end{align*}
The error in approximating
\sin(0.2)
is less than
0.000014
.

Example 3:
Find the Lagrange Error Bound for the Taylor polynomial approximation of
f(x) = \ln(x)
centered at
a = 1
, of degree
n = 2
, approximating
f(1.2)
.
\begin{align*} f(x) &= \ln(x) \\ f'(x) &= x^{-1} \\ f''(x) &= -x^{-2} \\ f'''(x) &= 2x^{-3} = \frac{2}{x^3} \\ |R_2(1.2)| &\leq \frac{\max_{z \in [1, 1.2]} \left|\frac{2}{z^3}\right|}{(2+1)!}|1.2 - 1|^{2+1} \\ \end{align*}
On the interval
[1, 1.2]
,
\frac{2}{z^3}
is decreasing in magnitude as
z
increases, so its maximum magnitude occurs at
z = 1
.
\begin{align*} |R_2(1.2)| &\leq \frac{\left|\frac{2}{1^3}\right|}{3!} (0.2)^3 \\ &= \frac{2}{6} \cdot \frac{8}{1000} = \frac{1}{375} \approx 0.00267 \end{align*}
The error in approximating
\ln(1.2)
is less than
0.00268
.

Example 4:
Find the Lagrange Error Bound for the Taylor polynomial approximation of
f(x) = \sqrt{x}
centered at
a = 4
, of degree
n = 2
, approximating
f(4.5)
.
\begin{align*} f(x) &= x^{1/2} \\ f'(x) &= \frac{1}{2}x^{-1/2} \\ f''(x) &= -\frac{1}{4}x^{-3/2} \\ f'''(x) &= \frac{3}{8}x^{-5/2} = \frac{3}{8x^{5/2}} \\ |R_2(4.5)| &\leq \frac{\max_{z \in [4, 4.5]} \left|\frac{3}{8z^{5/2}}\right|}{(2+1)!}|4.5 - 4|^{2+1} \\ \end{align*}
On the interval
[4, 4.5]
,
\frac{3}{8z^{5/2}}
is decreasing in magnitude as
z
increases, so its maximum magnitude occurs at
z = 4
.
\begin{align*} |R_2(4.5)| &\leq \frac{\left|\frac{3}{8(4)^{5/2}}\right|}{3!} (0.5)^3 \\ &= \frac{\frac{3}{8 \cdot 32}}{6} \cdot \frac{1}{8} = \frac{3}{8 \cdot 32 \cdot 6} \cdot \frac{1}{8} = \frac{3}{12288} = \frac{1}{4096} \approx 0.000244 \end{align*}
The error in approximating
\sqrt{4.5}
is less than
0.000245
.

Example 5:
Find the Lagrange Error Bound for the Taylor polynomial approximation of
f(x) = e^x
centered at
a = 0
, of degree
n = 3
, approximating
f(0.5)
.

This is the same as Example 1, using a higher degree approximation.
\begin{align*} f(x) &= e^x \\ f^{(4)}(x) &= e^x \\ |R_3(0.5)| &\leq \frac{\max_{z \in [0, 0.5]} |e^z|}{(3+1)!}|0.5 - 0|^{3+1} \\ \end{align*}
\begin{align*} |R_3(0.5)| &\leq \frac{e^{0.5}}{4!} (0.5)^4 = \frac{e^{0.5}}{384} \end{align*}
The error in approximating
e^{0.5}
is less than
0.0042
.