Q:

Approximation of exponential function by power series

Let $x \in (-\frac{1}{2},\frac{1}{2}), n \in \mathbb{N}$
How can I choose a $n$ that the the inequality is valid?
$$\left|e^x-\sum_{k=0}^n \frac{x^k}{k!}\right| \leq \frac{|e^x|}{10^{16}}$$
My ideas:
Try some values for $n$ and verify the inequality for value greater than $-1/2$ and less than $1/2$ because of the monotony of the exponential function... But I could not find a $n$.

A:

By Taylor's formula with integral remainder,
$$ \left|e^{x}-\sum_{k=0}^{n}\frac{x^k}{k!}\right| = \left|\frac{1}{n!}\int_{0}^{x} e^t(x-t)^n\,dt\right|\leq e^{|x|}\frac{|x|^{n+1}}{(n+1)!}\leq \frac{e^{|x|}}{2^{n+1}(n+1)!} $$
hence it is sufficient to pick some $n$ such that $2^{n+1}(n+1)!\geq 10^{16}$.
$ n = \color{red}{14}$ does the job.

A:

$$e^x-\sum_{k=0}^n \frac{x^k}{k!}= \sum_{k=n+1}^\infty \frac{x^k}{k!}= \frac{x^{n+1}}{(n+1)!}+ \frac{x^{n+2}}{(n+2)!}+\cdots = x^{n+1} {\left[ \frac{1}{(n+1)!}+ \frac{x}{(n+2)!}+\frac{x^2}{(n+3)!}+\cdots\right]}  $$
$$\left|x^{n+1} {\left[ \frac{1}{(n+1)!}+ \frac{x}{(n+2)!}+\frac{x^2}{(n+3)!+\cdots}\right]}+\cdots\right|\le |x|^{n+1} {\left[ \frac{1}{0!}+ \frac{x}{1!}+\frac{x^2}{2!}{+\cdots}\right]}= |x|^{n+1} e^x \le \frac{1}{2^{n+1}}e^x
$$
Now choose $n$ so that $\frac{1}{2^{n+1}}\le 10^{-16}$. 

