expint {VGAM}R Documentation

The Exponential Integral and Variants

Description

Computes the exponential integral Ei(x) for real values, as well as exp(-x) * Ei(x) and E_1(x).

Usage

expint(x)
expexpint(x)
expint.E1(x)

Arguments

x

Numeric. Ideally a vector of positive reals.

Details

The exponential integral Ei(x) function is the integral of exp(t) / t from 0 to x, for positive real x. The function E_1(x) is the integral of exp(-t) / t from x to infinity, for positive real x.

Value

Function expint(x) returns Ei(x), function expexpint(x) returns exp(-x) * Ei(x), function expint.E1(x) returns E_1(x).

Note

This function has not been tested thoroughly.

Author(s)

T. W. Yee has simply written a small wrapper function to call the above FORTRAN code.

References

http://www.netlib.org/specfun/ei.

See Also

log, exp.

Examples

 ## Not run: 
par(mfrow = c(2, 2))
curve(expint, 0.01, 2, xlim = c(0, 2), ylim = c(-3, 5),
      las = 1, col = "orange")
abline(v = (-3):5, h = (-4):5, lwd = 2, lty = "dotted", col = "gray")
abline(h = 0, v = 0, lty = "dashed", col = "blue")

curve(expexpint, 0.01, 2, xlim = c(0, 2), ylim = c(-3, 2),
      las = 1, col = "orange")
abline(v = (-3):2, h = (-4):5, lwd = 2, lty = "dotted", col = "gray")
abline(h = 0, v = 0, lty = "dashed", col = "blue")

curve(expint.E1, 0.01, 2, xlim = c(0, 2), ylim = c(0, 5),
      las = 1, col = "orange")
abline(v = (-3):2, h = (-4):5, lwd = 2, lty = "dotted", col = "gray")
abline(h = 0, v = 0, lty = "dashed", col = "blue")

## End(Not run)

[Package VGAM version 0.9-8 Index]