TITLE: Whats the integral of $e^{1/x}$ dx?
QUESTION [5 upvotes]: Iam trying to solve this as a part of some problem. But I am not able to find the value for this.
Can anyone integrate the above problem.
Please let me know. Thank you.

REPLY [5 votes]: Make a substitution of $x = \tan \theta$, then you obtain
$$ I = \int e^{\cot \theta} \sec^2\theta \ \ d\theta $$
Integrate by parts with $u$ being the exponential:
$$ uv - \int{v \ du} = \tan \theta \ e^{\cot \theta} + \int{\dfrac{e^{\cot \theta}}{\sin \theta \cos \theta} \ d \theta} $$
Make a substitution of $u = \cot \theta \implies du = -\csc^2 \theta$, noting that $\tan \theta = 1/u$ (and substituting $x$ back in):
$$I = xe^{1/x} - \int{\dfrac{e^u}{u} \ du}$$
We arrive at the final answer by substituting everything back in:
$$\boxed{\displaystyle I = xe^{1/x} - \operatorname{Ei} \left( \dfrac{1}{x} \right) + C}$$
I explain more of the small algebraic details here, if any step is unclear.

A note on the solution: There's actually a much simpler solution I found after realizing the trig sub is redundant. Here it is:
Start by integrating by parts, with $dv = 1$:
$$\displaystyle I = xe^{1/x} - \int{\dfrac{-xe^{1/x}}{x^2} \ dx} = xe^{1/x} + \int{ \dfrac{e^{1/x}}{x}  \ dx}$$
We can substitute $u = 1/x \implies du = -1/x^2 \ dx$, noting that $x = 1/u$:
$$\displaystyle I = xe^{1/x} - \int{\dfrac{ue^{u}}{u^2} \ du} = xe^{1/x} - \int{\dfrac{e^{u}}{u} \ du}$$
$$\boxed{\displaystyle I = xe^{1/x} - \operatorname{Ei} \left( \dfrac{1}{x} \right) + C}$$