\[ \int \frac {d+e x+f x^2}{\left (4-5 x^2+x^4\right )^2} \, dx \]
Optimal antiderivative \[ \frac {e \left (-2 x^{2}+5\right )}{18 x^{4}-90 x^{2}+72}+\frac {x \left (17 d +20 f -\left (5 d +8 f \right ) x^{2}\right )}{72 x^{4}-360 x^{2}+288}+\frac {\left (19 d +52 f \right ) \arctanh \! \left (\frac {x}{2}\right )}{432}-\frac {\left (d +7 f \right ) \arctanh \! \left (x \right )}{54}+\frac {e \ln \! \left (-x^{2}+1\right )}{27}-\frac {e \ln \! \left (-x^{2}+4\right )}{27} \]
command
integrate((f*x**2+e*x+d)/(x**4-5*x**2+4)**2,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Timed out} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {output too large to display} \]