expint

Exponential integral E1(x).

Category: Mathematics > Elementary Math

Syntax

Y = expint(X)

Evaluates the integral of exp(-t)/t from X to infinity, for each element of X.

Description

expint(x) is the function usually written E1(x). It decreases from Inf at x = 0 toward zero as x grows, and it appears in heat conduction, radiative transfer and the Theis well function.

For negative real x the integral is not real: the result is complex, with an imaginary part of -pi.

Input arguments

X
Numeric array.

Output arguments

Y
Array of the same size as X.

Example

Values and the singularity at zero

expint([0.5 1 2])
expint(0)
expint(-1)
Output
ans = 1×3

    0.5598    0.2194    0.0489
ans = Inf
ans = -1.8951 - 3.1416i

See also

erf gammainc exp integral