<s>[INST] How to integrate fractions of polynomials with complex roots $$\int\frac{4x^3-2x^2+60x+10}{x^4+30x^2+125} dx $$
The denominator has no rational roots. It can be factored as $(x^2+5)(x^2+25)$ which gives roots of $\pm i \sqrt{5}$ and $\pm 5i$.  
How can these complex roots be used to integrate the function?
 [/INST] First split up the integral into two parts and then use the natural logarithm and arctan.
$$\begin{align*} P = &\frac{4x^3-2x^2+60x+10}{x^4+30x^2+125} \\
  = &\frac{4x^3-2x^2+60x+10}{(x^2+25)(x^2+5)} \\
  = &\frac{2x-3}{x^2+25} + \frac{2x+1}{x^2+5}\end{align*}$$
So $\int P \,\mathrm{d}x = \int \frac{2x-3}{x^2+25}\mathrm{d}x + \int\frac{2x+1}{x^2+5}\mathrm{d}x $ :
$$ \int \frac{2x-3}{x^2+25}\mathrm{d}x = \int \left(\frac{2x}{x^2+25}-\frac{3}{x^2+25}\right)\mathrm{d}x = \ln(x^2+25)-\frac{3}{5}\arctan{\left(\frac{x}{5}\right)} + c$$
$$ \int\frac{2x+1}{x^2+5}\mathrm{d}x = \int \left(\frac{2x}{x^2+5} + \frac{1}{x^2+5}\right)\mathrm{d}x = \ln(x^2+5) + \frac{1}{\sqrt{5}}\arctan{\left(\frac{x}{\sqrt{5}}\right)} + c$$
Now add these to get (which could simplify further, but I'll leave as is):
$$ \int P \,\mathrm{d}x = \ln(x^2+25) + \ln(x^2+5) + \frac{1}{\sqrt{5}}\arctan{\left(\frac{x}{\sqrt{5}}\right)} - \frac{3}{5}\arctan{\left(\frac{x}{5}\right)} + c$$
</s>