A direct application of the factor theorem is **Lagrange interpolation** .

Let \(n\) a natural number and look at \(n+1\) measuring points \((t_0,y_0)\), \((t_1,y_1)\), \(\ldots\), \((t_n,y_n)\) with the first coordinates different from each other. Then there exists exactly one polynomial function of degree less than or equal to \(n\) such that the graph of the polynomial function passes through the measuring points (so \(f(t_i) = y_i\) for \(i=0,1,\ldots,n\) ). The interpolation formula can be written as \[f(t) =\sum_{i=0}^ny_i\cdot \prod_{\begin{aligned}j&=0\\ j&\ne i\end{aligned}}^n\frac{t-t_j}{t_i-t_j}\tiny.\]

In an earlier section we already saw how such a function can be constructed for \(n=1\), the straight line two two points: first you make for \(i=0\) and \(i=1\) a first degree \(f_i(t)\) that satisfies \(f_i(t_i) = y_i\) and \(f_i(t_j) = 0\) for \(j\ne i\) ). The formula for this is: \[f_0(t) =y_0\cdot\frac{t-t_1}{t_0-t_1}\quad\text{en}\quad f_1(t) =y_1\cdot\frac{t-t_0}{t_1-t_0}\] The requested function \(f\) is then the sum \(f_0(t)+f_1(t)\).

Given two points \((1,4)\) and \((6,2)\), what is the function rule \(y(t)=a\,t+b\) for which the graph goes through these two points?

\({{22}\over{5}}\)

Lagrange interpolation immediately gives a function definition: \[\begin{aligned}y(t)&=4\cdot\frac{t-6}{1-6} + 2\cdot\frac{t-1}{6-1} & \phantom{abcxyz}\blue{\text{Lagrange interpolation formula}}\\ \\ &=-{{4\cdot \left(t-6\right)}\over{5}}+{{2\cdot \left(t-1\right)}\over{5}} & \phantom{abcxyz}\blue{\text{simplification}}\\ \\ &=-{{2}\over{5}}t+{{22}\over{5}} & \phantom{abcxyz}\blue{\text{elaboration}}\end{aligned}\] Check that \(y(1)=4\) and \(y(6)=2\).

So the function definition is \[y(t)=-{{2}\over{5}}t+{{22}\over{5}}\tiny.\] The vertical intercept is \(f(0)={{22}\over{5}}\).

The graph of this function is drawn together with the two given points in the figure below.

Below is an example of a quadratic polynomial function passing through three given points.

Given three points \((-12,2)\), \((-8,9)\) and \((4,-6)\), what is the function definition \(y(t)=at^2+bt+c\) in case the graph of \(y\) goes through these three points?

\(-{{3 t^2}\over{16}}-2 t+5\)

The quadratic function that has value \(2\) in \(t=-12\) and that has in\(t=-8\) and \(t=4\) value \(0\) is \(\displaystyle 2\dfrac{(t+8)(t-4)}{(-12+8)(-12-4)}={{1}\over{32}} (t+8)(t-4)\).

The quadratic function that has value \(9\) in \(t=-8\) and that has in \(t=-12\) and \(t= 4\) value \(0\) is \(\displaystyle 9\dfrac{(t+12)(t-4)}{(-8+12)(-8-4)}=-{{3}\over{16}} (t+12)(t-4)\).

The quadratic function that has value \(-6\) in \(t=4\) and that has in \(t=-12\) and \(t= -8\) value \(0\) is \(\displaystyle -6\dfrac{(t+12)(t+8)}{(4+12)(4+8)}=-{{1}\over{32}} (t+12)(t+8)\).

The sum of these three quadratic functions is the requested function definition: \[{{1}\over{32}} (t+8)(t-4)-{{3}\over{16}} (t+12)(t-4)-{{1}\over{32}} (t+12)(t+8)= \\ -{{3 t^2}\over{16}}-2 t+5\]
In the diagram below you can create points by clicking their positions in the coordinate plane. The graph of the polynomial function passing through these points is then drawn, provided the horizontal coordinates of the specified points are different from each other and no more than six measurement points are specified.