The Risch algorithm shows that Ei is not an elementary function. The definition above can be used for positive values of x, but the integral has to be understood in terms of the Cauchy principal value due to the singularity of the integrand at zero.
For complex values of the argument, the definition becomes ambiguous due to branch points at 0 and Template:Nowrap<ref>Abramowitz and Stegun, p. 228</ref> Instead of Ei, the following notation is used,<ref>Abramowitz and Stegun, p. 228, 5.1.1</ref>
where <math>\gamma</math> is the Euler–Mascheroni constant. The sum converges for all complex <math>z</math>, and we take the usual value of the complex logarithm having a branch cut along the negative real axis.
This formula can be used to compute <math>E_1(x)</math> with floating point operations for real <math>x</math> between 0 and 2.5. For <math>x > 2.5</math>, the result is inaccurate due to cancellation.
A faster converging series was found by Ramanujan:<ref>Andrews and Berndt, p. 130, 24.16</ref>
File:AsymptoticExpansionE1.png Relative error of the asymptotic approximation for different number <math>~N~</math> of terms in the truncated sum
Unfortunately, the convergence of the series above is slow for arguments of larger modulus. For example, more than 40 terms are required to get an answer correct to three significant figures for <math>E_1(10)</math>.<ref>Bleistein and Handelsman, p. 2</ref> However, for positive values of x, there is a divergent series approximation that can be obtained by integrating <math>x e^x E_1(x)</math> by parts:<ref>Bleistein and Handelsman, p. 3</ref>
<math>E_1(x)=\frac{\exp(-x)} x \left(\sum_{n=0}^{N-1} \frac{n!}{(-x)^n} +O(N!x^{-N}) \right)</math>
The relative error of the approximation above is plotted on the figure to the right for various values of <math>N</math>, the number of terms in the truncated sum (<math>N=1</math> in red, <math>N=5</math> in pink).
Asymptotics beyond all orders
File:Normalized exponential integral.pngNormalized exponential integral. The value plotted is <math>\frac{\operatorname{Ei}(x)}{(\exp x)/x}.</math> The values of <math>x</math> are written above the corresponding point. The horizontal spacing is according to <math>\arctan x.</math> The graph is extended "beyond infinity" a little on both the right and the left to show how the normalized function behaves when <math>1/x</math> is small. (The horizontal spacing for these points corresponds to angles whose tangent is <math>x.</math>)
Using integration by parts, we can obtain an explicit formula<ref>Template:Citation</ref><math display="block">\operatorname{Ei}(z) = \frac{e^{z}} {z} \left (\sum _{k=0}^{n} \frac{k!} {z^{k}} + e_{n}(z)\right), \quad e_{n}(z) \equiv (n + 1)!\ ze^{-z}\int _{ -\infty }^{z} \frac{e^{t}} {t^{n+2}}\,dt</math> For any fixed <math>z</math>, the absolute value of the error term <math>|e_n(z)|</math> decreases, then increases. The minimum occurs at <math>n\sim |z|</math>, at which point <math>\vert e_{n}(z)\vert \leq \sqrt{\frac{2\pi } {\vert z\vert }}e^{-\vert z\vert }</math>. This bound is said to be "asymptotics beyond all orders".
From the two series suggested in previous subsections, it follows that <math>E_1</math> behaves like a negative exponential for large values of the argument and like a logarithm for small values. For positive real values of the argument, <math>E_1</math> can be bracketed by elementary functions as follows:<ref>Abramowitz and Stegun, p. 229, 5.1.20</ref>
<math>
\frac 1 2 e^{-x}\,\ln\!\left( 1+\frac 2 x \right)
< E_1(x) < e^{-x}\,\ln\!\left( 1+\frac 1 x \right)
\qquad x>0
</math>
The left-hand side of this inequality is shown in the graph to the left in blue; the central part <math>E_1(x)</math> is shown in black and the right-hand side is shown in red.
Definition by Ein
Both <math>\operatorname{Ei}</math> and <math>E_1</math> can be written more simply using the entire function <math>\operatorname{Ein}</math><ref>Abramowitz and Stegun, p. 228, see footnote 3.</ref> defined as
<math>
\operatorname{Ein}(z)
= \int_0^z (1-e^{-t})\frac{dt}{t}
= \sum_{k=1}^\infty \frac{(-1)^{k+1}z^k}{k\; k!}
</math>
(note that this is just the alternating series in the above definition of <math>E_1</math>). Then we have
<math>z\frac{d^2w}{dz^2} + (b-z)\frac{dw}{dz} - aw = 0</math>
is usually solved by the confluent hypergeometric functions <math>M(a,b,z)</math> and <math>U(a,b,z).</math> But when <math>a=0</math> and <math>b=1,</math> that is,
with the derivative evaluated at <math>a=0.</math> Another connexion with the confluent hypergeometric functions is that E1 is an exponential times the function U(1,1,z):
The series expansion of the exponential integral immediately gives rise to an expression in terms of the generalized hypergeometric function <math>{}_2F_2</math>:
The derivatives of the generalised functions <math>E_n</math> can be calculated by means of the formula <ref>Abramowitz and Stegun, p. 230, 5.1.26</ref>
<math>
E_n '(z) = - E_{n-1}(z)
\qquad (n=1,2,3,\ldots)
</math>
Note that the function <math>E_0</math> is easy to evaluate (making this recursion useful), since it is just <math>e^{-z}/z</math>.<ref>Abramowitz and Stegun, p. 229, 5.1.24</ref>
If <math>z</math> is imaginary, it has a nonnegative real part, so we can use the formula
<math>
E_1(z) = \int_1^\infty
\frac{e^{-tz}} t \, dt
</math>
to get a relation with the trigonometric integrals <math>\operatorname{Si}</math> and <math>\operatorname{Ci}</math>:
<math>
E_1(ix) = i\left[ -\tfrac{1}{2}\pi + \operatorname{Si}(x)\right] - \operatorname{Ci}(x)
\qquad (x > 0)
</math>
The real and imaginary parts of <math>\mathrm{E}_1(ix)</math> are plotted in the figure to the right with black and red curves.
Approximations
There have been a number of approximations for the exponential integral function. These include:
The Swamee and Ohija approximation<ref name=":0">Template:Cite journal</ref> <math display="block">E_1(x) = \left (A^{-7.7}+B \right )^{-0.13},</math> where <math display="block">\begin{align}
A &= \ln\left [\left (\frac{0.56146}{x}+0.65\right)(1+x)\right] \\
B &= x^4e^{7.7x}(2+x)^{3.7}
\end{align}</math>
The Allen and Hastings approximation <ref name=":0" /><ref name=":1">Template:Cite journal</ref> <math display="block">E_1(x) = \begin{cases} - \ln x +\textbf{a}^T\textbf{x}_5,&x\leq1 \\ \frac{e^{-x}} x \frac{\textbf{b}^T \textbf{x}_3}{\textbf{c}^T\textbf{x}_3},&x\geq1 \end{cases}</math> where <math display="block">\begin{align}
The continued fraction expansion <ref name=":1" /> <math display="block">E_1(x) = \cfrac{e^{-x}}{x+\cfrac{1}{1+\cfrac{1}{x+\cfrac{2}{1+\cfrac{2}{x+\cfrac{3}{\ddots}}}}}}.</math>
The approximation of Barry et al. <ref>Template:Cite journal</ref> <math display="block">E_1(x) = \frac{e^{-x}}{G+(1-G)e^{-\frac{x}{1-G}}}\ln\left[1+\frac G x -\frac{1-G}{(h+bx)^2}\right],</math> where: <math display="block">\begin{align}
h &= \frac{1}{1+x\sqrt{x}}+\frac{h_{\infty}q}{1+q} \\
q &=\frac{20}{47}x^{\sqrt{\frac{31}{26}}} \\
h_{\infty} &= \frac{(1-G)(G^2-6G+12)}{3G(2-G)^2b} \\
b &=\sqrt{\frac{2(1-G)}{G(2-G)}} \\
G &= e^{-\gamma}
\end{align}</math> with <math>\gamma</math> being the Euler–Mascheroni constant.
Inverse function of the Exponential Integral
We can express the Inverse function of the exponential integral in power series form:<ref>{{#invoke:citation/CS1|citation
|CitationClass=web
}}</ref>