\[ \int (b x)^{5/2} (c+d x)^n (e+f x)^2 \, dx \]
Optimal antiderivative \[ -\frac {2 f \left (9 c f -d e \left (13+2 n \right )\right ) \left (b x \right )^{\frac {7}{2}} \left (d x +c \right )^{1+n}}{b \,d^{2} \left (9+2 n \right ) \left (11+2 n \right )}+\frac {2 f \left (b x \right )^{\frac {7}{2}} \left (d x +c \right )^{1+n} \left (f x +e \right )}{b d \left (11+2 n \right )}+\frac {2 \left (63 c^{2} f^{2}-14 c d e f \left (11+2 n \right )+d^{2} e^{2} \left (4 n^{2}+40 n +99\right )\right ) \left (b x \right )^{\frac {7}{2}} \left (d x +c \right )^{n} \hypergeom \left (\left [\frac {7}{2}, -n \right ], \left [\frac {9}{2}\right ], -\frac {d x}{c}\right ) \left (1+\frac {d x}{c}\right )^{-n}}{7 b \,d^{2} \left (9+2 n \right ) \left (11+2 n \right )} \]
command
integrate((b*x)**(5/2)*(d*x+c)**n*(f*x+e)**2,x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \frac {2 b^{\frac {5}{2}} c^{n} e^{2} x^{\frac {7}{2}} {{}_{2}F_{1}\left (\begin {matrix} \frac {7}{2}, - n \\ \frac {9}{2} \end {matrix}\middle | {\frac {d x e^{i \pi }}{c}} \right )}}{7} + \frac {4 b^{\frac {5}{2}} c^{n} e f x^{\frac {9}{2}} {{}_{2}F_{1}\left (\begin {matrix} \frac {9}{2}, - n \\ \frac {11}{2} \end {matrix}\middle | {\frac {d x e^{i \pi }}{c}} \right )}}{9} + \frac {2 b^{\frac {5}{2}} c^{n} f^{2} x^{\frac {11}{2}} {{}_{2}F_{1}\left (\begin {matrix} \frac {11}{2}, - n \\ \frac {13}{2} \end {matrix}\middle | {\frac {d x e^{i \pi }}{c}} \right )}}{11} \]
Sympy 1.8 under Python 3.8.8 output
\[ \text {Timed out} \]________________________________________________________________________________________