solve:$\int \frac{e^x+1}{e^x-1}dx$ solve:$$\int \frac{e^x+1}{e^x-1}dx$$
I tried $$\int \frac{e^x}{e^x+1}dx+\int   \frac{1}{e^x-1}dx$$
But I cant calculate second part
 A: Alternatively, you could note that 
$$\frac{1}{e^x-1}=-\frac{e^{-x}}{e^{-x}-1}$$
so that if you set $u=e^{-x}-1$ you get $du=-e^{-x}dx$ and thus
$$\int\frac{dx}{e^x-1}=\int\frac{-e^{-x}dx}{e^{-x}-1}=\int\frac{du}{u}.$$ The rest is easy.
A: For second part let $u=e^x-1$ then $du=e^x \,dx=(u+1) \,dx$. So $dx=du/(u+1)$. Then
$$\int\frac{1}{e^x-1}\,dx=\int\frac{1}{u(u+1)}\,du = \int \frac{1}{u}-\frac{1}{u+1} \, du$$
Can you take it from here?
A: If $u = e^x$ then $du = e^x \, dx$ so $dx = du/u$. This gives
$$ \int \frac{1}{u(u - 1)} \; du = \int \left( \frac{1}{u-1} - \frac1u \right) \, du. $$
A: $$\frac{e^x+1}{e^x-1}.\frac{e^{-x/2}}{e^{-x/2}}=\frac{e^{x/2}+e^{-x/2}}{e^{x/2}-e^{-x/2}}=\frac{\cosh(\frac{x}{2})}{\sinh(\frac{x}{2})}$$
so
$$\int \frac{e^x+1}{e^x-1}dx=\int \frac{\cosh(\frac{x}{2})}{\sinh(\frac{x}{2})}dx=2\log(\sinh(\frac{x}{2}))+C$$
A: Another way to do this : consider $f:D\to \mathbb{R}, f(x)=e^x-1$ ($D$ is the interval on which you are computing that indefinite integral). Then $f'(x)=e^x, \forall x\in D$ and we have that $$I=\int \frac{2f'(x)-f(x)}{f(x)}dx=2\int \frac{f'(x)}{f(x)}dx-\int dx=2\ln|f(x)|-x+C=2\ln|e^x-1|-x+C$$
The purpose of my post is to show a trick that can be used to compute some more difficult integrals.
