besselh

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

Description

example

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.

Examples

collapse all

Specify the Hankel function for a symbolic variable.

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

-2ezi1+izzπ-(sqrt(sym(2))*exp((z*sym(1i)))*(1 + sym(1i)/z))/(sqrt(z)*sqrt(sym(pi)))

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π(sqrt(sym(2))*exp((- 2 + sym(1i)))*(- sym(7/5) - sym(1/5)*sym(1i)))/(sqrt(sym(1) + 2i)*sqrt(sym(pi)))

vpa(Hval)
ans = -0.084953341280586443678471523210602-0.056674847869835575940327724800155i- vpa('0.084953341280586443678471523210602') - vpa('0.056674847869835575940327724800155i')

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

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

-2ezi1+izzπ-(sqrt(sym(2))*exp((z*sym(1i)))*(1 + sym(1i)/z))/(sqrt(z)*sqrt(sym(pi)))

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π-(sqrt(sym(2))*(1 + sym(1i)/z))/(sqrt(z)*sqrt(sym(pi)))

Find the derivative of H.

diffH = diff(H)
diffH = 

2eziiz5/2π-2ezi1+izizπ+2ezi1+iz2z3/2π(sqrt(sym(2))*exp((z*sym(1i)))*sym(1i))/(z^sym(5/2)*sqrt(sym(pi))) - (sqrt(sym(2))*exp((z*sym(1i)))*(1 + sym(1i)/z)*sym(1i))/(sqrt(z)*sqrt(sym(pi))) + (sqrt(sym(2))*exp((z*sym(1i)))*(1 + sym(1i)/z))/(2*z^sym(3/2)*sqrt(sym(pi)))

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.

Introduced in R2018b