Taylor series

Taylor series visualization

Share

Taylor series is a representation of a function as an infinite sum of a polynomial expression. These series are really helpful for programming because of the complexity of different functions. Consequently, is really helpful in terms of optimization and also gives a really good approximation of a function.

Taylor series of a function $f(x)$ centered in a is:

$ f(x)=P(a)=\displaystyle\sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n $

However, computers can’t do an infinit sum so the taylor series will be an aproximation of a determined function

$ f(x) \approx P(a,n)=f(a)+f'(a)(x-a)+\frac{f”(a)}{2}(x-1)^2+…+\frac{f^{(n)}}{n!}(x-1)^n \quad n\in{ \mathbb{N}}$

When $a=0$ the series are called Mac-Laurin series

It’s also very important to manage the error of the taylor series and we can calculate it with the Lagrange theorem where $b$ is the x point we want to calculate the error

$|ERROR|\leq sup{\frac{f(c)^{(n+1)}}{(n+1)!}(b-a)^n} \quad c\in(a,b)$

I have developed a simulation about the taylor series where you can visualize the taylor series of different function such as cosine, sine, logarithm and exponential.

print
4

Leave a Reply

Your email address will not be published. Required fields are marked *