Learn R Programming

frmqa (version 0.1-5)

besselK_inc_clo: Exact Calculation of the Incomplete BesselK Function

Description

Calculates upper and lower incomplete functions of the modified Bessel function of the third kind $K_{\lambda}(z)$, see details, using closed-form formulae.

Usage

besselK_inc_clo(x, z, lambda, lower = FALSE, expon.scaled = FALSE)

Arguments

Details

One of the integral representations of $K_{\lambda}(z)$ is given by $$K_{\lambda}(z) = \sqrt{\frac{\pi}{2z}} \frac{1}{\Gamma(\lambda + \frac{1}{2})}\,e^{-z}\int_0^{\infty} e^{-\xi}\xi^{\lambda - 1/2}\left(1+\frac{\xi}{2 z} \right)^{\lambda -1/2}\,d\xi,$$ besselK_inc_clo evaluates closed-form formulae, which we derived to compute this integral, in the $(0, x)$ and $(x, \infty)$ intervals for the so-called lower and upper incomplete Bessel function respectively. ``Exact" evaluation of the integral in these intervals can also be obtained by numerical integration using software such as Maple www.maple.com.

References

Olver, F.W.J., Lozier, D.W., Boisver, R.F. and Clark, C.W (2010) Handbook of Mathematical Functions. New York: National Institute of Standards and Technology, and Cambridge University Press. Watson, G.N (1931) A Treatise on the Theory of Bessel Functions and Their Applications to Physics. London: MacMillan and Co.

See Also

besselK_app_ser, besselK_inc_erfc

Examples

Run this code
options(digits = 15)	
  ## For x = 5, z = 8, lambda = 15/2 Maple 15 gives exact value of the
  ## lower incomplete Bessel function 0.997 761 151 460 5189(-4)
  besselK_inc_clo(5, 8, 15/2, lower = TRUE, expon.scaled = FALSE)
  ## For x = 21, z = 8, lambda = 21/2 Maple 15 give exact value of the
  ## upper incomplete Bessel function 0.704 812 324 921 884 3938(-2)
  besselK_inc_clo(21, 8, 21/2, lower = FALSE, expon.scaled = FALSE)

Run the code above in your browser using DataLab