# Problem with divided differences (numerical analysis)

• Apr 7th 2008, 03:51 PM
arbolis
Problem with divided differences (numerical analysis)
I have a problem with divided differences.
Let f be a function such as \$\displaystyle f(x)=cos(Pi*x)\$. Find a polynom of degree minor or equal to 3 that satisfy :
\$\displaystyle p(-1)=f(-1), p(0)=f(0), p(1)=f(1), p'(1)=f'(1).\$

I think I have to make a table of divided difference. My problem is how do I deal the table when I have a condition on a derivate, such as p'(1)=f'(1). And how can I deal with double derivate conditions?
• Apr 7th 2008, 04:11 PM
Mathstud28
Hey
Quote:

Originally Posted by arbolis
I have a problem with divided differences.
Let f be a function such as \$\displaystyle f(x)=cos(Pi*x)\$. Find a polynom of degree minor or equal to 3 that satisfy :
\$\displaystyle p(-1)=f(-1), p(0)=f(0), p(1)=f(1), p'(1)=f'(1).\$

I think I have to make a table of divided difference. My problem is how do I deal the table when I have a condition on a derivate, such as p'(1)=f'(1). And how can I deal with double derivate conditions?

Why not use a taylor polynomial approximation for \$\displaystyle cos(x)\$?
• Apr 7th 2008, 04:21 PM
arbolis
Because I think that it would not interpolate the data I gave. It would be preciser on one point while what I need is a polynom passing by a set of points coinciding with a known function and also satisfying that its derivative pass by some points as the derivative of the known function do.
• Apr 7th 2008, 04:24 PM
Mathstud28
Yes
Quote:

Originally Posted by arbolis
Because I think that it would not interpolate the data I gave. It would be preciser on one point while what I need is a polynom passing by a set of points coinciding with a known function and also satisfying that its derivative pass by some points as the derivative of the known function do.

Not only that but with that restriction on the order of the polynomial that would give you two iterations of the cosine power series...which is a HORRIBLE approximation of cos(x)....hmm I am not sure then sorry