Asymptotic expansion of integrals and solving using integration by parts. I am working on a type of asymptotic expansion
We have $\int_0 ^1 e^{-\frac{x}{t}}dt$ as$x \rightarrow 0+$. In class we have only talked about using integration by parts for integrals of the form $\int f(t) e^{-t}dt$ and Laplace type of integrals. This does not fit the line for either. What I was thinking was to introduce a substitution $u= \frac{1}{t}$, but the problem is that 
$$\int_{1} ^\infty \frac{1}{u^2}e^{-xu}du$$
I did this because it now looks like a laplace type of integral. The problem that I see and I think I cannot do much with this form is because for Laplace type of integrals we need $x \rightarrow \infty$ and sadly we do not have that. So I think this is some clever by parts, but I cannot see it.
That does not seem correct can someone please help me with this problem.
 A: Using the change of variables $y = xu$ and integrating by parts we get 
$$\int_{1} ^\infty \frac{e^{-xu}}{u^2} \,du = x\int_{x} ^\infty \frac{e^{-y}}{y^2} \,dy \\ = x \left(\frac{e^{-x}}{x}  - \int_x^\infty \frac{e^{-y}}{y} \, dy\right)$$
Note that the exponential integral inside the parentheses has a log singularity at $x = 0$ which can be extracted as follows:
$$\begin{align}\int_x^\infty \frac{e^{-y}}{y} \, dy &= \int_1^\infty \frac{e^{-y}}{y} \, dy  - \int_1^x \frac{e^{-y}}{y} \, dy  \\ &= \int_1^\infty \frac{e^{-y}}{y} \, dy  - \int_1^x \frac{e^{-y}-1}{y} \, dy  -\int_1^x \frac{1}{y} \, dy  \\ &= \underbrace{\int_1^\infty \frac{e^{-y}}{y} \, dy  + \int_0^1 \frac{e^{-y}-1}{y} \, dy}_C  -\int_0^x \frac{e^{-y} -1 }{y} \, dy - \log x \\ &= C - \log x  - \int_0^x \sum_{n=1}^\infty (-1)^n \frac{y^{n-1}}{n!} \, dy \\ &= C - \log x  - \sum_{n=1}^\infty \frac{(-x)^n}{n n!} \end{align}$$
Thus, we get the following expansion about $x = 0:$ 
$$\begin{align}\int_{1} ^\infty \frac{e^{-xu}}{u^2} \,du &= e^{-x} - Cx + x\log x + \sum_{n=1}^\infty \frac{(-x)^{n+1}}{n n!} \\ &=  \sum_{n=0}^\infty \frac{(-x)^{n}}{n!} - Cx + x\log x + \sum_{n=1}^\infty \frac{(-x)^{n+1}}{n n!} \\ &= 1 -Cx +x \log x + \sum_{n=1}^\infty \frac{(-1)^{n}x^n (n- x)}{n n!} \end{align}$$
where $-C$ turns out to be the Euler-Mascheroni constant and the infinite series converges for all $x$, albeit very slowly as $x$ gets large.  A good asymptotic approximation is provided with very few terms when $x$ is small.
We immediately see that the integral is asymptotically $\sim e^{-x} \sim 1$ as $x \to 0.$
A: 
Here, we present an approach that is similar to the one posted by @RRL.  However, we write the final form with a Taylor series.

Let $I(x)$ be given by the integral
$$I(x)=\int_1^\infty \frac{e^{-xt}}{t^2}\,dt \tag1$$
Integrating by parts the integral on the right-hand side of $(1)$ with $u=e^{-xt}$ and $v=-\frac1t$ reveals
$$\begin{align}
I(x)&=e^{-x}-x\int_1^\infty \frac{e^{-xt}}{t}\,dt\\\\
&=e^{-x}-x\int_x^\infty \frac{e^{-t}}{t}\,dt\tag2
\end{align}$$
Integrating by parts the integral on the right-hand side of $(2)$ with $u=e^{-t}$ and $v=\log(t)$, we obtain
$$\begin{align}
I(x)&=e^{-x}+x\log(x)e^{-x}-x\int_x^\infty\log(t)e^{-t}\,dt\\\\
&=e^{-x}+x\log(x)e^{-x}-x\underbrace{\int_0^\infty\log(t)e^{-t}\,dt}_{=-\gamma}+x\int_0^x\log(t)e^{-t}\,dt\\\\
&=e^{-x}+x\log(x)e^{-x}-x\gamma+x\int_0^x\log(t)e^{-t}\,dt\tag3
\end{align}$$
Using the series representation of $e^{-x}=\sum_{n=0}^\infty\frac{(-1)^nx^n}{n!}$ in $(3)$, interchanging the integral with the series and evaluating the terms $\int_0^x t^n\log(t)\,dt$ by integrating by parts with $u=\log(t)$ and $v=\frac{t^{n+1}}{n+1}$ yields
$$\begin{align}
I(x)&=e^{-x}+x\log(x)e^{-x}-x\gamma+x\sum_{n=0}^\infty\frac{(-1)^n}{n!}\int_0^x\log(t)t^n\,dt\\\\
&=e^{-x}+x\log(x)e^{-x}-x\gamma+x\sum_{n=0}^\infty\frac{(-1)^nx^{n+1}}{(n+1)!}\left(\log(x)-\frac{1}{n+1}\right)\\\\
&=e^{-x}+x\log(x)e^{-x}-x\gamma-xe^{-x}\log(x)+x\log(x)+x\sum_{n=0}^\infty\frac{(-1)^nx^{n+1}}{(n+1)(n+1)!}\\\\
&=x\log(x)-\gamma x+ \color{blue}{e^{-x}-\sum_{n=1}^\infty \frac{(-1)^nx^{n+1}}{n\,n!}}\\\\
&=x\log(x)-\gamma x+ \color{blue}{1-x+\sum_{n=2}^\infty \frac{(-1)^n(2n-1)}{(n-1)\,n!}\,x^n}\\\\
&=1+x\log(x)-(1+\gamma)x+\sum_{n=2}^\infty \frac{(-1)^n(2n-1)}{(n-1)\,n!}\,x^n
\end{align}$$

Note that while this result is the same as the one posted by RRL, it casts the form in a Taylor series of powers of $x$ rather than a series with mixed power terms $nx^n-x^{n+1}$.

