besselIasym {Bessel}R Documentation

Asymptotic Expansion of Bessel I(x,nu) and K(x,nu) For Large x

Description

Compute Bessel function Iν(x)I_{\nu}(x) and Kν(x)K_{\nu}(x) for large xx and small or moderate ν\nu, using the asymptotic expansions (9.7.1) and (9.7.2), p.377-8 of Abramowitz & Stegun, for xx \to\infty, even valid for complex xx,

Ia(x)=exp(x)/2πxf(x,a),I_a(x) = exp(x) / \sqrt{2\pi x} \cdot f(x, a),

where

f(x,a)=1μ18x+(μ1)(μ9)2!(8x)2,f(x,a) = 1 - \frac{\mu-1}{8x} + \frac{(\mu-1)(\mu-9)}{2! (8x)^2} - \ldots,

and μ=4a2\mu = 4 a^2 and arg(x)<π/2|arg(x)| < \pi/2.

Whereas besselIasym(x,a) computes a possibly exponentially scaled and/or logged version of Ia(x)I_a(x), besselI.ftrms returns the corresponding terms in the series expansion of f(x,a)f(x,a) above.

Usage

besselIasym  (x, nu, k.max = 10, expon.scaled = FALSE, log = FALSE)
besselKasym  (x, nu, k.max = 10, expon.scaled = FALSE, log = FALSE)
besselI.ftrms(x, nu, K = 20)

Arguments

x

numeric or complex (with real part) 0\ge 0.

nu

numeric; the order (maybe fractional!) of the corresponding Bessel function.

k.max, K

integer number of terms in the expansion.

expon.scaled

logical; if TRUE, the results are exponentially scaled in order to avoid overflow.

log

logical; if TRUE, log(f(.))\log(f(.)) is returned instead of ff.

Details

Even though the reference (A. & S.) requires argz<π/2|\arg z| < \pi/2 for I()I() and argz<3π/2|\arg z| < 3\pi/2 for K()K(), where arg(z):=\arg(z) := Arg(z), the zero-th order term seems correct also for negative (real) numbers.

Value

a numeric (or complex) vector of the same length as x.

Author(s)

Martin Maechler

References

Abramowitz, M., and Stegun, I. A. (1964, etc). Handbook of mathematical functions (NBS AMS series 55, U.S. Dept. of Commerce).

See Also

From this package Bessel() BesselI(); further, besselI.nuAsym() which is useful when ν\nu is large (as well); further base besselI, etc

Examples

x <- c(1:10, 20, 50, 100^(2:10))
nu <- c(1, 10, 20, 50, 100)
r <- lapply(c(0:4,10,20), function(k.)
            sapply(nu, function(n.)
                  besselIasym(x, nu=n., k.max = k., log = TRUE)))
warnings() 

try( # needs improvement in R  [or a local workaround]
 besselIasym(10000*(1+1i), nu=200, k.max=20, log=TRUE)
) # Error in log1p(-d) : unimplemented complex function


[Package Bessel version 0.6-1 Index]