# 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 \((R_n(x))\) is the maximum value of the \((n+1)_{th}\) term of the Taylor expansion, where \(M\) is an upper bound of the \((n+1)_{th}\) derivative for \(a<z<x.\)

\[R_n(x)=\frac{M}{(n+1)!}(x-a)^{n+1}\]

#### Contents

## Derivation

The \(n_{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).\)

\[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+1}(x) = P_n(x) + \frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}\]

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\Big( \frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1} \Big).\]

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)_{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)_{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 end points 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.\]

## Calculating error bounds

In order to compute the error bound, follow these steps.

Step 1:Compute the \((n+1)_{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(\frac{\pi}{2})\) 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)_{th}\) derivative of \(f(x):\)Since \(P_3\) is being investigated, \(n = 3,\) so write down the \(4^{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(\frac{\pi}{2})\) implies \(x = \frac{\pi}{2}.\)

\[f^{4}(0) = \sin(0)=0\]

\[f^{4}(\frac{\pi}{2}) = \sin(\frac{\pi}{2})=1\]

So \(M=1.\)

Step 3:Compute \(R_n(x):\)\[R_n(x)=\frac{M}{(n+1)!}(x-a)^{n+1}\]

\[R_3(\frac{\pi}{2})=\frac{1}{(3+1)!}(\frac{\pi}{2}-0)^{3+1}\]

\[R_3(\frac{\pi}{2}) = \frac{\pi^4}{384}\]

**Cite as:**Taylor Series - Error Bounds.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/taylor-series-error-bounds/