Approximating Non-Polynomial functions with Taylor Series

Sanjay Parajuli
3 min readApr 18, 2020

--

A complex non-polynomial function can be converted into approx. equal simpler polynomial function using Taylor Series.

Taylor Series is a very important and useful concept in Math and Physics, especially in Calculus. It is a powerful mathematical tool for approximating functions.

Non-polynomial functions are such functions which contain terms like: X⁻², sin(x), ln(x), etc. For e.g. 1/x² +sin(x), ln(x)-cos(x)+√0.5, etc.

Whereas, polynomial functions are such functions which are made up of terms like: , x/4, etc. which are much easier to deal with than non-polynomial functions. They are easier to compute, easier to take derivative and integrate. For e.g. 3x²+4x+5, x⁶/4 -1, etc.

So, if non-polynomial function can be transformed into polynomial function then it is very easier to work with.

Definition

Any function f(x) can be expressed as:

Taylor Series for f(x) around x=a

Sum of infinite terms is called Series in Math. An infinite sum of Taylor Polynomials is known as Taylor Series. If we take first 3 terms from above series, then it is called a cubic Taylor Polynomial.

For example, Taylor Series for cos(x) near x=0 is:

Taylor series for cos(x) near x=0

Taking only quadratic approximation (upto 3 terms) of cos(x) is: 1- x²/2. This polynomial looks almost similar as cos(x) around zero. So this is a very good approximation of cos(x). i.e. cos(2) ≈ 1- 2²/2.

So, if we have non-polynomial: cos(x)+2x. Its simple polynomial can be written as: 1- x²/2+2x.

Approximating cos(x) around x=0

Note: more the no. of terms in Taylor Polynomial, more accurate the approximation but the polynomial becomes more complex.

Similarly, Taylor Series for e^x near x=0 is:

Taylor Series of e^x near x=0
Approximating e^x around x=0

See more commonly used Taylor Series here: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf.

Radius Of Convergence

One more thing to be noted is: not every Infinite series converges for all values.

For e.g., Taylor series for e^x converges around every value for x. If Taylor Polynomial with infinitely many terms is taken and plotted against e^x for any value of x, the curves exactly match up around that point. But Taylor Series for ln(x) around x=1 only converges between (0,2). No matter how many terms are added to the approximated polynomial, the two graphs match up only up to radius of convergence. i.e. (0,2).

radius of convergence for ln(x) around x=1

In most of the books and blogs, I found that Taylor Series is described as difficult and complex concept to understand. In this post, I tried to explain in simple terms.

I’ve explained as far as I’ve understood the concept. There is a lot more to explore if you dive in. But still, if I’ve missed something very important please let me know.

Happy Learning :)

--

--