In this topic, we'll talk about polynomial functions. But why do we need them, and what can we do with them? Solving problems from different fields, like mathematics or programming, requires the ability to make models and to solve equations. In turn, to successfully learn how to do this, you first need to know how to work with polynomials and transform them. Of course, everybody knows how to add and multiply numbers, but what really lies under these arithmetic operations? Let's start with some theories that you may be familiar with and try to deepen your knowledge about polynomials.
What is a polynomial?
Recall that a polynomial function in one variable has a standard form: , where are coefficients in real numbers, is a variable, and is a non-negative integer power of a variable.
Polynomials have a lot of practical implementations, and one of them is 3D modeling. At the end of the last century, mathematician Gabriel Taubin described and studied the surface in the form of a heart:
It looks so cute, and now it is ready for 3D printing!
Monomial
Every polynomial function consists of one or more parts. They are called monomials — expressions that include a coefficient, a variable, and its power: . For example, , where is a coefficient and is a variable to the power of 2. Below there is a graph of a monomial:
Sometimes it's not so easy to detect a monomial, but here are some helpful rules:
the expression always has a single term that doesn't go to zero ( is not a monomial);
the denominator doesn't have a variable ( is not a monomial);
the power of the variable is an integer ( is not a monomial).
How to determine a polynomial function?
In mathematics, there are different types of functions, and we need to determine them. Luckily, there are also some rules to detect a polynomial function:
the power of any term should be a non-negative number ( is not a polynomial);
in the denominator, there shouldn't be any variable ( is not a polynomial);
the variable shouldn't be under a root ( is not a polynomial).
Frequently used polynomials
One of the most used polynomial functions is the linear function. It looks like , where is a variable, and are constants. The polynomial has the degree of 1.
Let's draw a graph of the function:
You can see that the graph of the first degree polynomial is simply a straight line.
Another type of the polynomial function is called quadratic and has the degree of 2. The form is , where is a variable, and are constants. You can see a graph of below:
All graphs of the second degree have a common name — quadratic parabola, and in general look the same.
Does a cubic polynomial function look the same as quadratic? It has the degree of 3 and has the form of . Here is a plot of :
Third degree graphs also share a common name and mapping — cubic parabola.
Typically, 0 is always an exception to the rule. In our case, the function will be a polynomial with one term, but won't be a monomial.
Polynomials of higher degrees
One more important but complicated theme is polynomials of higher degrees. They find their application in regression problems, which are used in machine learning and help to describe dependencies in data. Let's have a look at two graphs below. You can see some data as orange spots. We will try to find a model (blue line) that describes the data more accurately.
In the first graph, the model is :
In the second graph, we use :
You can see that the second model suits the data better than the first one. Thus, we can use the polynomial to describe our data.
Conclusion
This topic has hopefully made clear to you some things that you may have heard about before. Below is a summary of the main points of this topic:
Standard form of a polynomial function is .
Every polynomial consists of one or more monomials that have a form of .
Power of any term of a polynomial is an integer non-negative number.
First degree polynomial is a linear function, and its graph is simply a straight line.
The graph of the second degree polynomial is called quadratic parabola; the third degree graph is also a parabola, but it has another shape and is called a cubic parabola.
Polynomial functions are widely used in machine learning and help to describe dependencies in data.