X=poly(0,'x');

// points abs (1,2,3) et ord (4,7,9)

l1=(X-2)*(X-3)/(1-2)/(1-3)

l2=(X-1)*(X-3)/(2-1)/(2-3)

l3=(X-1)*(X-2)/(3-1)/(3-2)

// les 3 polynomes de base

p2 = 4*l1 + 7*l2 + 9*l3

// graphe du polynome

t = (0:0.1:4);

plot2d(t,horner(p2,t));



