<s>[INST] Evaluate $\int \frac{x+1}{(x^2-x+8)^3}\, dx$ Could you give me a hint on how to find $$\int \frac{x+1}{(x^2-x+8)^3}\,  dx$$
It doesn't seem like partial fractions are the way to go with here and using the integration by parts method seems to be tedious.
I have also tried substituting $(x^2-x+8)$ but it gets even more complicated then. 
Is there a way to solve this using only basic formulas?
 [/INST] $$\int \frac{x+1}{\left(x^2-x+8\right)^3}\, dx=\frac{1}{2}\left(\int \frac{d\left(x^2-x+8\right)}{\left(x^2-x+8\right)^3}+\int\frac{3}{\left(x^2-x+8\right)^3}\, dx\right)$$
$$=\frac{1}{2}\left(\frac{1}{-2\left(x^2-x+8\right)^2}+96\int \frac{d(2x-1)}{\left((2x-1)^2+31\right)^3}\right)$$
Let $2x-1=\sqrt{31}\tan t$. Then $d(2x-1)=\frac{\sqrt{31}}{\cos^2 t}\, dt$.
$$\int \frac{d(2x-1)}{\left((2x-1)^2+31\right)^3}=\frac{1}{961\sqrt{31}}\int \cos^4 t\, dt$$
$$=\frac{1}{961\sqrt{31}}\int \left(\frac{1+\cos (2t)}{2}\right)^2 \, dt$$
$$=\frac{1}{3844\sqrt{31}}\left(\int dt+\int \cos(2t)\, d(2t)+\int \frac{1+\cos(4t)}{2}\, dt\right)$$
$$=\frac{1}{3844\sqrt{31}}\left(t+\sin(2t)+\frac{t}{2}+\frac{\sin(4t)}{8}\right)+C$$
</s>