<s>[INST] Evaluating indefinite integrals of the form $\int \frac{x^2 \,dx}{a x^5 + b}$ 
Evaluate the indefinite integral
$$\int \frac{x^2 \,dx}{a x^5 + b},$$
for real parameters $a, b \neq 0$.

No apparent substitutions simplify the expression (if the exponent of $x$ in the denominator were an integral multiple of $3$, the form of the integrand would suggest the substitution $u = x^3$, $du = 3 x^2 \,dx$, but the exponent is not). Applying integration by parts with $u = \frac{1}{a x^5 + b}$, $dv = x^2 dx$ is straightforward, but it produces an integrand with a much larger degree in the denominator and so appears only to make the situation worse. Applying integration by parts instead with $dw = \frac{x^k dx}{a x^5 + b}$ results in integrating $\frac{x^k dx}{a x^5 + b}$, which, except when $k \equiv 4 \pmod 5$ (which doesn't appear immediately fruitful), doesn't appear much easier than the given integral.
 [/INST] An explicit antiderivative is messy, but here's an outline for evaluating this integral by hand.
First, make a linear substitution $x = \alpha u$ for an appropriate constant $\alpha$, which transforms the integral $$\int \frac{x^2 \,dx}{a x^5 + b}$$ into some constant multiple of
$$\int \frac{u^2 \,du}{1 - u^5} .$$
This is a rational expression, so in principle we can apply partial fractions and solve, but $1 - u^5$ factors over $\Bbb Q$ into $u - 1$ and a quartic polynomial irreducible over $\Bbb Q$. Thus, to factor the denominator into a product of linear and quadratic polynomials we need to resort to irrational coefficients.
Factoring a generic real quartic over $\Bbb R$ is unpleasant, but we can take advantage of the special form of the denominator: The roots of $1 - u^5$ are precisely the $5$th roots of unity, namely $1$ and the paired complex conjugates $e^{\pm 2 \pi i / 5}$ and $e^{\pm 4 \pi i / 5}$. Thus, one real quadratic factor of $1 - u^5$ is
$$(u - e^{2 \pi i / 5}) (u - e^{-2 \pi i / 5}) = u^2 - 2 \cos \left(\frac{2 \pi}{5}\right) u + 1$$
and the other is
$$(u - e^{4 \pi i / 5}) (u - e^{-4 \pi i / 5}) = u^2 + 2 \cos \left(\frac{\pi}{5}\right) u + 1 .$$
Optionally, we can rewrite these expressions using the facts that $2 \cos \frac{\pi}{5} = \phi$, where $\phi := \frac{1}{2}(1 + \sqrt{5})$ is the Golden Ratio, and $2 \cos \frac{2 \pi}{5} = \frac{1}{\phi}$.
Applying the Method of Partial Fractions thus gives a decomposition
$$\frac{u^2}{1 - u^5} = \frac{A}{u - 1} + \frac{B u + C}{u^2 + \phi u + 1} + \frac{D u + E}{u^2 - \frac{1}{\phi} u + 1}$$
for some constants $A, B, C, D, E$, so
$$\int \frac{u^2\, du}{1 - u^5} = A \int \frac{du}{u - 1} + \int \frac{(B u + C) du}{u^2 + \phi u + 1} + \int \frac{(D u + E) du}{u^2 - \frac{1}{\phi} u + 1} .$$


*

*The integral $$\int \frac{du}{u - 1}$$ is elementary.

*We can rewrite the integral of the second term as a linear combination of
$$\int \frac{(2 u + \phi) du}{u^2 + \phi u + 1} \qquad \textrm{and} \qquad \int \frac{du}{u^2 + \phi u + 1} .$$
The left integral can be handled with the substitution $v = u^2 + \phi u + 1, dv = (2 u + \phi) du$, which gives $$\int \frac{(2 u + \phi) du}{u^2 + \phi u + 1} = \int \frac{dv}{v} = \log |v| + K = \log (u^2 + \phi u + 1) + K .$$ A linear substitution $w = \beta u + \gamma, dw = \beta \,du$ transforms the integral on the right into a multiple of $$\int \frac{dw}{w^2 + 1} = \arctan w + K' = \arctan (\beta u + \gamma) + K' .$$

*The third integral can be handled much like the second integral.


With all of the integrals in $u$ now expressed in terms of elementary functions, all that remains is to undo the original substitution, that is, back-substitute $u = \frac{x}{\alpha}$ to produce an antiderivative in $x$.
</s>