Lagrange Error Bound
Practise this section (12)Your calculator says $\sin(0.2) \approx 0.19866933$. Behind the scenes it is using a polynomial, because polynomials only need addition and multiplication. But a polynomial is only an approximation. How do you know it is close enough? Can you be sure the error is smaller than $0.001$, without ever knowing the exact answer? The Lagrange error bound gives you that guarantee.
The Lagrange Error Bound
The Taylor polynomial $P_n(x)$ of $f$ about $x = a$ matches $f$ perfectly at $x = a$ and drifts away as you move off. The difference is the remainder (or error):
$$R_n(x) = f(x) - P_n(x)$$We almost never know $R_n(x)$ exactly, because that would mean knowing $f(x)$ exactly. What we can do is put a ceiling on $|R_n(x)|$. Look at how the polynomial $x - \frac{x^3}{6}$ hugs $\sin x$ near $0$ and separates farther out.
The error depends on two things. First, how far $x$ is from the center $a$. Second, how wildly the function can still change, which is measured by the next derivative, $f^{(n+1)}$. If the $(n+1)$st derivative is small, the function barely bends beyond what $P_n$ captured, so the error is small.
Why this formula? The error is the first Taylor term that $P_n$ left out, which looks like $\frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}$ for some unknown number $c$ between $a$ and $x$. We can't find $c$, so we replace $f^{(n+1)}(c)$ by its worst case, $M$.
The curve |f⁽ⁿ⁺¹⁾(t)| stays below the ceiling M (dashed line) on the shaded region between a and x, which is where t must stay. Outside that stretch the curve could exceed M without affecting the bound.Only the stretch of the interval between $a$ and $x$ matters. The blue curve is allowed to escape the ceiling outside the shaded region, but not inside it.
Now practice. The first exercise asks you to state the theorem in words.
State the Lagrange error bound for the Taylor polynomial $P_n(x)$ of $f$ about $x=a$. Say what $M$ represents and on which interval it must be a bound.
State the Lagrange error bound for the Taylor polynomial $P_n(x)$ of $f$ about $x=a$. Say what $M$ represents and on which interval it must be a bound.
Let $P_3(x)$ be the Maclaurin polynomial of degree 3 for $f(x)=e^x$. It is given that $\left|f^{(4)}(x)\right|\le2$ on $[0,0.5]$. Use the Lagrange error bound to find an…
Let $P_3(x)$ be the Maclaurin polynomial of degree 3 for $f(x)=e^x$. It is given that $\left|f^{(4)}(x)\right|\le2$ on $[0,0.5]$. Use the Lagrange error bound to find an upper bound for $|e^{0.5}-P_3(0.5)|$.
A function $f$ has second-degree Taylor polynomial $P_2$ about $x=1$, and $\left|f'''(x)\right|\le6$ for all $x$ in $[1,1.4]$. Find the Lagrange error bound for…
A function $f$ has second-degree Taylor polynomial $P_2$ about $x=1$, and $\left|f'''(x)\right|\le6$ for all $x$ in $[1,1.4]$. Find the Lagrange error bound for $|f(1.4)-P_2(1.4)|$.
Finding M for Common Functions
Often the problem hands you $M$. On the AP exam you will sometimes have to find and justify it yourself. The recipe is to differentiate the right number of times, then find the largest value of $|f^{(n+1)}|$ on the interval between $a$ and $x$.
Some derivatives are easy to bound:
| Function | Why $M$ works |
|---|---|
| $\sin x$ or $\cos x$ | Every derivative is $\pm\sin x$ or $\pm\cos x$, so $\left|f^{(k)}(x)\right| \le 1$ for all $x$ |
| $e^x$ on $[0, b]$ with $b > 0$ | Every derivative is $e^x$, which is increasing, so $M = e^b$ (or any number larger than $e^b$) |
| $\sqrt{x}$, $\ln(1+x)$, ... | Compute $f^{(n+1)}$ and see where $|f^{(n+1)}|$ is largest on the interval |
Let $P_3(x)=x-\frac{x^3}{6}$ be the third-degree Maclaurin polynomial for $f(x)=\sin x$. Explain why $\left|f^{(4)}(x)\right|\le1$ for all $x$, and use the Lagrange…
Let $P_3(x)=x-\frac{x^3}{6}$ be the third-degree Maclaurin polynomial for $f(x)=\sin x$. Explain why $\left|f^{(4)}(x)\right|\le1$ for all $x$, and use the Lagrange error bound to bound $|\sin(0.2)-P_3(0.2)|$.
Let $P_2(x)=1-\frac{x^2}{2}$ be the Maclaurin polynomial of degree 2 for $f(x)=\cos x$. Use the Lagrange error bound, with $\left|f'''(x)\right|\le1$, to show that…
Let $P_2(x)=1-\frac{x^2}{2}$ be the Maclaurin polynomial of degree 2 for $f(x)=\cos x$. Use the Lagrange error bound, with $\left|f'''(x)\right|\le1$, to show that $P_2(0.3)$ approximates $\cos(0.3)$ with error less than $0.005$.
Let $f(x)=\sqrt x$ and let $P_2$ be its second-degree Taylor polynomial about $x=4$, which is $P_2(x)=2+\frac{x-4}{4}-\frac{(x-4)^2}{64}$. (a) Find $f'''(x)$ and the…
Let $f(x)=\sqrt x$ and let $P_2$ be its second-degree Taylor polynomial about $x=4$, which is $P_2(x)=2+\frac{x-4}{4}-\frac{(x-4)^2}{64}$. (a) Find $f'''(x)$ and the maximum of $|f'''(x)|$ on $[4,5]$. (b) Use the Lagrange error bound to bound $|\sqrt5-P_2(5)|$. (c) Show that $P_2(5)$ approximates $\sqrt5$ within $0.002$.
From an Error Bound to an Interval
If $|f(x) - P_n(x)| \le E$, then $f(x)$ is within $E$ of the polynomial value. In other words,
$$P_n(x) - E \;\le\; f(x) \;\le\; P_n(x) + E$$That gives you an interval guaranteed to contain $f(x)$, even if you know nothing else about $f$. You can also rule out values that fall outside it.
Here is the picture for one of the practice problems, where $P_3(0.5) = 1.75$ and the error bound is $0.03125$.
Number line with the interval P₃(0.5) ± E = 1.75 ± 0.03125, from 1.71875 to 1.78125. The value 1.77 falls inside and is possible for f(0.5); 1.8 falls outside and is ruled out.For a function $f$, $f(2)=1$, $f'(2)=0.5$, $f''(2)=-0.25$, and $f'''(2)=0.375$, and $\left|f^{(4)}(x)\right|\le10$ on $[2,2.5]$. (a) Find $P_3(2.5)$, the third-degree…
For a function $f$, $f(2)=1$, $f'(2)=0.5$, $f''(2)=-0.25$, and $f'''(2)=0.375$, and $\left|f^{(4)}(x)\right|\le10$ on $[2,2.5]$. (a) Find $P_3(2.5)$, the third-degree Taylor polynomial about $x=2$ evaluated at 2.5. (b) Find the Lagrange error bound. (c) Write an interval that must contain $f(2.5)$.
A function $f$ has $f(0)=2$, $f'(0)=-1$, $f''(0)=3$, $f'''(0)=-6$, and $\left|f^{(4)}(x)\right|\le12$ for all $x$ in $[0,0.5]$. (a) Find $P_3(0.5)$. (b) Find the…
A function $f$ has $f(0)=2$, $f'(0)=-1$, $f''(0)=3$, $f'''(0)=-6$, and $\left|f^{(4)}(x)\right|\le12$ for all $x$ in $[0,0.5]$. (a) Find $P_3(0.5)$. (b) Find the Lagrange error bound at $x=0.5$. (c) Could $f(0.5)=1.8$? Could $f(0.5)=1.77$? Justify each answer using your interval.
Trapping a Number: $\ln(1.2)$ and $e$
You can use the bound to pin down a number you cannot compute exactly, such as $e$, $\ln(1.2)$, or $\sqrt{5}$. You pick a function whose value at some $x$ equals that number, build $P_n(x)$, and add and subtract the error bound.
For $e$, there is one extra wrinkle. The derivatives of $e^x$ on $[0, 1]$ are all $e^x \le e$, but you don't know $e$ exactly. The trick is to use a known easy upper bound such as $e < 3$ as your value of $M$.
More terms means a tighter trap. That is exactly what the next exercises show, and what we explore in the last section.
Let $f(x)=\ln(1+x)$ and $P_3(x)=x-\frac{x^2}{2}+\frac{x^3}{3}$. (a) Show that $f^{(4)}(x)=-\frac{6}{(1+x)^4}$ and that $\left|f^{(4)}(x)\right|\le6$ on $[0,0.2]$. (b)…
Let $f(x)=\ln(1+x)$ and $P_3(x)=x-\frac{x^2}{2}+\frac{x^3}{3}$. (a) Show that $f^{(4)}(x)=-\frac{6}{(1+x)^4}$ and that $\left|f^{(4)}(x)\right|\le6$ on $[0,0.2]$. (b) Use the Lagrange error bound to bound $|\ln(1.2)-P_3(0.2)|$. (c) Compute $P_3(0.2)$ and write an interval that must contain $\ln(1.2)$.
Use $P_5(x)=1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+\frac{x^5}{120}$, the Maclaurin polynomial for $e^x$, and the fact that $e<3$. (a) Compute $P_5(1)$ as a…
Use $P_5(x)=1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+\frac{x^5}{120}$, the Maclaurin polynomial for $e^x$, and the fact that $e<3$. (a) Compute $P_5(1)$ as a decimal. (b) Use the Lagrange error bound, with $M=3$, to bound $|e-P_5(1)|$. (c) Use (a) and (b) to show that $2.71<e<2.73$.
How Many Terms Do You Need?
Sometimes the question is reversed. You are told how accurate you must be, and asked for the smallest degree $n$ that guarantees it. You can't solve the inequality with algebra, because of the factorial. So you try $n = 1, 2, 3, \dots$ and make a short table, stopping at the first $n$ that works.
A twist for sine
The Maclaurin polynomial for $\sin x$ has only odd powers, so $P_6(x) = P_5(x)$ is the same polynomial. But the bound treats them differently. Using $n = 6$ means the bound has $7!$ in the denominator, which is smaller than the bound you would get using $n = 5$. So when you search for the smallest $n$, check every $n$ in turn. Don't skip the even ones.
Let $P_n(x)$ be the Maclaurin polynomial of degree $n$ for $f(x)=e^x$. On $[0,1]$, every derivative satisfies $\left|f^{(k)}(x)\right|\le3$. Find the smallest $n$ for…
Let $P_n(x)$ be the Maclaurin polynomial of degree $n$ for $f(x)=e^x$. On $[0,1]$, every derivative satisfies $\left|f^{(k)}(x)\right|\le3$. Find the smallest $n$ for which the Lagrange error bound guarantees $|e-P_n(1)|<0.001$. Show the values you check.
Let $P_n(x)$ be the Maclaurin polynomial of degree $n$ for $f(x)=\sin x$. Every derivative of $f$ satisfies $\left|f^{(k)}(x)\right|\le1$. Find the smallest $n$ for…
Let $P_n(x)$ be the Maclaurin polynomial of degree $n$ for $f(x)=\sin x$. Every derivative of $f$ satisfies $\left|f^{(k)}(x)\right|\le1$. Find the smallest $n$ for which the Lagrange error bound guarantees $|\sin2-P_n(2)|<0.01$. Show the values of $\frac{2^{n+1}}{(n+1)!}$ you check. Note that for $\sin x$ only odd-degree terms appear.
Summary
Back to the start: the calculator can claim $\sin(0.2) \approx 0.19867$ because the polynomial $x - \frac{x^3}{6}$ comes with a guarantee. The error is at most $\frac{0.2^4}{4!} \approx 0.00007$, so the first four decimals are safe. That guarantee is what the Lagrange error bound provides.
Can't find your problem here?
The AI checks one of your exercises: paste the problem with your answer or take a photo of it.