# Thread: Problem with divided differences (numerical analysis)

1. ## Problem with divided differences (numerical analysis)

I have a problem with divided differences.
Let f be a function such as $f(x)=cos(Pi*x)$. Find a polynom of degree minor or equal to 3 that satisfy :
$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?

2. ## Hey

Originally Posted by arbolis
I have a problem with divided differences.
Let f be a function such as $f(x)=cos(Pi*x)$. Find a polynom of degree minor or equal to 3 that satisfy :
$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 $cos(x)$?

3. 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.

4. ## Yes

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