Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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$

share|cite|improve this question
up vote 7 down vote accepted

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}$$

share|cite|improve this answer
Thank you, Alex. – Miguel Alvarez Aug 19 '12 at 19:27



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


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

share|cite|improve this answer
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.

share|cite|improve this answer
@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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.