besselYx¶
Evaluates a sequence of Bessel functions of the second kind with real order and complex arguments.
Synopsis¶
besselYx (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,…,n−1.
Description¶
The Bessel function Yv(z) is defined to be
Yν(z)=1π∫π0sin(zsinθ−νθ)dθ−1π∫∞0[eνt+e−νtcos(νπ)]e−zsinhtdtfor |argz|<π2
This function is based on the code BESSCC of Barnett (1981) and Thompson and Barnett (1987). This code computes Yv(z) from the modified Bessel functions Iv(z) and Kv(z), using the following relation:
Yv(zeπi/2)=e(v+1)πi/2Iv(z)−2πe−vπi/2Kv(z) for −π<argz≤π2
Example¶
In this example, Y0.3+n−1(1.2+0.5i), ν=1,…,4 is computed and printed.
from __future__ import print_function
from numpy import *
from pyimsl.math.besselYx import besselYx
n = 4
xnu = 0.3
z = 1.2 + 0.5j
sequence = besselYx(xnu, z, n)
for i in range(0, n):
print("Y sub %4.2f ((%4.2f,%4.2f)) = (%5.3f,%5.3f)"
% (xnu + i, z.real, z.imag, sequence[i].real, sequence[i].imag))
Output¶
Y sub 0.30 ((1.20,0.50)) = (-0.013,0.380)
Y sub 1.30 ((1.20,0.50)) = (-0.716,0.338)
Y sub 2.30 ((1.20,0.50)) = (-1.048,0.795)
Y sub 3.30 ((1.20,0.50)) = (-1.625,3.684)