# What is the integral of $\int\frac{(x-1)e^{1/x}dx}{x}$?

I have been trying to solve this integral $\int\frac{(x-1)e^{1/x}dx}{x}$ I used WolframAlpha to solve it but it doesn't show the process. The solution is $e^{1/x}{x} + constant$

-

We can integrate this by separating the integrand and integrating by parts: \begin{align} \int\frac{(x-1)e^{1/x}}{x}dx &=\int e^{1/x}dx-\int \frac{1}{x} e^{1/x}dx\\ &=\int e^{1/x}dx+\int x\left(\frac{d}{dx}e^{1/x}\right)dx\\ &= \int e^{1/x}dx + xe^{1/x}- \int e^{1/x}dx\\ &= xe^{1/x} + C \end{align}

-
Thank you, Alex. –  Miguel Alvarez Aug 19 '12 at 19:27

$x=\frac1u,dx=-\frac1{u^2}du$

$-\int\dfrac{(\frac1u-1)\frac{e^u}{u^2}du}{\frac1u}$

Bring the minus inside and multiply top and bottom by $u$. Bring the remaining $\frac1u$ inside the parentheses.

$\int(\frac1u-\frac1{u^2})e^udu=$

$\int\frac1ud(e^u)+e^ud(\frac1u)=\int d(\frac{e^u}u)=\frac{e^u}u+C=xe^{\frac1x}+C$

-
Thank you, Mike –  Miguel Alvarez Aug 19 '12 at 19:43

Rewrite the integral:

$$\int\frac{(1-x)e^{1/x}}x\,dx=\int\left(1-\frac1x\right)e^{1/x}\,dx=\int e^{1/x}\,dx-\int\,\frac1xe^{1/x}\,dx\;.$$

Now try computing the first integral by parts, with $u=e^{1/x}$ and $dv=dx$. You get $du=-\frac1{x^2}e^{1/x}dx$ and $v=x$, yielding

$$\int e^{1/x}\,dx=xe^{1/x}+\int\frac1xe^{1/x}\,dx\;.$$

But it follows immediately from this that

$$\int e^{1/x}\,dx-\int\,\frac1xe^{1/x}\,dx=xe^{1/x}$$

up to the usual constant of integration.

-
@Peter: True. Better now? –  Brian M. Scott Aug 19 '12 at 19:36
Just kidding, Prof. Could I make you some questions in chat about the thing I'm doing on the floor function? –  Pedro Tamaroff Aug 19 '12 at 19:40
Thank you @BrianM.Scott –  Miguel Alvarez Aug 19 '12 at 19:43