Question: How do I Simplify the exponents

In the following codes I am very sure exp(-3*q) is a factor both at numerator and denominator. However, I dont know how to annihilate this factor. Can someone kindly help to ensure it cancels out? Thanks and kind regards.

restart:
s:=(sum(a[j]*x^j,j=0..2)+sum(a[j]*exp(-(j-2)*x),j=3..4)):
F:=diff(s,x):
p1:=simplify(eval(s,x=q))=y[n]:
p2:=simplify(eval(F,x=q))=f[n]:
p3:=simplify(eval(F,x=q+h))=f[n+1]:
p4:=simplify(eval(F,x=q+3*h/2))=f[n+3/2]:
p5:=simplify(eval(F,x=q+2*h))=f[n+2]:

vars:= seq(a[i],i=0..4):
Cc:=eval(<vars>, solve({p||(1..5)}, {vars})):
for i from 1 to 5 do
	a[i-1]:=Cc[i]:
end do:
Cf:=s:
T:y[n+2]=collect(simplify(eval(Cf,x=q+2*h)), [y[n],f[n],f[n+1],f[n+3/2],f[n+2]], recursive);

 

Please Wait...