Expansion of integral How can I expand the integral
\begin{equation}
\int_{t}^{\infty}\frac{\exp(-x)}{x}dx
\end{equation}
 to compute it numerically. 
 A: This is an exponential integral with known series expansion:
$$\int_t^{+\infty}\frac{e^{-x}}x~\mathrm dx=-\gamma-\ln(t)-\sum_{k=1}^{+\infty}\frac{(-t)^k}{k\cdot k!}$$
Other such approximations may be found here.
A: Assuming $t>0$ we have
$$ I(t)=\int_{t}^{+\infty}\frac{dx}{x e^x} = \frac{1}{te^t}\int_{0}^{+\infty}\frac{dx}{\left(1+\frac{x}{t}\right)e^x}$$
and 
$$ \frac{1}{te^t}=\frac{1}{te^t}\int_{0}^{+\infty}\frac{dx}{e^x}>I(t)>\frac{1}{t e^t}\int_{0}^{+\infty}\frac{dx}{e^{\frac{x}{t}}e^x} = \frac{1}{(t+1)e^t} $$
might be good enough for pratical purposes. If you require a greater accuracy, you might use the continued fraction representation:
$$ I(t) = \frac{e^{-t}}{(t+1)-\frac{1}{(t+3)-\frac{4}{(t+5)-\frac{9}{(t+7)-\frac{16}{(9+t)+\ldots}}}}} $$
A: The function you are integrating is decays quite quick. So let $f(x) = \frac{\exp(-x)}{x}$, choose small $\Delta x$ and just compute:
$$\sum\limits_0^Mf(t + n\Delta x)\Delta x$$
where $M$ is some big number (the idea is that there is no point to compute the values all the way to infinity since you will be adding zero's.)
How to check if your $\Delta x$ is fine? Make is twice as small and recompute - if not much changed then you are fine. How to make sure your $M$ is big enough? Make it twice as big and recompute!
