First of all, sorry if I have a bad english : i'm french.
Here's my problem : I have the following code :
#Méthode de l'interpolation de Hermite
hermite:=proc(x,a,b,n,f)
local i,q,p,pl1,p2,dq,dp1,df,pl2;
#pl = polynôme de lagrange, p = polynôme
q:=t-x[1];
#création du polynôme q (méthode de la double résolution de lagrange)
for i from 2 to n by 1 do
q:=q*(t-x[i]);
od
dq:=diff(q,t);
#p1 est en fait interp(x,map(f,x),t)
pl1:=interp(x,map(f,x),t);
dpl1:=diff(p1,t);
#on créé les zi, qui sont en réalité f'(xi)
df:=diff(f(t),t);
#on créé p2(xi)
for i from 1 to n by 1 do
p2[i]:=(df(x(k))-dpl1(x[i]))/dq(x[i]);
od
#on créé pl2(t) à partir du polynôme obtenu p2(xi);
pl2:=interp(x,p2,t);
#affichage des résultats
p:=t->pl1+q*pl2;
print("Interpolation de Hermite par double résolution de Lagrange :");
print(plot[p(t),f(t)],t=a..b);
#MANQUE A FAIT LA QUESTION 3.2
end;
And I have the following error : "Error, missing operator or ;"
which says that the problem might be in this exact part "q:=q*(t-x[i]);",
just before the x
, but I just can't see why.
Thanks if you can help me.