Apparently, Maxima sometimes tries a z =tan(x/2) substitution (expunged
from calculus books in the 1980s?); examples:
(%i9) integrate(exp(sin(x)),x);
1" Enter "integrate[%e^sin(x),x]
.2" Enter "integrate[%e^((2*x)/(x^2+1))/(x^2+1),x]
(%i10) integrate(abs(sin(x)),x);
1" Enter "integrate[abs(sin(x)),x]
.2" Enter
"integrate[(x*(x/(2*x^2+2)-(%i*(log(%i*x+1)-log(1-%i*x)))/4))/abs(x),x]
Loading abs_integrate allows Maxima to find an antiderivative of
abs(sin(x)) that is discontinuous at odd multiples of pi.
Using *simplification* and Richard Fateman's partitions2deep and
abs_integrate, I can get Maxima to give an antiderivative of
abs(sin(x)) that is continuous on the reals--something like
'integrate(abs(sin(x)),x) = 2*floor(x/%pi)-cos(%pi*floor(x/%pi)-x)
but
integrate(abs(sin(x)),x) --> big ugly mess that isn't continuous on the
reals.
It's unsatisfactory for simplification and evaluation to give such
different results. Of course, a user could get call intfudu directly, but
that's inconvenient.
I'm not sure that the z =tan(x/2) substitution is such a good thing to
try--it leads to spurious poles (at least for integrate(abs(sin(x)),x).
Maybe the z =tan(x/2) method works OK for integrate(abs(sin(x)),x) but
some of the atan need to be changed to atan2?
--Barton