\[ \int \frac {a+b x^2+c x^4}{x^2 \sqrt {d-e x} \sqrt {d+e x}} \, dx \]
Optimal antiderivative \[ -\frac {\left (2 b \,e^{2}+c \,d^{2}\right ) \arctan \! \left (\frac {\sqrt {-e x +d}}{\sqrt {e x +d}}\right )}{e^{3}}+\frac {c x \left (e x -d \right ) \sqrt {e x +d}}{2 e^{2} \sqrt {-e x +d}}-\frac {a \sqrt {-e x +d}\, \sqrt {e x +d}}{d^{2} x} \]
command
integrate((c*x**4+b*x**2+a)/x**2/(-e*x+d)**(1/2)/(e*x+d)**(1/2),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \text {Timed out} \]
Sympy 1.8 under Python 3.8.8 output
\[ \frac {i a e {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d^{2}} + \frac {a e {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d^{2}} - \frac {i b {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e} + \frac {b {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e} - \frac {i c d^{2} {G_{6, 6}^{6, 2}\left (\begin {matrix} - \frac {3}{4}, - \frac {1}{4} & - \frac {1}{2}, - \frac {1}{2}, 0, 1 \\-1, - \frac {3}{4}, - \frac {1}{2}, - \frac {1}{4}, 0, 0 & \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e^{3}} + \frac {c d^{2} {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {3}{2}, - \frac {5}{4}, -1, - \frac {3}{4}, - \frac {1}{2}, 1 & \\- \frac {5}{4}, - \frac {3}{4} & - \frac {3}{2}, -1, -1, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e^{3}} \]