#2489 conditional_integrate returns redundant conditions

open
nobody
5
2012-11-18
2012-11-11
David Scherfgen
No

load(abs_integrate);
conditional_integrate(a^x + b^x, x);

gives:

%if(?%and(a-1 # 0,b-1 # 0),(log(a)*b^x+a^x*log(b))/(log(a)*log(b)),
%if(?%and(a-1 # 0,b-1 = 0),%if(a-1 # 0,(log(a)*x+a^x)/log(a),2*x),
%if(?%and(a-1 = 0,b-1 # 0),
%if(b-1 # 0,(log(b)*x+b^x)/log(b),2*x),2*x)))

The second "%if" in the second line (the one testing for "a-1 # 0") is redundant, since "a-1 # 0" was already checked for in the surrounding "%if".
The same holds true for the first "%if" in the last line.

Discussion