strange question when using interface to integrate



I am trying to start an isolation of integrate
behavior, error messages, etc.
from the nint.mac user, and have a short
function called nint_integrate. It only uses
the function complex_number_p defined
in nint.lisp.

I get the question: "is 1 zero or nonzero? ",
when the integrand is bessel_i(1,%i*x) and
integrating over (1,inf).

As an experiment, I also tried using
bessel_i(1.0,%i*x), which produced
a different error message:
"integrate: variable must not be a number; found: 1".

--------------------------
Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
                                  2011-11-01


(%i1) load(temp);
(%o1) "c:/work2/temp.mac"

(%i2) nint_integrate(bessel_i(1,%i*x),x,1,inf);
Is  1  zero or nonzero?

nonzero;
defint: integral is divergent.
#0: nint_integrate(ue=bessel_i(1,%i*x),uvar=x,ua=1,ub=inf)
 -- an error. To debug this try: debugmode(true);

(%i3) integrate(bessel_i(1,%i*x),x);
(%o3) %i*bessel_i(0,%i*x)

(%i4) nint_integrate(bessel_i(1.0,%i*x),x,1,inf);

rat: replaced 1.0 by 1/1 = 1.0

integrate: variable must not be a number; found: 1

#0: nint_integrate(ue=bessel_i(1.0,%i*x),uvar=x,ua=1,ub=inf)(temp.mac line 
15)
 -- an error. To debug this try: debugmode(true);

/* try range (2,inf) */

(%i5) nint_integrate(bessel_i(1,%i*x),x,2,inf);
Is  1  zero or nonzero?

nonzero;
defint: integral is divergent.
#0: nint_integrate(ue=bessel_i(1,%i*x),uvar=x,ua=2,ub=inf)
 -- an error. To debug this try: debugmode(true);

-------------------------------------------
The file temp.mac is:
---------------------------
/* temp.mac */

 load("nint.lisp")$

/*********** nint_integrate *************************/

 nint_integrate (ue,uvar,ua, ub) :=
   block ([vx,vxa,vxb ],

      /* try to get indefinite integral first */

      vx : apply ('integrate,[ue,uvar]),
      vxa : expand(float(rectform(subst(ua,uvar,vx)))),

      if complex_number_p (vxa) then (
         vxb : expand(float(rectform(subst(ub,uvar,vx)))),
         if complex_number_p (vxb) then return (vxb - vxa)),

      /* otherwise use defint */

      apply ('integrate,[ue,uvar,ua,ub]),
      expand(float(rectform(%%))))$

display2d:false$
----------------------
The file nint.lisp is:
---------------------------
;;;nint.lisp

;;;code from barton willis file
;;; topoly.lisp

(defun $complex_number_p (e)
  (complex-number-p e #'$numberp))
------------------------------------

Any suggestions for a cure (ie., no need to
tell maxima that 1 is nonzero)  would be
appreciated.

Ted Woollett