besselK1

Evaluates the real modified Bessel function of the second kind of order one K1(x).

Synopsis

besselK1 (x)

Required Arguments

float x (Input)
Point at which the Bessel function is to be evaluated. It must be positive.

Return Value

The value of the Bessel function

K1(x)=0sin(xsinht)sinht.dt

If no solution can be computed, NaN is returned.

Description

Since K1(x) is complex for negative x and is undefined at x=0, besselK1 is defined only for x>0. For large x, besselK1 will underflow. See Figure 9-12 for a graph of K1(x).

Example

The Bessel function K1(1.5) is evaluated.

from __future__ import print_function
from numpy import *
from pyimsl.math.besselK1 import besselK1

x = 1.5
ans = besselK1(x)
print("K1(%f) = %f" % (x, ans))

Output

K1(1.500000) = 0.277388

Alert Errors

IMSL_LARGE_ARG_UNDERFLOW

The argument x must not be so large that the result, approximately equal to π/(2x)ex,

underflows.

Fatal Errors

IMSL_SMALL_ARG_OVERFLOW The argument x must be large enough (x>max(1/b,s) where s is the smallest representable positive number and b is the largest representable number) that K1(x) does not overflow.