How do I integrate$ \int\frac{1}{e^{2x}+e^x} \,dx $ How do I integrate following function?
$$
\int\frac{1}{e^{2x}+e^x} \,dx
$$
 A: HINT:
Set $e^x=u, x=\ln u\implies dx=\dfrac{du}u$ 
$$\int\dfrac{dx}{e^x(e^x+1)}=\int\dfrac{du}{u^2(u+1)}$$
Now use Partial fraction decomposition, $$\dfrac1{u^2(u+1)}=\dfrac Au+\dfrac B{u^2}+\dfrac C{u+1}$$
A: Write $$\dfrac1{e^x(e^x+1)}=\dfrac{(e^x+1)-e^x}{e^x(e^x+1)}=e^{-x}-\dfrac1{e^x+1}$$
and use How do I solve $\displaystyle\int \frac{\mathrm{d}x}{e^x + 1} $?
A: 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}$$
A: Let $e^x= t\;,$ Then $\displaystyle e^x dx = dt\Rightarrow dx = \frac{1}{e^x}dt = \frac{dt}{t}$
So Integral $$\displaystyle I = \int\frac{1}{e^x(e^x+1)}dx = \int\frac{1}{t^2(t+1)}dt$$
Now Let $\displaystyle t = \frac{1}{u}\;,$ Then $\displaystyle dt = -\frac{1}{u^2}du$
So we get $$\displaystyle I = -\int \frac{u}{u+1}du = -\int\frac{(u+1)-1}{u+1}du = -u+\ln|u+1|+\mathcal{C}$$
So we get $$\displaystyle I = -\frac{1}{t}+\ln\left|\frac{t+1}{t}\right|+\mathcal{C} =-\frac{1}{e^x}+\ln\left|\frac{e^x+1}{e^x}\right|+\mathcal{C}$$
So we get $$\displaystyle I = -e^{-x}+\ln|e^x+1|-x+\mathcal{C}$$
A: $$
\int\frac{1}{e^{2x}+e^x} \,dx = \int\frac{e^x\,dx}{e^{3x} + e^{2x}} = \int \frac{e^x\,dx}{(e^x)^2(e^x + 1)} = \int\frac{du}{u^2(u+1)}
$$
Then use partial fractions.
