The Ei command takes as argument a complex number.
Ei returns the value of the exponential integral at the
argument.
For non-zero real numbers x,
Ei(x) = | ∫ |
|
| dt. |
For x>0, this integral is improper but the principal value exists. This function satisfies Ei(0) = −∞, Ei(−∞) = 0.
Since
| = |
| + 1 + |
| + |
| + …, |
the Ei function can be extended to ℂ − {0} (with a branch cut on the positive real axis) by
Ei(z) = ln(z) + γ + x + |
| + |
| + … |
where γ = 0.57721566490… is Euler’s constant.
Input:
Output:
Input:
Output:
Input:
Output:
Input:
Output:
The input
Input:
approximates Euler’s constant
Output:
The Ei command can also take two arguments, where the second
argument is a positive integer indicating other types of exponential
integrals; Ei(x,n) = En(x). Specifically:
Ei(a,1) = -Ei(-a)
Ei(a,2) = exp(-a) + a*Ei(-a) = exp(-a) - a*Ei (a, 1)
and for n ≥ 2,
Ei(a,n)=(exp(-a) - a*Ei(a,n-1))/(n-1)