hypergeom1F1: Confluent hypergeometric function

View source: R/hypergeom1F1.R

hypergeom1F1R Documentation

Confluent hypergeometric function

Description

hypergeom1F1(a, b, z) computes the confluent hypergeometric function 1F1(a, b, z) also known as the Kummer's function M(a, b, z), for the parameters a and b (here assumed to be real scalars), and the complex argument z (scalar, vector or array).

Usage

hypergeom1F1(a, b, z, n)

Arguments

a

parameter a (real scalar).

b

parameter b (real scalar).

z

complex argument (scalar, vector or array).

n

number of the Gauss-Laguerre nodes and weights on (0,Inf). If empty, default value is n = 64.

Details

The present algorithm was adapted from the MATLAB version of the FORTRAN program suggested by S.Zhang and J.Jin (1996). For more details see also http://iris-lee3.ece.uiuc.edu/~jjin/routines/routines.html.

Computation of 1F1(a, b, z) for large arguments z (with |Im(z)| >= |Re(z)|) and for b > a > 0) is based on using the steepest descent integration method as suggested by G. Navas Palencia and A.A. Arratia Quesada (2016).

Value

List including the following items:

f

calculated 1F1(a,b,z) of the same dimension as z,

method

indicator of the used method:
-1 is the method used for special cases, 0 is the method used for z == 0,
1 is the method based on the series expansion,
2 is the method based on the steepest descent integration,
3 is the method based on the asymptotic expansion,

loops

indicator of the used number of recursive loops.

Note

Ver.: 23-Sep-2018 17:54:17 (consistent with Matlab CharFunTool v1.3.0, 30-Mar-2018 13:45:00).

References

[1] Jin, J. M., and Zhang Shan Jjie. Computation of Special Functions. Wiley, 1996.

[2] Navas Palencia, G. and Arratia Quesada, A.A., 2016. On the computation of confluent hypergeometric functions for large imaginary part of parameters b and z. In Mathematical Software - ICMS 2016: 5th International Conference, Berlin, Germany, July 11-14, 2016: proceedings, pp. 241-248. Springer.

See Also

For more details on confluent hypergeometric function 1F1(a, b, z) or the Kummer's (confluent hypergeometric) function M(a, b, z) see WIKIPEDIA: https://en.wikipedia.org/wiki/Confluent_hypergeometric_function.

Other Utility Function: ChebCoefficients(), ChebPoints(), ChebPolyValues(), ChebPoly(), ChebValues(), GammaLog(), GammaMultiLog(), GammaMulti(), GammaZX(), Hypergeom1F1MatApprox(), Hypergeom1F1Mat(), Hypergeom2F1Mat(), Hypergeom2F1(), HypergeompFqMat(), InterpChebValues(), interpBarycentric()

Examples

## EXAMPLE 1
a <- 10
b <- 15
z <- c(0, 1, 10i, 50i, 10 + 50i, 100 + 50i)
n <- 64
result <- hypergeom1F1(a, b, z, n)

## EXAMPLE 2
# CF of Beta(1/2,1/2) distribution
a  = 1 / 2
b  = 1 / 2
t  = seq(-100, 100, length.out = 1001)
plotReIm(
        function(t)
                hypergeom1F1(a, a + b, 1i * t)$f,
        t,
        title = "Characteristic function of Beta(1/2,1/2) distribution",
        xlab = "t",
        ylab = "CF"
)

gajdosandrej/CharFunToolR documentation built on June 3, 2024, 7:46 p.m.