# Why do we need Taylor polynomials?

This question doubles as "Is my understanding of what a Taylor polynomial is for, correct?" but In order to write out a Taylor polynomial for a function, which we will use to approximate said function at a given value, we must first have the function itself. BUT, if we already have the function, why not just use it and get an exact value instead of using it's Taylor polynomial and only getting an approximation? Also, how does this benefit computer programmers?

-

Often times we know the function at very specific values and we want to approximate around that value. An easy example is to consider the exponential around zero. We know that the exponential function at zero is one. We also know that every derivative at zero is one, but it'd be much more difficult to calculate say $e^{0.1}$. However, using just an order three Taylor polynomial $$T_3(x) = 1 + x + \frac{x^2}{2} + \frac{x^3}{6}$$ I can calculate $e^{0.1}$ to be approximately $1.10517$ which is accurate to $6$ significant digits. Higher order approximations give greater accuracy.
How do your calculator/computer calculate $\pi$, $e$ and $\sin$ and $\cos$ values? I would bet, mostly using Taylor polynomial approximation.
For example, integrating $\arctan'(x)=\displaystyle\frac1{1+x^2} = 1-x^2+x^4-x^6\pm\dots$, we get that $\arctan(x) = x-\displaystyle\frac{x^3}3+\frac{x^5}5-\frac{x^7}7\pm\dots$. One still needs to think over that it is legal, but if we put $x=1$ in it, we get $$\frac\pi4=1-\frac 13+\frac 15-\frac 17\pm\dots$$