Taylor Series - Error Bounds
The Lagrange error bound of a Taylor polynomial gives the worst-case scenario for the difference between the estimated value of the function as provided by the Taylor polynomial and the actual value of the function. This error bound \(\big(R_n(x)\big)\) is the maximum value of the \((n+1)^\text{th}\) term of the Taylor expansion, where \(M\) is an upper bound of the \((n+1)^\text{th}\) derivative for \(a<z<x:\)
\[R_n(x)=\frac{M}{(n+1)!}(x-a)^{n+1}.\]
Contents
Derivation
The \(n^\text{th}\) degree Taylor polynomial at \(x=a\) is
\[P_n(x) = f(a) + \frac{f'(a)}{1!}(x-a) +\cdots+ \frac{f^n(a)}{n!}(x-a)^n.\]
Since the Taylor approximation becomes more accurate as more terms are included, the \(P_{n+1}(x)\) polynomial must be more accurate than \(P_n(x):\)
\[\begin{align} P_{n+1}(x) &= f(a) + \frac{f'(a)}{1!}(x-a) +\cdots+ \frac{f^n(a)}{n!}(x-a)^n + \frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}\\ &= P_n(x) + \frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}. \end{align}\]
Since the difference between \(P_n(x)\) and \(P_{n+1}(x)\) is just that last term, the error of \(P_n(x)\) can be no larger than that term. In other words, the error \(R_n\) is
\[R_n(x) = \max\left( \frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1} \right).\]
Since \(a\) and \(n\) are constant in this formula, terms depending only on those constants and \(x\) are unaffected by the \(\max\) operator and can be pulled outside:
\[R_n(x) =\frac{\max\big( f^{(n+1)}(a)\big)}{(n+1)!} (x-a)^{n+1}.\]
The largest value obtainable by \(f^{n+1}\) could not possibly exceed the maximum value of that derivative between \(a\) and \(x.\) Call the \(x\) value that provides that maximum value \(z\) and the error becomes
\[R_n(x)=\frac{f^{(n+1)}(z)}{(n+1)!}(x-a)^{n+1}.\]
Finding M
Let \(M\) be an upper bound on the \((n+1)^\text{th}\) derivative of \(f(x)\) for the interval between \(a\) and \(x\) such that
\[\big| f^{(n+1)}(z) \big| \leq M\]
for all \(z\in [a, x].\)
The upper bound of the \((n+1)^\text{th}\) derivative on the interval \([a, x]\) will usually occur at \(z=a\) or \(z=x.\) If given a defined interval on which to find the error, test the endpoints of the interval.
What is the upper bound of the third derivative of \(y = \sin(x)\) on the interval \([0, 2\pi]?\)
The third derivative of \(y=\sin(x)\) is \(y^{(3)} = -\cos(x),\) which oscillates between -1 and 1. So \(M=1\) and
\[\big| f^{(n+1)}(z) \big| \leq 1.\ _\square\]
Calculating Error Bounds
In order to compute the error bound, follow these steps:
- Step 1: Compute the \((n+1)^\text{th}\) derivative of \(f(x).\)
- Step 2: Find the upper bound on \(f^{(n+1)}(z)\) for \(z\in [a, x].\)
- Step 3: Compute \(R_n(x).\)
Find the error bound of the Maclaurin polynomial \(P_3\big(\frac{\pi}{2}\big)\) for \(f(x) = \sin(x).\)
The Maclaurin series is just a Taylor series centered at \(a=0.\) Follow the prescribed steps.
Step 1: Compute the \((n+1)^\text{th}\) derivative of \(f(x):\)
Since \(P_3\) is being investigated, \(n = 3,\) so write down the \(4^\text{th}\) derivative of \(f(x) = \sin(x):\) \[f^{(4)}(x) = \sin(x).\]Step 2: Find the upper bound on \(f^{(n+1)}(z)\) for \(z\in [a, x]:\)
The Maclaurin series is centered on \(a = 0\) and \(P_n(x)=P_3\big(\frac{\pi}{2}\big)\) implies \(x = \frac{\pi}{2}:\) \[\begin{align} f^{(4)}(0) &= \sin(0)=0\\ f^{(4)}\left(\frac{\pi}{2}\right) &= \sin\left(\frac{\pi}{2}\right)=1. \end{align}\] So \(M=1.\)Step 3: Compute \(R_n(x):\)
\[\begin{align} R_n(x)&=\frac{M}{(n+1)!}(x-a)^{n+1}\\ R_3\left(\frac{\pi}{2}\right)&=\frac{1}{(3+1)!}\left(\frac{\pi}{2}-0\right)^{3+1}\\ &= \frac{\pi^4}{384}.\ _\square \end{align}\]