Numerical Analysis Problem

The following data are taken from a polynomial of degree >= 5. What is the polynomial and what is its degree?

x| -2, -1, 0, 1, 2, 3

p(x)| -5, 1, 1, 1, 7, 25

Not sure how to go about finding the poly...

I know I need to apply Newton's Divided Difference Interpolation Formula some how; I just not sure how? Thanks

Re: Numerical Analysis Problem

Quote:

Originally Posted by

**jzellt** The following data are taken from a polynomial of degree >= 5. What is the polynomial and what is its degree?

x| -2, -1, 0, 1, 2, 3

p(x)| -5, 1, 1, 1, 7, 25

Not sure how to go about finding the poly...

I know I need to apply Newton's Divided Difference Interpolation Formula some how; I just not sure how? Thanks

You have a typo, the degree cannot be >=5 for a number of reasons, the first is that there is insufficient data (a quintic has 6 degrees of freedom, and you have 6 data points and you can always put a quintic through six points). Secondly it is a perfect fit for a cubic (construct a difference table, the third differences are constant => a cubic).

CB

Re: Numerical Analysis Problem

You are absolutely correct! It is supposed to be <=5. Thanks

Re: Numerical Analysis Problem

Ok I see that that the third differences are constant and therefore a cubic, but I still don't know how to find the polynomial...

Re: Numerical Analysis Problem

Quote:

Originally Posted by

**jzellt** Ok I see that that the third differences are constant and therefore a cubic, but I still don't know how to find the polynomial...

You have already been shown in class how to do that from the difference table, I will not repeat that here.

Let the cubic be:

$\displaystyle p(x)=ax^3+bx^2+cx+d$

Then you have:

$\displaystyle p(0)=1$

$\displaystyle p(1)=1$

$\displaystyle p(2)=7$

$\displaystyle p(3)=25$

Which when you expand them constitute a set of four simultaneous equations in the four unknowns $\displaystyle a,b,c,d$.

CB

Re: Numerical Analysis Problem

Thank you! But wouldn't p(0) = -5?

Re: Numerical Analysis Problem

Quote:

Originally Posted by

**jzellt** Thank you! But wouldn't p(0) = -5?

Code:

`x | -2,-1, 0, 1, 2, 3`

p(x)| -5, 1, 1, 1, 7, 25

Re: Numerical Analysis Problem

Pardon me. My mistake. What I meant to say is why leave out p(-2) and p(-1)? Thanks

Re: Numerical Analysis Problem

Quote:

Originally Posted by

**jzellt** Pardon me. My mistake. What I meant to say is why leave out p(-2) and p(-1)? Thanks

You only need four equations. You can choose any four

CB