[Math] the lowest-degree function that passes through these points

polynomials

I want to find a (preferably polynomial) function that passes through the following twelve points:

  • $(1, 0)$
  • $(2, 3)$
  • $(3, 3)$
  • $(4, 6)$
  • $(5, 1)$
  • $(6, 4)$
  • $(7, 6)$
  • $(8, 2)$
  • $(9, 5)$
  • $(10, 0)$
  • $(11, 3)$
  • $(12, 5)$

The values outside these points do not matter. Obviously, there are infinitely many functions that pass through all these points.

Given any one point and the two zeroes, I can calculate a quadratic function to pass through them. For example, the function that passes through $(0, 1)$, $(0, 10)$, and $(6, 4)$ is found with

$$
\begin{align}
c(6 – 1)(6 – 10) &= 4\\
(5)(-4)c &= 4\\
c &= -\frac{1}{5}\\
f(x) &= -\frac{1}{5}(x – 1)(x – 10)
\end{align}
$$

But I have no idea how to calculate this for the multiple points I need.

Best Answer

There are lots of ways to collocate points through those points. Lagrange is one of them. I have calculated it for you in case you require the answer. Here it is in Horner form for quick computation.

$$y=-519+x \left(\frac{4798141}{3960}+x \left(-\frac{50014963}{50400}+x \left(\frac{34689413}{113400}+x \left(\frac{3930023}{120960} \right.\right.\right.\right.$$ $$+ \left.\left.\left.\left. x\left(-\frac{19645147}{362880}+x \left(\frac{1065259}{57600}+x\left(-\frac{586327}{172800} +x \left(\frac{3781}{10080}+x\left(-\frac{2269}{90720} \right.\right.\right.\right.\right.\right.\right.\right.\right.$$ $$\left. \left. \left. \left. \left. \left. \left. \left. \left. +x \left(\frac{1123}{1209600}-x\frac{589 }{39916800}\right) \right)\right)\right)\right)\right)\right)\right)\right)\right)$$

enter image description here

Related Question