- status: open --> closed-fixed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%% Try this small file please
%%%%%%%%%% It is only one example but
%%%%%%%%%% other example of the some kind
%%%%%%%%%% Gives also bad results
%%%%%%%%%% The best is a result ok with algint
%%%%%%%%%% on and at lease no zero divisor
%%%%%%%%%% when algint is off.
% Alain Moussiaux
% thanks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load_package algint;
p2:=1/(sqrt(d-x)*sqrt(c-x)*sqrt(b-x)*sqrt(a-x)*(a*b-a*x-b*x+x**2));
r1:=int(p2,x);
verif:=num (df(r1,x)-p2);
if verif neq 0 then <<write "With algint on the computation is
false";>> else <<"ok";>>;
write "And with algint off ?";
off algint;
write "Computation with algint off.Wait.and ZERO DIVISIOR....";
p2:=1/(sqrt(d-x)*sqrt(c-x)*sqrt(b-x)*sqrt(a-x)*(a*b-a*x-b*x+x**2));
r1:=int(p2,x);
end;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I believe that both issues (algint giving a wrong result and "zero divisor" messages) are corrected.
However, the standard integrator (ie. with off algint) returns a result in reasonable time only with "on ezgcd".
Log in to post a comment.