[Math] How to find an upper bound on the error of this Taylor polynomial in $[0, 1]$

calculus

I have this Taylor polynomial of order $N = 3$, $x_{0} = 0$:

$P_{N}(x) = \sum_{n=0}^{N = 3} \frac{f^{(n)}(0)\cdot x^n}{n!} = x – x^2 + \frac{x^3}{2}$

The function is $f(x) = xe^{-x}$

How do I find an upper bound on the error in the interval $[0, 1]$ ?

I think I should use the Taylor theorem about errors but I'm not sure

Best Answer

The error term, $R_N$, is given by $$R_N = \frac{f^{(N+1)}(c)}{(N+1)!} x^{N+1}$$ for some $c$ on the interval $[0,1]$.

Here's an identity that will come in handy: $$\frac{d^N}{dx^N} (x e^{-x}) = (-1)^N e^{-x} (x-N)$$ In our case $N=3$ and according to Lagrange's error term we need the $N+1$ derivative of $f$, i.e. $$\frac{d^4}{dx^4} (x e^{-x}) = e^{-x} (x-4)$$

Thus the error is given by: $$R_N = \frac{f^{(N+1)}(c)}{(N+1)!} x^{N+1} = \frac{x^4}{4!} \frac{d^4}{dx^4} (x e^{-x}) = \frac{x^4}{4!} e^{-c} (c-4)$$ for some $c$ and $x$ in $[0,1]$.

We want to find the largest possible value this error can have on the interval $[0,1]$. Looking at the equation of $R_N$ we see this will happen when the numerator is maximized and the denominator is minimized, i.e. $x=1$ and $c=0$. Thus an upper bound for $|R_N|$ is: $$|R_N| \leq \left|\frac{1}{3!} \right| = \frac{1}{6} $$

Related Question