Learn R Programming

frmqa (version 0.1-0)

besselK_app_ser: Asymptotic Approximations of the Modified Bessel K Function

Description

Approximates modified Bessel function of the third kind $K_{\lambda}(z)$ using asymptotic series.

Usage

besselK_app_ser(z, lambda, details = TRUE)

Arguments

Details

The asymptotic series of $K_{\lambda}(z)$ can be written as $$K_{\lambda}(z) \sim \sqrt{\frac{\pi}{2 z}}\, e^{-z} \Bigg{1 + \frac{4\lambda^2 - 1^2}{1!\, 8 z} + \frac{\left(4 \lambda^2 - 1^2\right)\left(4 \lambda^2 - 3^2 \right)}{2!\,(8 z)^2} + \cdots \Bigg}.$$ For a given value of $\lambda$, this function checks if the entered value of z is sufficiently large. Otherwise it approximates this value. The function returns: an accurate approximated value of $K_{\lambda}(z)$ (up to 15 dp) and a finite number of terms in the summation. By using this function the mathematical difficulties due to the presence of $K_{\lambda}(z)$ in the density function of the generalized hyperbolic and related distributions can be dealt with in a much simpler way. If z >=705 then approximated value is on an exponential scale to avoid underflow.

References

Olver, F.W.J., Lozier, D.W., Boisver, R.F., Clark, C.W., 2010. Handbook of Mathematical Functions. New York: National Institute of Standards and Technology, and Cambridge University Press. Abramowitz, M., Stegun, I. A., 1970. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover.

Examples

Run this code
besselK_app_ser(73, 9.12, details = TRUE)
  besselK_app_ser(1, 5, details = TRUE)

Run the code above in your browser using DataLab