<s>[INST] Evaluating $\int \frac{x^2}{1+x^5}dx$ I tried factoring the denominator and performing partial fraction decomposition, but the algebra becomes too cumbersome for me...
Is there a cleaner approach for this integral?
 [/INST] There is a clean way to integrate. Note that $x^5+1$ factorizes as 
$$x^5+1= (1+x)(x^2-2\phi_+x+1)(x^2-2\phi_-x+1)$$
with $\phi_{\pm} = \frac{1\pm\sqrt5}{4}$. So, decompose the integrand,
$$\frac{5x^2}{1+x^5}=\frac1{x+1}-\phi_- \frac{2x+2}{x^2-2\phi_+x+1}
-\phi_+ \frac{2x+2}{x^2-2\phi_-x+1}$$
The integral for the first term is just $\ln(x+1)$. The second and third terms have the same form, whose integral can be obtained as,
$$I(x,\phi)= \int \frac{2x+2}{x^2-2\phi x+1}dx =\int \frac{d[(x-\phi)^2] + 2(1+\phi)dx}{(x-\phi)^2 +(1-\phi^2)} $$
$$=\ln\left[(x-\phi)^2 +(1-\phi^2)\right]
+\frac{2(1+\phi)}{\sqrt{1-\phi^2}}
\tan^{-1}\frac{x-\phi}{\sqrt{1-\phi^2}}$$
$$=\ln\left(x^2-2\phi x+1\right)
+2\sqrt{\frac{1+\phi}{1-\phi}}
\tan^{-1}\frac{x-\phi}{\sqrt{1-\phi^2}}
$$
Thus, the original integral is,
$$\int \frac{x^2}{1+x^5}dx=\frac15\left[\ln(x+1)-\phi_-I(x,\phi_+)-\phi_+I(x,\phi_-)\right] + C$$
</s>