π Taylor Series
There are a lot of mathematical functions out there that are very nasty to work with. However there are very nice ones too! An example of the well behaved functions are the polynomial functions. They have well defined derivatives, integrals and are in general easy to work with as they have extensive mathematical tooling.
Now luckily there is a very handy trick to approximate nasty functions as polynomials! The most famous of those is the Taylor series1. The basic idea is that most functions (there are some constraints) can be approximated at a given point using polynomials so that the approximation is close to the function around that point.
To model the βcloseness around a given pointβ the Taylor series forces the derivatives of the functions to be equal. That means when we want to approximate a given function using , such that around a given point we get .
Letβs say we want to approximate the following function around . We can do this using a Taylor series of degree 2 as shown in the plot below.
The function is quite well approximated around (however if you stray too far off it explodes⦠Well I said approximated around that point!)
So how is that approximation calculated? The basic idea is that we assume a given function can be approximated around point using polynomials. So
The tells us how much we deviate from the point we want to approximate. Our condition is, that we want to approximate the function around with the extra condition of it being exact at .
With that in place we can start to calculate all the coefficients! First we use to calculate the first one:
as is for if almost all terms vanish and we get:
So how do we get the other terms? We use a little trick and derive the function! As before we want the function to be exact at , so we can say:
And with that little trick we can calculate all other coefficients. For example the next one would be
Usually the first couple of coefficients are enough to approximate the target function sufficiently.
For the function from above the first four approximations look as follows:
Sources and Annotations
Footnotes
-
Wikipedia contributors. (2025, March 11). Taylor series. In Wikipedia, The Free Encyclopedia. Retrieved 03:50, April 12, 2025, from https://en.wikipedia.org/w/index.php?title=Taylor_series&oldid=1279861417 β©