Question: Error, (in kernels) too many levels of recursion

f:=x->x^3:
y[1]:=0.5:
y[3]:=subs(x=0.5,f(x)):
i := 2:
y[i] := y[i-1]-(y[1]-y[2+1])*(1/2):
i:=1:
g[i] := (y[i+1]-y[i+2])*x/(y[i]-y[i+1])+(y[i+2]*y[i]-y[i+1]*y[i+1])/(y[i]-y[i+1]):
g[i] := unapply(g[i], x):
h[i] := unapply(solve(y = g[i](x), x), y):
for i from 2 by 1 to 5 do
g[i]:=(f@h[i-1])(x);
g[i]:=unapply(g[i],x):
s:=solve(y=g[i](x),x):
h[i]:=unapply(s[1],y);
end do;

 for this code i got error "Error, (in kernels) too many levels of recursion". how run my code succesfully. plz give reply me

i am using MAPLE 13. plz give me solution to me

Please Wait...