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$$
Let's use your approach:  

$I=\int\frac{e^{x/2}+e^{-x/2}}{e^{x/2}-e^{-x/2}}\mathrm dx=2 \int\frac{\frac{e^{x/2}}{2}+\frac{e^{-x/2}}{2}}{e^{x/2}-e^{-x/2}}\mathrm dx =2 \int\frac{(e^{x/2}-e^{-x/2})'}{e^{x/2}-e^{-x/2}}\mathrm dx =2\ln|e^{x/2}-e^{-x/2}|+c$