solve:$\int \frac{e^x+1}{e^x-1}dx$

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.


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?


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