# hankelh2

hankelh2(nu, x)

Bessel function of the third kind of order nu, $H^{(2)}_\nu(x)$.

## Examples

In the Julia programming language, the function hankelh2(nu, x) computes the Hankel function of the second kind of order nu, denoted as H^(2)_nu(x).

julia> hankelh2(0, 1.5)
-0.20714872450183635

Below are some examples of how the hankelh2 function can be used:

1. Compute Hankel function for a specific order and argument:

julia> hankelh2(1, 2.5)
-0.41964337989619933

This example calculates the Hankel function of the second kind, order 1, evaluated at x = 2.5.

2. Evaluate Hankel function for an array of arguments:

julia> x = [1.0, 2.0, 3.0];
julia> hankelh2(0, x)
3-element Array{Float64,1}:
-0.20714872450183635
-0.4003122173043971
-0.24644075065195296

It computes the Hankel function of the second kind, order 0, for each element in the array x.

3. Calculate Hankel function for a range of orders:
julia> orders = [0, 1, 2];
julia> hankelh2.(orders, 1.5)
3-element Array{Float64,1}:
-0.20714872450183635
-0.001985068420836698
0.04701768273225368

Here, it evaluates the Hankel function of the second kind for different orders given by the orders array, all at x = 1.5.

Common mistake example:

julia> hankelh2([1, 2], 3)
ERROR: MethodError: no method matching hankelh2(::Array{Int64,1}, ::Int64)

In this case, the mistake is passing an array of orders instead of a single order. The hankelh2 function expects a scalar value for the order nu. Make sure to provide a single value for the order when using hankelh2.