-1

I have to restrict it with the folowings: P(-1) = f(-1), P(0)=f(0), P(1)=f(1), P'(1)=f'(1)

Lucian Iacob
  • 159
  • 1
  • 10
  • You have four requirements and therefore need a polynomial with four degrees of freedom; this implies a cubic which has four coefficients that uniquely define it. You find the four coefficients by setting the polynomial and its derivatives equal to your `f` values at their associated points and solving the linear system. Note: without code, this is more of a math question and fairly off topic. – TroyHaskin May 19 '16 at 19:03

1 Answers1

0

Let the polynomial be

ax³ + bx² + cx + d

By the given equations,

- a + b - c + d = f(-1)
              d = f(0)
  a + b + c + d = f(1)
 3a +2b + c     = f'(1)

You should be able to solve.