Greetings, dear readers! Today I propose to reflect on the following problem:
Given n pairs of points on the plane (x1;y1),...,(xn;yn) . Everything xi are different. Need to find a polynomial M(x) such that M(xi)=yi where i \ in \ {1, ..., n \}i \ in \ {1, ..., n \}
Translating into Russian, we have: Ivan thought n points on the plane, and Mary, having this information, should come up with a function that (at least) will pass through all these points. In the framework of this article, our task is to help Mary in a roundabout way. ')
“Why in a roundabout way?” - you ask. The answer is traditional: this article is a continuation of a series of articles of amateurish nature about mathematics, the purpose of which is to popularize the mathematical world.
Process
To begin with, it is worth noting that some number of interpolation polynomials already exist, of course. These polynomials are designed to solve the desired problem. Among them, the Lagrange and Newton polynomials are especially known.
And it is also necessary to clarify what “arbitrary functions” are (the term comes from the title of the current article). By them is meant any unary function whose result is a bijective argument mapping .
Within the framework of this article, I propose to take the decimal logarithm for such a function. lg and the following points:
(0;0)(1;1)(2;3)(3;0)
Representing them on a plane, you should get something like the following:
It is easy to notice that now the number of pairs of points is equal to n=4 .
When solving this problem, a certain system of equations comes to mind, where the number of linearly independent rows is n . What is this system of equations?
Let's try to write the function as a sum of decimal logarithms with coefficients of the variables (yes, so that the number of coefficients is equal ton ):
f(x)=alg(x+3)+blg(x+2)+clg(x+1)+d
Arguments at lg different to avoid linear strings in the future (you can think of others). And also, given that the domain of function definition is at least in[0;3] (based on the points specified by the condition), we thus ensure the existence of a range of values for the function lg in this domain.
Since we know n pairs of points, then we turn to them in order to build the following trivial system:
Of course, no one says that the resulting function will be minimal (the same Lagrange polynomial will give a shorter form). However, this method allows you to express a function through a set of arbitrary functions (although, referring to the restrictions specified above under the article).
Various examples
For dessert, we similarly construct a function in the radicals :
f(x)=ax3+bx2+cx+d
We make the equation system for finding the coefficients:
What is partly the Lagrange polynomial for a given set of points (since it implicitly implements the radical form of the algorithm from the article). The graph on the area of given points looks like this:
The most interesting thing in this story is that arbitrary functions for constructing a finite function can and should be combined. In other words, a function can be built immediately on radicals and logarithms, or maybe on something else (exponential functions, factorials, etc.). If only the resulting set of functions ensured linear independence of the rows when selecting coefficients. In general, for given n pairs of points it looks like this:
f(x)=a1∗g1(x)+...+an∗gn(x)
Where a1,..,an - coefficients to be found through the system of equations (SLAE), and g1,...,gn - Some functions that will provide linear independence in finding coefficients.
And then - according to the algorithm above, everything is completely the same. Not forgetting that g1,...,gn must be defined at the points specified by the condition.
For example, you can show a function consisting of completely different basic functions:
f(x)=ax2+b2x+cx+d
In order to satisfy a given set of points, the coefficients will then be the following (found strictly according to the algorithm from the article):
The graph will look almost the same as the previous one (on the area of specified points). If you want a more “smooth” graph, then you can look towards the factorial form, for example:
f(x)=a(x+2)!+b(x+1)!+cx!+d
Find the coefficients:
$$ display $$ \ begin {cases} \ displaystyle {2a + b + c + d = 0 \\ 6a + 2b + c + d = 1 \\ 24a + 6b + 2c + d = 3 \\ 120a + 24b + 6c + d = 0} \ end {cases} \ Rightarrow \ begin {cases} \ displaystyle {a = -13/16 \\ b = 17/4 \\ c = -3/8 \\ d = -9 / 4 } \ end {cases} $$ display $$