<s>[INST] Integration exercise: $ \int \frac{e^{5x}}{ (e^{2x} - e^x - 20) }dx$ I have trouble integrating:
$$ \int \frac{e^{5x}}{e^{2x} - e^x - 20} dx$$
With $t=e^x$, I've rewritten it as:
$$\int \frac{t^5}{t^2 - t - 20} \frac{1}{t} dt$$ 
Then I tried integration by parts, but I am not any closer to the solution. 
 [/INST] $$\int \frac{t^5}{t^2 - t - 20} \frac{1}{t} dt$$
$$\int \frac{t^4}{t^2 - t - 20} dt$$
try to make proper fraction
$$\int (t^2+t+21)+\frac{41t+420}{t^2 - t - 20} dt$$
$$\int (t^2+t+21)\;dt+\int \frac{41t+420}{t^2 - t - 20} dt$$
first integration is basic and for second use partial fraction
$$\dfrac{t^3}{3}+\dfrac{t^2}{2}+21t+\int \dfrac {625}{9(t-5)}-\dfrac{256}{9(t+4)}\;\;dt$$
$$\dfrac{t^3}{3}+\dfrac{t^2}{2}+21t+\dfrac {625}{9}\log (t-5)-\dfrac{256}{9}\log (t+4)$$
put $t=e^x$
$$\mathbf {Answer}=\dfrac{e^{3x}}{3}+\dfrac{e^{2x}}{2}+21e^x+\dfrac {625}{9}\log (e^x-5)-\dfrac{256}{9}\log (e^x+4)+C\;$$
solution of partial fraction used above
$$\dfrac{41t+420}{t^2 - t - 20}=\dfrac {A}{t-5}+\dfrac{B}{t+4}$$
$${41t+420}={A}(t+4)+B({t-5})$$
put $t=5$ and then $t=-4$
$${41\times 5+420}={A}(5+4)+B({5-5})$$
$$A=\dfrac {625}{9}$$
$${41\times (-4)+420}={A}(-4+4)+B({-4-5})$$
$$B=\dfrac {-256}{9}$$
$$\dfrac{41t+420}{t^2 - t - 20}=\dfrac {625}{9(t-5)}-\dfrac{256}{9(t+4)}$$
</s>