I have found some bugs in abs_integrate.mac:
(%i1) display2d:false;
(%o1) false
(%i2) load(abs_integrate);
(%o2) "/usr/local/share/maxima/5.23.0/share/contrib/integration/abs_integrate.mac"
(%i3) abs_defint(unit_step(x),x,99,100);
(%o3) 100
The problem here is that abs_defint accidentally extends its integration
interval to include all other values of x at which signum, unit_step,
abs, etc, switch between cases. After determining all such values of x
(in this case x=0 is the only one), abs_defint calls
partitions_interval_p, which sorts all of these points including the
endpoints (here 99 and 100). In this case partitions_interval_p returns
[0,99,100], and then the integration is performed from 0 to 100.
Presumably partitions_interval_p should trim the resulting list to
include only the portion within the given endpoints.
***
Here is a more difficult bug:
(%i4) abs_defint(unit_step(unit_step(x)),x,-1,0);
(%o4) 1/2
Since unit_step(unit_step(x))=0 for all x<=0, the answer should be 0.
The problem here is that convert_to_signum converts unit_step(x) to
(signum(x)+1)/2. Obviously this is incorrect at x=0, but in most cases
this does not affect the result, since integration is insensitive to the
values of the integrand at any finite (or countable) set of points.
But consider unit_step(f(x)) where f(x)=0 over a proper interval of x.
In these cases, the transformation done by convert_to_signum is invalid,
and can cause several of the routines in abs_integrate.mac to give wrong
answers.
I don't see any simple fix to this problem. To fix it properly, I guess
these routines must look not only for isolated values of x, but in the
general case also _intervals_ of x at which the argument of signum or
unit_step is 0.
Best,
Mark