Simple integral with $e^x$ - how to decompose it? How to calculate this integral?
$$\int \frac{e^{2x}+2}{e^x+1}dx$$
I have tried various substitions such as: $t = e^x, t = e^x + 1, t = e^x +2, t = e^{2x}$
and none seem to work. 
According to wolframalpha I can simplify this expression into:
$$\frac{e^{2x}+2}{e^x +1} = e^x + \frac{3}{e^x+1} - 1$$
And then it'd be rather simple. But still no idea how to decompose it like that.
Any tips?

\begin{align}
\frac{e^{2x}+2}{e^x +1}&=\frac{(e^{x})^2+2e^x+1-2e^x+1}{e^x +1}\\
&=\frac{(e^x+1)^2-2e^x+1}{e^x +1}\\
&=e^x+1+\frac {-2e^x-2+3}{e^x +1}\\
&=e^x+1-2+\frac {3}{e^x +1}\\
&=e^x + \frac{3}{e^x+1} - 1
\end{align}
