Marcel Bezerra on Mon, 13 Feb 2012 13:25:18 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Fwd: bessel function algorithm


---------- Forwarded message ----------
From: Marcel Bezerra <gigamaxell@gmail.com>
Date: 2012/2/13
Subject: Re: bessel function algorithm
To: Henri.Cohen@math.u-bordeaux1.fr


Hello again!

Henri, I would like to thank you again for the help.

Do you know where I could find the algorithm used in PARI for Bessel function of the first kind?

I want to study that algorithm, but I couldn't find anything about it in the PARI's documentation pages.

I am aware there are some MATLAB programs that intend to calculate it. I made some comparisons with
Hongxue Cai's algorithm and PARI, and I noticed the results are different after the fourth decimal place.

The values I tested were: besselj(1+I,0); besselj(1+I,1+I); besselj(1+I,I).

The results I got from MATLAB using the Hongxue's cbessel(nu,z) algorithm are, respectively:

NaN+NaN*i; 3.841170714997851e-001 -9.914709109073297e-002i; 1.464168620011011e-001 +5.274551029538346e-002i

If you would like to see the pages from Matlab File Exchange where I got this algorithm, the links are:

Bessel function implementation, with complex order and argument, from Hongxue Cai:
http://www.mathworks.com/matlabcentral/fileexchange/9515-bessel-function-of-complex-order-and-argument

If you are able to test Hongxue's algorithm, I 'd like to warn you that the program will fail because it isn't using the correct Gamma function, for complex values. I found the correct algorithm, and here is the link for the program:
Gamma function with complex argument, not the same implementation of the built-in MATLAB's gamma function, from Paul Godfrey:
http://www.mathworks.com/matlabcentral/fileexchange/3572-gamma

Ok, then...The lengthy message ends here.

Thanks again!

Marcel Bezerra






2012/2/10 Marcel Bezerra <gigamaxell@gmail.com>
Hi!

At first, thank you Bill to foward my question here!

Henri, I need to calculate the
modified Bessel function of the second kind, K, with complex order.

But, since it is possible to use properties, I would expect that PARI express K in terms of J, so the algorithms would be more general.

I couldn't find any program like MATLAB or SCILAB capable to make such numerical calculation, but they show the references their Bessel algorithms were based on (Algorithm 644 from D.E. AMOS, for instance). And when I find two programs that actually solves the problem, PARI and Mathematica, I couldn't find any similar references.

I also tried to download the source code of PARI, so I could look for any comments in the files, but all I could see were  files with the description of the function shown in PARI interface, when I use the "? besselj" command.

In resume, I just want to be assured of the results I'm getting here. That is the reason I'm looking for any limitations the Bessel functions implemented in PARI would have.

Well, thank you again for the help!

Marcel Bezerra





2012/2/10 <Henri.Cohen@math.u-bordeaux1.fr>

Pari does not use any sophisticated algorithm for
Bessel functions: however can you tell us which
Bessel function you need: J, I, N, or K ?

Best,

Henri Cohen