[Math] Approximating $e^x$ with a polynomial of degree $n$

approximationexponential functiontaylor expansion

Would the cubic equation that is the best approximation for $e^x$ just be the first 4 terms of its Taylor Series expansion?
$$1 + x + \frac{x^2}{2!} + \frac{x^3}{3!}$$
I guess it would depend on the bounds you are inspecting though? I'm not well-versed in dealing with infinities. Is there a cubic equation that is the best approximation on $[-\infty,\infty]?$

Best Answer

How close a function is to another definitely depends on how you define that notion. The $n$-th Taylor polynomial $T_n$ of $f$ at $x_0$ is the best approximation of $f$ among all degree $n$ polynomials, precisely in the sense that this is a unique polynomial satisfying

$$f(x) = T_n(x) + \mathcal{O}((x-x_0)^{n+1}) \qquad \text{as} \quad x \to x_0.$$

So this a priori concerns only what happens near $x_0$, and there is no reason that it should serve good approximation outside a neighborhood of $x_0$.

For instance, the following is a comparison of the degree 8 Taylor polynomial of $f(x) = \sin(2x)$ at $x = 0$ and the degree 8 polynomial interpolating 9 points $(k, f(k))$ for $k = -4, -3,\cdots, 4$.

$\hspace{6em}$ Comparison of two approximation schemes