Question: How should I handle Rootof?

Please I am trying to get a compact result for this code in particular the lines assigne "a" and "b" respectively. I am sure the result shoud not be more than two lines. Can someone be of help? 

restart:
P:=a[0]+(a[1]*x)/(1+(a[2]*x)/(1+(a[3]*x))):
Q:=diff(P,x):
T:=diff(P,x,x):
e1:=simplify(eval(P, x=q))=y[n]:
e2:=simplify(eval(Q,x=q))=f[n]:
e3:=simplify(eval(Q,x=q+h))=f[n+1]:
e4:=simplify(eval(T,x=q+h))=g[n+1]:
var:=seq(a[i], i=0..3):
M:=e||(1..4):
Cc:=eval(<var>, solve(eval({M}),{var}) ):
for i from 1 to 4 do
	a[i-1]:=Cc[i]:
end do:
Cf:=P:
a:=y[n+1]=collect(simplify(eval(Cf, x=q+h)),[y[n], f[n], f[n+1],g[n+1]], recursive):
b:=map(eval@allvalues, [a]);

 

Please Wait...