Welcome to our community

Be a part of something great, join today!

Minimum degree of a polynomial passing through points

jacks

Well-known member
Apr 5, 2012
226
If p(x) is a polynomial such that p(0)=5 ,p(1)=4 ,p(2)=9,p(3)=20 ,

the minimum degree it can have
 

Prove It

Well-known member
MHB Math Helper
Jan 26, 2012
1,403
Re: polynomial

If p(x) is a polynomial such that p(0)=5 ,p(1)=4 ,p(2)=9,p(3)=20 ,

the minimum degree it can have
You have four points, so for them to fit the polynomial exactly, you need it to at least have degree three. Anything more you'll have an infinite number of possibilities that will have all data points fit, and anything less then chances are you'll only be able to get a least squares approximation.
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,193
Re: polynomial

My approach: start with a straight line and see if it fits exactly. If not, try a quadratic. If that doesn't work, try a cubic. As Prove It has pointed out, a cubic (with four arbitrary constants) will definitely work. But you might be able to get by with fewer depending on where the points are.
 

soroban

Well-known member
Feb 2, 2012
409
Re: polynomial

Hello, jacks!

If [tex]p(x)[/tex] is a polynomial such that: .[tex]p(0) = 5,\;p(1) = 4,\;p(2) = 9,\;p(3) = 20,[/tex]
. . the minimum degree it can have is __.

Plotting the four points, a parabola might pass through them.

The general parabola is: .[tex]p(x) \:=\:ax^2 + bx + c[/tex]


Use the four point to construct a system of equations:

[tex]\begin{array}{ccccccc} p(0) = 5: & a(0^2) + b(0) + c &=& 5 \\
p(1) = 4: & a(1^2) + b(1) + c &=& 4 \\
p(2) = 9: & a(2^2)+ b(2) + c &=& 9 \\
p(3) = 20: & a(3^2) + b(3) + c &=& 20 \end{array}[/tex]


Solve the system: .[tex]a = 3,\;b = \text{-}4,\;c = 5[/tex]

Hence: .[tex]p(x) \;=\;3x^2 - 4x + 5[/tex]


The minimum degree of [tex]p(x)[/tex] is two.
 

HallsofIvy

Well-known member
MHB Math Helper
Jan 29, 2012
1,151
Re: polynomial

You have four points, so for them to fit the polynomial exactly, you need it to at least have degree three. Anything more you'll have an infinite number of possibilities that will have all data points fit, and anything less then chances are you'll only be able to get a least squares approximation.
Then polynomial, passing through four given points, will have degree at most three, not "at least". It is quite possible that the four points happen to lie on a parabola (which is apparently the case here) or even on a straight line.
 

Prove It

Well-known member
MHB Math Helper
Jan 26, 2012
1,403
Re: polynomial

Then polynomial, passing through four given points, will have degree at most three, not "at least". It is quite possible that the four points happen to lie on a parabola (which is apparently the case here) or even on a straight line.
Really? I would have thought that there would be an infinite number of solutions to, say, four equations in five unknowns, which is what you would get if you substituted the four points into a general polynomial of degree 4...
 

CaptainBlack

Well-known member
Jan 26, 2012
890
Re: polynomial

Really? I would have thought that there would be an infinite number of solutions to, say, four equations in five unknowns, which is what you would get if you substituted the four points into a general polynomial of degree 4...
Four equations in five unknowns is what you will end up with when you try to fit a quartic, and we know you can always do that but the solution is not unique.

Fitting a cubic \(p(x)=a+bx+cx^2+dx^3\) will give you four equations in four unknowns, and as long as there is no degeneracy will have a solution. In this case the equations are:

\[ \left[\begin{array}{cccc} 1&0&0&0 \\ 1&1&1&1 \\ 1 & 2 & 4 & 8 \\ 1&3&9&27 \end{array} \right] \left[ \begin{array}{c} a \\ b \\ c \\ d \end{array} \right]=\left[ \begin{array}{c} 5 \\ 4 \\ 9 \\ 20 \end{array} \right]\]

Which may be solved using your favourite method of solving linear equations to give:

\[ \left[ \begin{array}{c} a \\ b \\ c \\ d \end{array} \right]=\left[ \begin{array}{c} 5 \\ -4 \\ 3 \\ 0 \end{array} \right]\]

Which corresponds to the polynomial:

\[ p(x)=5-4x+3x^2+0x^3=5-4x+3x^2 \]

We may note that this method would produce the required solution whateve the degree of the ploynomial was. And it works because the fitting cubic is unique and all polynomials of lower degree are cubics for the purposes of fitting to the data.

CB
 
Last edited: