Question about abs_integrate



On Fri, 2010-04-16 at 21:32 +0100, Leo Butler wrote:
> The problem appears to be that
> integrate(signum(abs(x)),x,-2,2);
> fails. I have filed a bug report.
Thanks.

> You can extend f as an even function via
> s(x,c):=(signum(x)+c)/2;
> 
> g(x):=s(x,1)*f(x) - s(x,-1)*f(-x);
basically, you are then using unit_step:
 g(x) := unit_step(x)*f(x) + unit_step(-x)*f(-x);

which in fact can now be integrated. It would also be nice to extend
abs_integrate to deal with mod(x,a).

Regards,
Jaime