Ok, I want to find
$$\int\limits_0^t {{e^u}\log udu} $$ and $$\int\limits_0^t {{e^{ - u}}\log udu} $$
I'm thinking as follows
$$d\left( {{e^u}\log u} \right) = {e^u}\log udu + \frac{{{e^u}}}{u}du$$
$$d\left( {{e^{ - u}}\log u} \right) = - {e^{ - u}}\log udu + \frac{{{e^{ - u}}}}{u}du$$
Thus I put
$$\int {{e^u}\log udu} = {e^u}\log u - Ei\left( u \right)$$
$$\int {{e^{ - u}}\log udu} = Ei\left( { - u} \right) - {e^{ - u}}\log u$$
But then I want to integrate over $(0,t)$. My principal concern is proving that for $t\to 0$
$$ Ei\left( { - t} \right) - {e^{ - u}}\log u\to \gamma$$
$${e^u}\log u - Ei\left( t \right) \to -\gamma$$
How would you solve this?
EDIT: Ok I've found that $$Ei(t) = \gamma + \log(t) + z + \frac{z^2}{4} + \cdots + \frac{z^n}{n n!}+\cdots$$
The new question would be: How do I prove such expansion?
I mean, I know that
$$\int \frac{e^x}{x} dx = \log x + \sum_{n>0} \frac{x^n}{n n!}$$
But then again where does $\gamma$ appear? Since $$Ei(t) = \int_{-\infty}^t \frac{e^u}{u} du$$ I'd need to find the limit for $x \to -\infty$, which should be $\gamma$.
Is guess you could also use $$Ei(t) = \log t + \int_0^t {\frac{e^u-1}{u}du}$$ which is a more "natural" definition in the sense the integral is always converging for finite $t$ and the logarithm instantly discloses the discontinuity at $t=0$