besselJx

Evaluates a sequence of Bessel functions of the first kind with real order and complex arguments.

Synopsis

besselJx (xnu, z, n)

Required Arguments

float xnu (Input)
The lowest order desired. The argument xnu must be greater than −1/2.
complex z (Input)
Argument for which the sequence of Bessel functions is to be evaluated.
int n (Input)
Number of elements in the sequence.

Return Value

The n values of the function through the series. Element i contains the value of the Bessel function of order xnu + i for \(i=0, \ldots,n-1\).

Description

The Bessel function \(J_v(z)\) is defined to be

\[\begin{split}\begin{array}{l} j_v(z) = \tfrac{1}{\pi} \int_0^{\pi} \cos(z \sin \theta - v \theta) d \theta - \tfrac{\sin(v \pi)}{\pi} \int_0^{\infty} e^{z \sinh t-vt} dt \\ \text{for } |\arg z| < \tfrac{\pi}{2} \\ \end{array}\end{split}\]

This function is based on the code BESSCC of Barnett (1981) and Thompson and Barnett (1987). This code computes \(J_v(z)\) from the modified Bessel function \(I_v(z)\), using the following relation, with \(\rho= e^{ip/2}\):

\[\begin{split}Y_v(z) = \begin{cases} \rho I_v (z/\rho) & \text{for } -\pi/2 < \arg z \leq \pi \\ \rho^3 I_v \left(\rho^3 z\right) & \text{for } -\pi < \arg z \leq \pi/2 \\ \end{cases}\end{split}\]

Example

In this example, \(J_{0.3+n-1}(1.2+0.5i)\), \(\nu=1,\ldots,4\) is computed and printed.

from __future__ import print_function
from numpy import *
from pyimsl.math.besselJx import besselJx

n = 4
xnu = 0.3
z = 1.2 + 0.5j
sequence = besselJx(xnu, z, n)
for i in range(0, n):
    print("I sub %4.2f ((%4.2f,%4.2f)) = (%5.3f,%5.3f)"
          % (xnu + i, z.real, z.imag,
             sequence[i].real, sequence[i].imag))

Output

I sub 0.30 ((1.20,0.50)) = (0.774,-0.107)
I sub 1.30 ((1.20,0.50)) = (0.400,0.159)
I sub 2.30 ((1.20,0.50)) = (0.087,0.092)
I sub 3.30 ((1.20,0.50)) = (0.008,0.024)

Fatal Errors

IMSL_BESSEL_CONT_FRAC Continued fractions have failed to converge. The double precision version of this function provides the most accurate solution.