# EXPINTEI

## Purpose:

Evaluates Ei(z), the Cauchy Principal Value Exponential Integral.

## Syntax:

EXPINTEI(z)

 z - A scalar or series, the integration limit.

## Returns:

A scalar or series, the value of Ei(z), the integration of -exp(t) / t from - to z.

## Example:

expintei(1)

returns 1.895118 the value of:

expintei(0)

returns -inf.

## Example:

expintei(1 + i)

returns 1.764626 + 2.387770i.

## Example:

expintei(-5..0.01..5);

xlabel("x");ylabel("Ei(x)");label("Ei Integral");

returns 1001 samples of Ei(x) with integration limits from -5 to 5.

## Example:

W1: 0.01..0.01..10

W2: expintei(W1)

W3: integ(exp(w1) / w1)

W2 contains the Cauchy principal value exponential integral and W3 computes an approximation by directly integrating exp(t) / t.

## Remarks:

The Cauchy principal exponential integral, Ei(z), is defined as:

The input z may be complex. The function is multi-valued with a branch cut along the negative real axis.

For positive real z:

where E1(z) is the generalized exponential integral implemented by EXPINT.

Ei(z) is real for real z.

Ei(0) = -