BSINS

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

Required Arguments

X — Argument for which the sequence of Bessel functions is to be evaluated. (Input)
For real argument exp(x) must not overflow. For complex arguments x must be less than 104 in absolute value.

N — Number of elements in the sequence. (Input)

BSI — Vector of length N containing the values of the function through the series. (Output)
BSI(I) contains the value of the Bessel function of order I  1 at x for I = 1 to N.

FORTRAN 90 Interface

Generic: CALL BSINS (X, N, BSI)

Specific: The specific interface names are S_BSINS, D_BSINS, C_BSINS, and Z_BSINS.

FORTRAN 77 Interface

Single: CALL BSINS (X, N, BSI)

Double: The double precision name is DBSINS.

Complex: The complex name is CBINS.

Double Complex:  The double complex name is DCBINS.

Description

The complex Bessel function In(z) is defined to be

 

This code is based on the work of Sookne (1973a) and Olver and Sookne (1972). It uses backward recursion with strict error control.

Examples

Example 1

In this example, In(10.0), n = 0, , 10 is computed and printed.

 

USE BSINS_INT

USE UMACH_INT

 

IMPLICIT NONE

! Declare variables

INTEGER N

PARAMETER (N=11)

!

INTEGER K, NOUT

REAL BSI(N), X

! Compute

X = 10.0

CALL BSINS (X, N, BSI)

! Print the results

CALL UMACH (2, NOUT)

DO 10 K=1, N

WRITE (NOUT,99999) K-1, X, BSI(K)

10 CONTINUE

99999 FORMAT (' I sub ', I2, ' (', F6.3, ') = ', F9.3)

END

Output

 

I sub 0 (10.000) = 2815.716

I sub 1 (10.000) = 2670.988

I sub 2 (10.000) = 2281.519

I sub 3 (10.000) = 1758.381

I sub 4 (10.000) = 1226.490

I sub 5 (10.000) = 777.188

I sub 6 (10.000) = 449.302

I sub 7 (10.000) = 238.026

I sub 8 (10.000) = 116.066

I sub 9 (10.000) = 52.319

I sub 10 (10.000) = 21.892

Example 2

In this example, In(10 + 10i), n = 0, , 10 is computed and printed.

 

USE BSINS_INT

USE UMACH_INT

 

IMPLICIT NONE

! Declare variables

INTEGER N

PARAMETER (N=11)

!

INTEGER K, NOUT

COMPLEX CBS(N), Z

! Compute

Z = (10.0, 10.0)

CALL BSINS (Z, N, CBS)

! Print the results

CALL UMACH (2, NOUT)

DO 10 K=1, N

WRITE (NOUT,99999) K-1, Z, CBS(K)

10 CONTINUE

99999 FORMAT (' I sub ', I2, ' ((', F6.3, ',', F6.3, &

')) = (', F9.3, ',', F9.3, ')')

END

Output

 

I sub 0 ((10.000,10.000)) = (-2314.975, -411.563)

I sub 1 ((10.000,10.000)) = (-2246.627, -460.681)

I sub 2 ((10.000,10.000)) = (-2044.245, -590.157)

I sub 3 ((10.000,10.000)) = (-1719.746, -751.498)

I sub 4 ((10.000,10.000)) = (-1302.871, -880.632)

I sub 5 ((10.000,10.000)) = ( -846.345, -920.394)

I sub 6 ((10.000,10.000)) = ( -419.501, -843.607)

I sub 7 ((10.000,10.000)) = ( -88.480, -665.930)

I sub 8 ((10.000,10.000)) = ( 108.586, -439.392)

I sub 9 ((10.000,10.000)) = ( 176.165, -227.548)

I sub 10 ((10.000,10.000)) = ( 154.831, -76.050)