Question: > 
> $$\int\frac{e^x+1}{e^x-1}\,\mathrm dx$$
> 
> 
> 

For this above problem, I tried adding and subtracting a $e^x$ to the numerator and proceeded. I did end up with an answer. I also tried to solve this question by taking $e^{x/2}$ common from both numerator and the denominator.

$$\int\frac{e^{x/2}+e^{-x/2}}{e^{x/2}-e^{-x/2}}\mathrm dx$$

Once I've taken $e^{x/2}$ out from the denominator and the numerator, I thought of applying this property:
$$\int\frac{f'(x)}{f(x)}\, \mathrm dx = \ln |f(x)|+C$$
But I am unable to manipulate my obtained expression using this property.

Answer: 
$$\int \frac{e^x+1}{e^x-1} dx = \int 1 + \frac 2 {e^x-1} dx = x +2\int \bigg( \frac {e^x}{e^x-1} -1 \bigg)dx$$
Now you apply your formula to evaluate last integral. You get:$$x + 2(\ln|e^x-1| - x) + c$$
Multiply the numerator and denominator by $e^{-x/2}$ to form

$$\frac{e^x+1}{e^x-1}\times\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})},$$
then
$$\int \frac{e^x+1}{e^x-1}\,dx=\int \frac{\cosh(\frac{x}{2})}{\sinh(\frac{x}{2})}\,dx=2\int\frac{d\left(\sinh\left(\frac{x}{2}\right)\right)}{{\sinh(\frac{x}{2})}}=2\ln\left|\sinh\left(\frac{x}{2}\right)\right|+C.$$

If $K$ is a constant, then all integrals of the form $\frac{f'}{f}$ evaluate to

$$K\int\frac{f'(x)}{f(x)}\,dx=K\ln|f(x)|+C.$$