hankelh2(nu, x)

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


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)

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)

    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}:

    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}:

    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.

See Also

besselh, besseli, besselix, besselj, besselj0, besselj1, besseljx, besselk, besselkx, bessely, bessely0, bessely1, besselyx, hankelh1, hankelh1x, hankelh2, hankelh2x,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field

Checking you are not a robot: