<s>[INST] Integration by substitution simplifying I wanna integrate $\int_{0}^{1} \frac{dx}{e^x-e^{-2x}+2}$but after substituting $e^x=t$ and simplifying I get trouble trying to use partial fraction expansion on the expression
$\frac{t}{(t+1)(t^2+t-1)}$. I know that $t^2+t-1=(t+\frac{1+\sqrt{5}}{2})(t+\frac{1-\sqrt{5}}{2})$ but this is troublesome to work with (not allowed to use calculators etc). Any suggestions to facilitate the calculations? 
 [/INST] You don’t need to factor the quadratic. Use the usual partial fractions technique:
$$\begin{align*}
\frac{t}{6^3+2t^2-1}&=\frac{A}{t+1}+\frac{Bt+C}{t^2+t-1}\\\\
&=\frac{(A+B)t^2+(A+B+C)t+(C-A)}{(t+1)(t^2+t-1)}\;,
\end{align*}$$
so $A+B=0=C-A$, and $A+B+C=1$. This is an easy system to solve: $C=A$, $B=-A$, and hence $A=1$, so we have
$$\int_1^e\left(\frac1{t+1}-\frac{t-1}{t^2+t-1}\right)dt\;,$$
assuming no silly errors on my part. The first term is easy; for the second, note that
$$\frac{t-1}{t^2+t-1}=\frac{(t+1)-2}{t^2+t-1}=\frac{t+1}{t^2+t-1}-\frac2{\left(t+\frac12\right)^2-\frac54}\;.$$
</s>