integration error



On Sun, Mar 23, 2008 at 4:44 PM, Robert Dodier <robert.dodier at gmail.com> wrote:
>  >  (%i1) integrate(cos(a*x)/(1+x^2),x,0,inf);
>  >  Is  a   positive, negative, or zero? zero;
>  >  Maxima encountered a Lisp error:
>  >    Error in PROGN [or a callee]: Caught fatal error [memory may be damaged]
>
>  Thanks for this bug report.
>
>  It appears that the bug originates from a MRAT expression which
>  some function isn't prepared to handle ... The following patch fixes
>  this bug. Not sure yet what other effect it might have.
>
>  --- src/defint.lisp     17 Feb 2008 20:54:22 -0000      1.55
>  +++ src/defint.lisp     23 Mar 2008 15:59:15 -0000
>  @@ -1015,7 +1015,7 @@
>               (eq ($sign (m+ (deg (setq nn* ($imagpart (caddr term))))
>                              -2.))
>                   '$neg))
>  -        (cond ((eq ($asksign (ratcoef nn* var)) '$pos)
>  +        (cond ((eq ($asksign (ratdisrep (ratcoef nn* var))) '$pos)
>                 (setq *updn t))
>                (t (setq *updn nil)))
>          term)
>
>  FWIW

However, substituting a by 0, gives the following:

(%i3) integrate(cos(0*x)/(1+x^2),x,0,inf);
(%o3) %pi/2

Paul