besselK1

Evaluates the real modified Bessel function of the second kind of order one \(K_1(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

\[K_1(x) = \int_0^{\infty} \sin (x \sinh t) \sinh t\phantom{.}dt\]

If no solution can be computed, NaN is returned.

Description

Since \(K_1(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 \(K_1(x)\).

Example

The Bessel function \(K_1(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 \(\sqrt{\pi/(2x)} e^{-x}\),

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 \(K_1(x)\) does not overflow.