Appropriate technique to calculate $\int(x+1-1/x)e^{x+1/x}\,dx$? I try to calculate
$$
\int(x+1-1/x)e^{x+1/x}\,dx.
$$
I tried substitution, but could not find any appropriate derivative. I tried it by product rule but ended up in a complex form.
Can anyone kindly give an appropriate technique?
 A: As suggested by Lucian, 
$$\begin{align}
\frac{d(x^ke^{x+x^{-1}})}{dx} & =e^{x+x^{-1}}\left(kx^{k-1}+x^k\frac{d(x+x^{-1})}{dx}\right) \\
&=e^{x+x^{-1}}(kx^{k-1}+x^k-x^{k-2}) \\
&=e^{x+x^{-1}}x^{k-1}(k+ x-x^{-1}) \\
&=e^{x+x^{-1}}(1+ x-x^{-1}) 
\end{align}$$
for $k=1$.  And that is that.
A: Let $$\displaystyle I = \int \left(1+x-\frac{1}{x}\right)\cdot e^{x+\frac{1}{x}} = \int \left(\frac{1}{x}+1-\frac{1}{x^2}\right)\cdot x \cdot e^{x+\frac{1}{x}}dx$$
Now We can Write $x = e^{\ln(x)}$.
So Integral $$\displaystyle I = \int e^{\ln(x)+x+\frac{1}{x}}\cdot \left(\frac{1}{x}+1-\frac{1}{x^2}\right)dx\;,$$
Now Let $$\displaystyle \ln(x)+x+\frac{1}{x} = t\;,$$
Then $$\displaystyle \left(\frac{1}{x}+1-\frac{1}{x^2}\right)dx = dt$$
So Integral $$\displaystyle I = \int e^{t}dt = e^{t}+\mathcal{C} = e^{\ln x+x+\frac{1}{x}}+C = e^{\ln x}\cdot e^{\left(x+\frac{1}{x}\right)}+\mathcal{C} = x\cdot e^{x+\frac{1}{x}}+\mathcal{C}$$
A: $\displaystyle\int\left(x+1-\frac{1}{x}\right)e^{x+\frac{1}{x}}\;dx=\int e^{x+\frac{1}{x}}\;dx+\int\left(x-\frac{1}{x}\right)e^{x+\frac{1}{x}}\;dx$
$\displaystyle\hspace{1.7 in}=\int e^{x+\frac{1}{x}}\;dx+\int x\left(1-\frac{1}{x^2}\right)e^{x+\frac{1}{x}}\;dx$.
Now integrate by parts with $ u=x, \;\;dv=\left(1-\frac{1}{x^2}\right)e^{x+\frac{1}{x}}dx,\;\; du=dx, \;\;v=e^{x+\frac{1}{x}}$ to get
$\displaystyle\hspace{1.7 in} \int e^{x+\frac{1}{x}}\;dx +x e^{x+\frac{1}{x}}-\int e^{x+\frac{1}{x}}\;dx=x e^{x+\frac{1}{x}}+C$.
