We can multiply and divide by $e^x$ to get the desired form $\int f(g(x))g'(x)dx$ and use the substitution rule in a straightforward way.
I'm reading Spivak and he says that there's an alternative and preferable way of evaluating this integral:
if we write $u=e^x$, $x=\log{u}$, $dx=\frac1udu$, then $\int \frac{1+e^x}{1-e^x}dx$ becomes $\int \frac{1+u}{1-u}\frac1udu$
I don't understand what happens between $x=\log{u}$ and $dx=\frac1udu$. It looks like he takes the the derivative of both $x$ and $log{x}$ and appends $dx$ and $du$. Why does he take the derivative? How and why does he append $dx$ and $du$?