besselh

Bessel function of third kind (Hankel function)

Syntax

`H = besselh(nu,K,Z)H = besselh(nu,Z)H = besselh(nu,K,Z,1)`

Definitions

The differential equation

${z}^{2}\frac{{d}^{2}y}{d{z}^{2}}+z\frac{dy}{dz}+\left({z}^{2}-{\nu }^{2}\right)y=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}_{\nu }\left(z\right)=\frac{{J}_{\nu }\left(z\right)\mathrm{cos}\left(\nu \pi \right)-{J}_{-\nu }\left(z\right)}{\mathrm{sin}\left(\nu \pi \right)}.$

The relationship between the Hankel and Bessel functions is

$\begin{array}{l}{H}_{\nu }^{\left(1\right)}\left(z\right)={J}_{\nu }\left(z\right)+i{Y}_{\nu }\left(z\right)\\ {H}_{\nu }^{\left(2\right)}\left(z\right)={J}_{\nu }\left(z\right)-i{Y}_{\nu }\left(z\right),\end{array}$

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

Description

`H = besselh(nu,K,Z)` computes the Hankel function ${H}_{\nu }^{\left(K\right)}\left(z\right)$ where `K` = 1 or 2, for each element of the complex array `Z`. 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's size.

`H = besselh(nu,Z)` uses `K` = 1.

`H = besselh(nu,K,Z,1)` scales ${H}_{\nu }{}^{\left(K\right)}\left(z\right)$ by `exp(-i*Z)` if `K` = 1, and by `exp(+i*Z)` if `K` = 2.

Examples

collapse all

Modulus and Phase of Hankel Function

This example generates the contour plots of the modulus and phase of the Hankel function shown on page 359 of Abramowitz and Stegun, Handbook of Mathematical Functions [1].

Create a grid of values for the domain.

```[X,Y] = meshgrid(-4:0.025:2,-1.5:0.025:1.5); ```

Calculate the Hankel function over this domain and generate the modulus contour plot.

```H = besselh(0,1,X+1i*Y); contour(X,Y,abs(H),0:0.2:3.2) hold on ```

In the same figure, add the contour plot of the phase.

```contour(X,Y,(180/pi)*angle(H),-180:10:180) hold off ```

References

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