quad_qag and quad_qags fail with imagpart( bessel_i(1, %i*x)) arg
Subject: quad_qag and quad_qags fail with imagpart( bessel_i(1, %i*x)) arg
From: Stavros Macrakis
Date: Sat, 22 Oct 2011 17:36:21 -0400
There is a bug in imagpart. imagpart(bessel_i(1,%i*x)) should be
-%i*bessel_i(1,%i*x), but imagpart is returning bessel_i(1,%i*x).
Could you please report this -- see bug_report() for instructions.
-s
On Sat, Oct 22, 2011 at 17:20, Edwin Woollett <woollett at charter.net> wrote:
> For cases where integrate, numer fails, I am using
> either quad_qag or quad_qags for numerical integration
> in one dimension.
>
> I automatically split up any integrand into real and
> imaginary parts using realpart and imagpart, and
> later combine the answers.
>
> This has worked with bessel functions ok up to
> my testing of bessel_i(1,%i*x).
>
> (%i4) imagpart(bessel_i(1,%i)),**numer;
> (%o4) 0.44005058574493
>
> (%i6) quad_qag(imagpart(bessel_i(1,%**i*x)),x,1,3,3,limit=700);
> (%o6) quad_qag(bessel_i(1,%i*x),x,1,**3,3,epsrel = 1.0E-8,epsabs = 0.0,
> limit = 700)
>
> (%i11) quad_qags(imagpart(bessel_i(1,**%i*x)),x,1,3,limit=700);
> (%o11) quad_qags(bessel_i(1,%i*x),x,**1,3,epsrel = 1.0E-8,epsabs = 0.0,
> limit = 700)
>
> Since imagpart(bessel_i(1,%i*x)) is a real number, why can't
> quad_qag and quad_qags cope?
>
> Ted Woollett
>
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>
>