[Math] Approximating the exponential function with Taylor series

approximationexponential functiontaylor expansion

$$ T_k (x) = \sum_{n=0}^K \frac{x^n }{n!}$$

is the Taylor expansion for the exponent function around zero.

"The Taylor polynomial TK is a good approximation to the exponent
function when x is rather small in magnitude. When x is large in
magnitude, $exp(x)$ can still be approximated by picking a sufficiently
large integer m in such a way that $x/2^m $ is sufficiently small in
magnitude and approximating $$exp(x) = exp(x/2^m)^{2^m}$$
by
$$exp(x) = T_k(x/2^m)^{2^m}$$"

I do not understand the last two equations. Why do we raise the first one to the power of ($x/2^m$) and then that is approximated by $$exp(x) = T_k(x/2^m)^{2^m}$$

Can someone please explain it to me?

Best Answer

Possibly not the simplest answer but here are some estimates: You have $$\left(\exp\left(\frac{x}{2^m}\right)\right)^{2^m}=\exp\left(\frac{x}{2^m} 2^m\right)=\exp(x)$$ Then $$\left(T_k\left(\frac{x}{2^m}\right)\right)^{2^m} = \left(T_k\left(\frac{x}{2^m}\right)/\exp\left(\frac{x}{2^m}\right)\right)^{2^m}\exp(x)$$ When $x/2^m$ is much smaller than one then $T_k\left(\frac{x}{2^m}\right)/\exp\left(\frac{x}{2^m}\right)\approx 1- \frac{(x/2^m)^{k+1}}{(k+1)!}$ and then $$\left(T_k\left(\frac{x}{2^m}\right)/\exp\left(\frac{x}{2^m}\right)\right)^{2^m}\approx 1 -\frac{x^{k+1}}{2^{mk}}{(k+1)!} $$ so choosing $m$ large the relative error becomes very small. As an example calculating $\exp(10)$ to 5 decimal places you need in a direct Taylor expansion around 36 terms. But suppose you set $a=\frac{10}{1024}= \frac{10}{2^{10}}$. Then $$\exp(10)= \exp\left(a\right)^{1024} = (1+a+a^2/2+a^3/6+a^4/24)^{1024} $$ is also correct to around 5 decimal places. Calculating powers of 1024 is relatively cheap because it amounts to taking 10 times a square: $x^{1024}=((..(x^2)^2)^2)^2)^2)^2)^2)^2)^2)^2$.

Related Question