Correct bound on Taylor polynomial approximation Given $f(x)=e^{-x}$ and $x_0=0$, I need to find the smallest value of $n$ such that $|P_n(x)-f(x)|<10^{-5}$ for all $x\in[0,1]$.
I've calculated the Maclaurin series of this function to be $\tilde{f}=\sum_{n=0}^{\infty}\frac{(-1)^n}{n!}x^n$.
To satisfy $|P_n(x)-f(x)|<10^{-5}$, I'm looking for an error term so that $\left|\frac{x^{n+1}}{(n+1)!}f^{(n+1)}(\xi)\right|<10^{-5}$, where $0<\xi<x$. For all $x\in[0,1]$, $|f^{(n+1)}(\xi)|\leq1$. Now, $\left|\frac{x^{n+1}}{(n+1)!}f^{(n+1)}(\xi)\right|<10^{-5}\Rightarrow\left|\frac{x^{n+1}}{(n+1)!}\cdot1\right|<10^{-5}$. Since $x$ is always nonnegative in the specified interval, this becomes $\frac{x^{n+1}}{(n+1)!}<10^{-5}$.
I want to find a bound for $x^{n+1}$. Since $x\in[0,1]$, $x^{n+1}=0$ when $x=0$, $x^{n+1}=1$ when $x=1$, and $0<x^{n+1}<1$ when $x\in(0,1)$. I bound $x^{n+1}$ by $x^{n+1}\leq1$. Now I claim $\frac{1}{(n+1)!}<10^{-5}$.
By algebra, this is equivalently $(n+1)!>10^5$. It is evident $8!=40,320$ and $9!=362,880$, so $n+1=9\Rightarrow n=8$.
I claim the smallest possible $n$ satisfying $|P_n(x)-f(x)|<10^{-5}$ for all $x\in[0,1]$ is $n=8$. I'm not convinced by my work. Is there something I didn't consider correctly or overlooked?
 A: What you did is absolutely correct. Though it might be worth mentioning that $e^{-x}$ is strictly decreasing, so that's why you can use $\xi=0$ as an upper-bound.
A: Given $f(x)=e^{-x}$ and $x_0=0$, find the smallest value of $n$ such that $|P_n(x)-f(x)|<10^{-5}$ for all $x\in[0,1]$.
The Maclaurin series of this function to be $\tilde{f}=\sum_{n=0}^{\infty}\frac{(-1)^n}{n!}x^n$.
To satisfy $|P_n(x)-f(x)|<10^{-5}$, look for an error term so that $\left|\frac{x^{n+1}}{(n+1)!}f^{(n+1)}(\xi)\right|<10^{-5}$, where $0<\xi<x$. For all $x\in[0,1]$, $|f^{(n+1)}(\xi)|\leq1$ (this happens since $e^{-x}$ is strictly decreasing as Gabor pointed out). Now, $\left|\frac{x^{n+1}}{(n+1)!}f^{(n+1)}(\xi)\right|<10^{-5}\Rightarrow\left|\frac{x^{n+1}}{(n+1)!}\cdot1\right|<10^{-5}$. Since $x$ is always nonnegative in the specified interval, this becomes $\frac{x^{n+1}}{(n+1)!}<10^{-5}$.
Find a bound for $x^{n+1}$. Since $x\in[0,1]$, $x^{n+1}=0$ when $x=0$, $x^{n+1}=1$ when $x=1$, and $0<x^{n+1}<1$ when $x\in(0,1)$. I bound $x^{n+1}$ by $x^{n+1}\leq1$, so $\frac{1}{(n+1)!}<10^{-5}$.
By algebra, this is equivalently $(n+1)!>10^5$. It is evident $8!=40,320$ and $9!=362,880$, so $n+1=9\Rightarrow n=8$.
$\therefore$ the smallest possible $n$ satisfying $|P_n(x)-f(x)|<10^{-5}$ for all $x\in[0,1]$ is $n=8$.
