Main Content

besselh

Bessel function of third kind (Hankel function) for symbolic expressions

Description

H = besselh(nu,K,z) computes the Hankel function Hν(K)(z), where K = 1 or 2, for each element of the complex array z. The output H has the symbolic data type if any input argument is symbolic. See Bessel’s Equation.

example

H = besselh(nu,z) uses K = 1.

example

H = besselh(nu,K,z,1) scales Hν(K)(z) by exp(-i*z) if K = 1, and by exp(+i*z) if K = 2.

example

Examples

collapse all

Specify the Hankel function for a symbolic variable.

syms z
H = besselh(3/2,1,z)
H = 

-2ezi1+izzπ

Evaluate the function symbolically and numerically at the point z = 1 + 2i.

Hval = subs(H,z,1+2i)
Hval = 

2e-2+i-75-15i1+2iπ

vpa(Hval)
ans = -0.084953341280586443678471523210602-0.056674847869835575940327724800155i

Specify the function without the second argument, K = 1.

H2 = besselh(3/2,z)
H2 = 

-2ezi1+izzπ

Notice that the functions H and H2 are identical.

Scale the function by e-iz by using the four-argument syntax.

Hnew = besselh(3/2,1,z,1)
Hnew = 

-21+izzπ

Find the derivative of H.

diffH = diff(H)
diffH = 

2eziiz5/2π-2ezi1+izizπ+2ezi1+iz2z3/2π

Input Arguments

collapse all

Hankel function order, specified as a symbolic array or double array. If nu and z are arrays of the same size, the result is also that size. If either input is a scalar, besselh expands it to the other input size.

Example: nu = 3*sym(pi)/2

Kind of Hankel function, specified as a symbolic or double 1 or 2. K identifies the sign of the added Bessel function Y:

Hν(1)(z)=Jν(z)+iYν(z)Hν(2)(z)=Jν(z)iYν(z).

Example: K = sym(2)

Hankel function argument, specified as a symbolic array or double array. If nu and z are arrays of the same size, the result is also that size. If either input is a scalar, besselh expands it to the other input size.

Example: z = sym(1+1i)

More About

collapse all

Bessel’s Equation

The differential equation

z2d2wdz2+zdwdz+(z2ν2)w=0,

where ν is a real constant, is called Bessel's equation, and its solutions are known as Bessel functions.

Jν(z) and Jν(z) form a fundamental set of solutions of Bessel's equation for noninteger ν. Yν(z) is a second solution of Bessel's equation—linearly independent of Jν(z)—defined by

Yν(z)=Jν(z)cos(νπ)Jν(z)sin(νπ).

The relationship between the Hankel and Bessel functions is

Hν(1)(z)=Jν(z)+iYν(z)Hν(2)(z)=Jν(z)iYν(z).

Here, Jν(z) is besselj, and Yν(z) is bessely.

References

[1] Abramowitz, M., and I. A. Stegun. Handbook of Mathematical Functions. National Bureau of Standards, Applied Math. Series #55, Dover Publications, 1965.

Version History

Introduced in R2018b