\[ \int \frac {\left (a+b x^2\right )^2 \left (c+d x^2\right )^{5/2}}{x^5} \, dx \]
Optimal antiderivative \[ \frac {\left (8 b^{2} c^{2}+5 a d \left (3 a d +8 b c \right )\right ) \left (d \,x^{2}+c \right )^{\frac {3}{2}}}{24 c}+\frac {\left (8 b^{2} c^{2}+5 a d \left (3 a d +8 b c \right )\right ) \left (d \,x^{2}+c \right )^{\frac {5}{2}}}{40 c^{2}}-\frac {a^{2} \left (d \,x^{2}+c \right )^{\frac {7}{2}}}{4 c \,x^{4}}-\frac {a \left (3 a d +8 b c \right ) \left (d \,x^{2}+c \right )^{\frac {7}{2}}}{8 c^{2} x^{2}}-\frac {\left (8 b^{2} c^{2}+5 a d \left (3 a d +8 b c \right )\right ) \arctanh \left (\frac {\sqrt {d \,x^{2}+c}}{\sqrt {c}}\right ) \sqrt {c}}{8}+\frac {\left (8 b^{2} c^{2}+5 a d \left (3 a d +8 b c \right )\right ) \sqrt {d \,x^{2}+c}}{8} \]
command
integrate((b*x**2+a)**2*(d*x**2+c)**(5/2)/x**5,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ - \frac {15 a^{2} \sqrt {c} d^{2} \operatorname {asinh}{\left (\frac {\sqrt {c}}{\sqrt {d} x} \right )}}{8} - \frac {a^{2} c^{3}}{4 \sqrt {d} x^{5} \sqrt {\frac {c}{d x^{2}} + 1}} - \frac {3 a^{2} c^{2} \sqrt {d}}{8 x^{3} \sqrt {\frac {c}{d x^{2}} + 1}} - \frac {a^{2} c d^{\frac {3}{2}} \sqrt {\frac {c}{d x^{2}} + 1}}{x} + \frac {7 a^{2} c d^{\frac {3}{2}}}{8 x \sqrt {\frac {c}{d x^{2}} + 1}} + \frac {a^{2} d^{\frac {5}{2}} x}{\sqrt {\frac {c}{d x^{2}} + 1}} - 5 a b c^{\frac {3}{2}} d \operatorname {asinh}{\left (\frac {\sqrt {c}}{\sqrt {d} x} \right )} - \frac {a b c^{2} \sqrt {d} \sqrt {\frac {c}{d x^{2}} + 1}}{x} + \frac {4 a b c^{2} \sqrt {d}}{x \sqrt {\frac {c}{d x^{2}} + 1}} + \frac {4 a b c d^{\frac {3}{2}} x}{\sqrt {\frac {c}{d x^{2}} + 1}} + 2 a b d^{2} \left (\begin {cases} \frac {\sqrt {c} x^{2}}{2} & \text {for}\: d = 0 \\\frac {\left (c + d x^{2}\right )^{\frac {3}{2}}}{3 d} & \text {otherwise} \end {cases}\right ) - b^{2} c^{\frac {5}{2}} \operatorname {asinh}{\left (\frac {\sqrt {c}}{\sqrt {d} x} \right )} + \frac {b^{2} c^{3}}{\sqrt {d} x \sqrt {\frac {c}{d x^{2}} + 1}} + \frac {b^{2} c^{2} \sqrt {d} x}{\sqrt {\frac {c}{d x^{2}} + 1}} + 2 b^{2} c d \left (\begin {cases} \frac {\sqrt {c} x^{2}}{2} & \text {for}\: d = 0 \\\frac {\left (c + d x^{2}\right )^{\frac {3}{2}}}{3 d} & \text {otherwise} \end {cases}\right ) + b^{2} d^{2} \left (\begin {cases} - \frac {2 c^{2} \sqrt {c + d x^{2}}}{15 d^{2}} + \frac {c x^{2} \sqrt {c + d x^{2}}}{15 d} + \frac {x^{4} \sqrt {c + d x^{2}}}{5} & \text {for}\: d \neq 0 \\\frac {\sqrt {c} x^{4}}{4} & \text {otherwise} \end {cases}\right ) \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________