rtest; rtest(s_,eq_):= block(y(x_):=s, pp:=chop(n((expand(expand((eq)))))),pp); rtest(s_,eq_=r_):= block(y(x)=s, chop(n(replace(expand(expand((eq-r))),x,1)))); rtest(s_ and s2_,eq_):= block(y(x)=s,chop(n(replace(expand(expand((eq))),x,1)))) and block(y(x)=s2,chop(n(replace(expand(expand((eq))),x,1)))); rtest(s_ and s2_,eq_=r_):= block(y(x)=s,chop(n(replace(expand(expand((eq-r))),x,1)))) and block(y(x)=s2,chop(n(replace(expand(expand((eq-r))),x,1))));