besselh

besselh(nu, k, x)

Bessel function of the third kind of order nu (Hankel function). k is either 1 or 2, selecting hankelh1 or hankelh2, respectively.

Examples

  1. Compute the Hankel function of the first kind (hankelh1):

    julia> besselh(0.5, 1, 2.0)
    0.4482883573538264

    This example calculates the Hankel function of order 0.5 (nu) of the first kind (hankelh1) at x = 2.0.

  2. Compute the Hankel function of the second kind (hankelh2):

    julia> besselh(2, 2, 3.5)
    -0.04656529596447402

    It computes the Hankel function of order 2 (nu) of the second kind (hankelh2) at x = 3.5.

  3. Evaluate the Bessel function at multiple points:
    julia> x = [1.0, 2.0, 3.0, 4.0];
    julia> besselh(1, 1, x)
    4-element Array{Float64,1}:
    0.207115
    -0.270151
    -0.340043
    -0.409775

    In this example, the besselh function is applied to each element in the array x and returns an array of the corresponding evaluations.

Common mistake example:

julia> besselh(0, 3, 1.5)
ERROR: ArgumentError: Invalid Bessel function type, expected 1 or 2

In this example, the value of k is provided as 3, which is invalid. The second argument k should be either 1 or 2 to select hankelh1 or hankelh2 respectively. Ensure that the value of k is correctly specified to avoid such errors.

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
Details

Checking you are not a robot: