// Polynome de Lagrange P_2 et ses derivees 

function [FP,DxFP]=P2(x)

  FP = zeros(3,1); DxFP = zeros(3,1);

  FP(1) =  (x-1)*x/2;
  FP(2) =  (x+1)*x/2;
  FP(3) =  (1 - x^2);

  DxFP(1) =  x - .5;
  DxFP(2) =  x + .5;
  DxFP(3) =  -2*x;

endfunction


