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.
 A: 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$.
A: Old post, but the original author bumped it so...  
We want to scale the problem so we can concentrate on
$$\int\frac{x^2dx}{x^5+1}=\sum_{n=0}^4\int\frac{A_ndx}{x-x_n}=\sum_{n=0}^4A_n\ln(x-x_n)+C_1$$
Here $x_n^5=-1=e^{i(2n+1)\pi}$ so $x_n=e^{\frac{i(2n+1)\pi}5}$,
$$A_n=\lim_{x\rightarrow x_n}\frac{(x-x_n)x^2}{x^5+1}=\frac{x_n^2}{5x_n^4}=-\frac15x_n^3$$
$x_0^3=x_1=\cos\frac{3\pi}5+i\sin\frac{3\pi}5$; $x_1^3=x_4=x_0^*$; $x_2^3=x_2=-1$; $x_3^3=x_0=\cos\frac{\pi}5+i\sin\frac{\pi}5$; $x_4^3=x_3=x_1^*$, $x-x_n=r_ne^{i\theta_n}$ where
$$r_n=|x-x_n|=\sqrt{|x-x_n|^2}=\sqrt{x^2-2x\cos\frac{(2n+1)\pi}5+1}$$
$$\theta_n=\operatorname{atan2}\left(-\sin\frac{(2n+1)\pi}5,x-\cos\frac{(2n+1)\pi}5\right)=\tan^{-1}\left(\frac{x-\cos\frac{(2n+1)\pi}5}{\sin\frac{(2n+1)\pi}5}\right)-\frac{\pi}2$$
So
$$\begin{align}\int\frac{x^2dx}{x^5+1}&=-\frac15\left\{\cos\frac{3\pi}5\ln\left(x^2-2x\cos\frac{\pi}5+1\right)-2\sin\frac{3\pi}5\tan^{-1}\left(\frac{x-\cos\frac{\pi}5}{\sin\frac{\pi}5}\right)\right.\\
&\quad\left.+\cos\frac{\pi}5\ln\left(x^2-2x\cos\frac{3\pi}5+1\right)+2\sin\frac{\pi}5\tan^{-1}\left(\frac{x-\cos\frac{3\pi}5}{\sin\frac{3\pi}5}\right)\right.\\
&\quad\left.-\ln|x+1|\right\}+C\\
&=-\frac15\left\{\frac{1-\sqrt5}4\ln\left(x^2-\frac{1+\sqrt5}2x+1\right)-\frac{\sqrt{10+2\sqrt5}}2\tan^{-1}\left(\frac{4x-\sqrt5-1}{\sqrt{10-2\sqrt5}}\right)\right.\\
&\quad\left.+\frac{1+\sqrt5}4\ln\left(x^2+\frac{\sqrt5-1}2x+1\right)+\frac{\sqrt{10-2\sqrt5}}2\tan^{-1}\left(\frac{4x+\sqrt5-1}{\sqrt{10+2\sqrt5}}\right)\right.\\
&\quad\left.-\ln|x+1|\right\}+C\\
&=-\frac15\left\{-\frac1{2\phi}\ln\left(x^2-\phi x+1\right)-5^{1/4}\phi^{1/2}\tan^{-1}\left(\frac{2x-\phi}{5^{1/4}\phi^{-1/2}}\right)\right.\\
&\quad\left.+\frac{\phi}2\ln\left(x^2+\frac1{\phi}x+1\right)+5^{1/4}\phi^{-1/2}\tan^{-1}\left(\frac{2x+\frac1{\phi}}{5^{1/4}\phi^{1/2}}\right)-\ln|x+1|\right\}+C\end{align}$$
So if we organize our arithmetic reasonably, the operation isn't all that bad.
