Finding the integral $\int \frac{2x^{12} + 5x^9}{(x^5 + x^3 + 1)^3}dx$ with substitution - how to think? 
Find
$$\int \frac{2x^{12} + 5x^9}{(x^5 + x^3 + 1)^3}dx$$

In the above question, I was literally stumped, and wasn't able to solve it for a long time. Turns out that you had to divide the numerator and the denominator by x15, and then we could substitute. Now this got my thinking, how can we understand where to divide what? I mean obviously, in this question - one big hint would be the numerical coefficients of the numerator, but other than that is there any logical way to proceed or is it basically a hit and try?
Link to the solution

Generally these type of questions we simply put $\displaystyle x = \frac{1}{t}$ and then use normal substution method
Now let $$I = \int \frac{2x^{12}+5x^9}{(x^5+x^3+1)^3}dx$$
Put $\displaystyle x= \frac{1}{t}\;,$ Then $\displaystyle dx = -\frac{1}{t^2}dt$
So $$I = -\int\frac{2+5t^3}{\left(t^5+t^2+1\right)^3}\cdot \frac{t^{15}}{t^{12}}\cdot \frac{1}{t^2}dt = -\int\frac{2t+5t^4}{\left(1+t^2+t^{5}\right)^3}dt$$
Now using normal substution method, Put $(1+t^2+t^5)=u\;,$ Then $(2t+5t^4)dt=du$
So we get $$I = -\int\frac{1}{u^3}du = \frac{1}{2u^2}+\mathcal{C} = \frac{1}{2(1+t^2+t^5)^2}+\mathcal{C}$$
So $$I = \int \frac{2x^{12}+5x^9}{(x^5+x^3+1)^3}dx = \frac{x^{10}}{2(x^5+x^3+1)^2}+\mathcal{C}$$

$\bf{Bonus\; Question}::$ Evaluation of $$\int\frac{5x^4+4x^5}{(x^5+x+1)^2}dx$$

