TITLE: How do I integrate$ \int\frac{1}{e^{2x}+e^x} \,dx $
QUESTION [5 upvotes]: How do I integrate following function?
$$
\int\frac{1}{e^{2x}+e^x} \,dx
$$

REPLY [3 votes]: And yet, one more approach is 
$$\begin{align}
\int \frac{1}{e^{2x}+e^x}\,dx&=\int \frac{e^{-2x}}{1+e^{-x}}\,dx\\\\
&=\int \left(1-\frac{1}{1+e^{-x}}\right)e^{-x}\,dx\\\\
&=-e^{-x}+\int \frac{1}{1+e^{-x}}\,d\left(e^{-x}\right)\\\\
&=\log(1+e^{-x})-e^{-x}+C
\end{align}$$