So, for the function $f(x)=e^x$ centered around $x_0=0$, I need to find a Taylor polynomial of degree $n$ such that it approximates $f(x)$ within $10^{-6}$ on the interval $[0,0.5]$.
I took this to mean that the error (|$R_n(x)$|) has to be less than or equal to $10^{-6}$.
The formula for the error would be $|R_n(x)|=|\frac{1}{(n+1)!}f^{(n+1)}(z)(x-x_0)^{n+1}$|.
In trying to find the degree of the Taylor polynomial, we are essentially trying to solve for $n$ with the upper-bound being $10^{-6}$.
This means $|R_n(x)|=|\frac{1}{(n+1)!}f^{(n+1)}(z)(x-x_0)^{n+1}|=|\frac{1}{(n+1)!}e^zx^{n+1}| \leq 10^{-6}$. Using a CAS, I brute-forced a numerical solution and got that the first positive solution is approximately $n=6.34354$.
Since the Taylor polynomial must be of integer degree, I rounded up and concluded that a seventh-degree polynomial would be enough to give an estimate with the requested accuracy. Is there any other way of doing this though? I feel like this is a very ad hoc solution that wouldn't be appropriate in all cases.