besselk

besselk(nu, x)

Modified Bessel function of the second kind of order nu, $K_\nu(x)$.

Examples

The besselk function in Julia calculates the modified Bessel function of the second kind, denoted as K_ν(x), where ν is the order and x is the argument.

Here are some examples of how to use the besselk function:

  1. Calculate K_0(x) for a specific value:

    julia> besselk(0, 2.5)
    0.1842676902057126

    This example calculates the value of the modified Bessel function of the second kind with order 0 (K_0(x)) at x = 2.5.

  2. Evaluate K_2.5(x) for an array of values:

    julia> x = [1.0, 2.0, 3.0, 4.0];
    julia> besselk(2.5, x)
    4-element Array{Float64,1}:
    0.5866369321861473
    0.2346365252067939
    0.08793892698659256
    0.03146419392390222

    In this example, we calculate the modified Bessel function of the second kind with order 2.5 (K_2.5(x)) for each value in the array x.

  3. Use a variable for the order ν:
    julia> ν = 1.5;
    julia> besselk(ν, 3.0)
    0.11389387274953318

    Here, a variable ν is used to represent the order, and the function calculates K_ν(x) at x = 3.0.

Remember that the besselk function only accepts scalar or array-like inputs for both ν and x.

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: