Bugs in abs_integrate.mac



I don't know if you use pw.mac but if you do there is some overlap in 
abs_integrate.mac and pw.mac.  Both have an integrator for expressions 
involving unit_step() and signum().  Anyway the bug you found highlighted 
some bugs that were also present in pw.mac.  I just fixed the problem so now 
pwint() (integrate()) gives the right answer for all cases.  Thanks for 
pointing this out.

FYI,

Rich


-----Original Message----- 
From: Barton Willis
Sent: Thursday, January 06, 2011 9:50 AM
To: Mark H Weaver
Cc: maxima at math.utexas.edu
Subject: Re: [Maxima] Bugs in abs_integrate.mac

Mark,

Thanks for the bug report and (especially) your clear and detailed analysis. 
I have fixes for each of these bugs.
The fix for abs_defint(unit_step(x),x,99,100) is what you suggested.

To fix abs_defint(unit_step(unit_step(x)),x,-1,0), I changed the signum 
representation for unit_step to

  unit_step(x) = (signum(x)*(signum(x)+1))/2

Additionally, some abs_integrate functions convert terms such as 
signum(nonconstant polynomial)^2 to 1. In the
context of an integrand signum(nonconstant polynomial)^2  = 1 is an OK 
identity, I think.

It will take me some time to re-think and improve these fixes. Maybe you 
could file a bug report--I like
having a record of bugs.

Again, thanks for your bug report.

--Barton
(author of abs_integrate)

-----maxima-bounces at math.utexas.edu wrote: -----


>I have found some bugs in abs_integrate.mac:

>(%i3) abs_defint(unit_step(x),x,99,100);
>(%o3) 100


>(%i4) abs_defint(unit_step(unit_step(x)),x,-1,0);
>(%o4) 1/2
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima