\[ \int \frac {(b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sec ^{\frac {3}{2}}(c+d x)} \, dx \]
Optimal antiderivative \[ -\frac {2 C \left (b \sec \! \left (d x +c \right )\right )^{n} \sin \! \left (d x +c \right )}{d \left (1-2 n \right ) \sqrt {\sec \! \left (d x +c \right )}}-\frac {4 \left (A +C \left (3-2 n \right )-2 A n \right ) \hypergeom \! \left (\left [\frac {1}{2}, \frac {5}{4}-\frac {n}{2}\right ], \left [\frac {9}{4}-\frac {n}{2}\right ], \cos ^{2}\left (d x +c \right )\right ) \left (b \sec \! \left (d x +c \right )\right )^{n} \sin \! \left (d x +c \right )}{d \left (4 n^{2}-12 n +5\right ) \sec \! \left (d x +c \right )^{\frac {5}{2}} \sqrt {2-2 \cos \! \left (2 d x +2 c \right )}}-\frac {4 B \hypergeom \! \left (\left [\frac {1}{2}, \frac {3}{4}-\frac {n}{2}\right ], \left [\frac {7}{4}-\frac {n}{2}\right ], \cos ^{2}\left (d x +c \right )\right ) \left (b \sec \! \left (d x +c \right )\right )^{n} \sin \! \left (d x +c \right )}{d \left (3-2 n \right ) \sec \! \left (d x +c \right )^{\frac {3}{2}} \sqrt {2-2 \cos \! \left (2 d x +2 c \right )}} \]
command
Integrate[((b*Sec[c + d*x])^n*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/Sec[c + d*x]^(3/2),x]
Mathematica 13.1 output
\[ \text {\$Aborted} \]
Mathematica 12.3 output
\[ -\frac {i 2^{n+\frac {1}{2}} e^{-\frac {1}{2} i (4 c+d (2 n+1) x)} \left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^{n+\frac {1}{2}} \left (1+e^{2 i (c+d x)}\right )^{n+\frac {1}{2}} \sec ^{-n-2}(c+d x) (b \sec (c+d x))^n \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (e^{2 i c} \left (\frac {e^{\frac {1}{2} i (2 c+d (2 n+3) x)} \left (A (2 n+3) e^{i (c+d x)} \, _2F_1\left (n+\frac {1}{2},\frac {1}{4} (2 n+5);\frac {1}{4} (2 n+9);-e^{2 i (c+d x)}\right )+2 B (2 n+5) \, _2F_1\left (n+\frac {1}{2},\frac {1}{4} (2 n+3);\frac {1}{4} (2 n+7);-e^{2 i (c+d x)}\right )\right )}{d (2 n+3) (2 n+5)}+\frac {2 (A+2 C) e^{\frac {1}{2} i d (2 n+1) x} \, _2F_1\left (n+\frac {1}{2},\frac {1}{4} (2 n+1);\frac {1}{4} (2 n+5);-e^{2 i (c+d x)}\right )}{2 d n+d}\right )+\frac {A e^{\frac {1}{2} i d (2 n-3) x} \, _2F_1\left (n+\frac {1}{2},\frac {1}{4} (2 n-3);\frac {1}{4} (2 n+1);-e^{2 i (c+d x)}\right )}{d (2 n-3)}+\frac {2 B e^{\frac {1}{2} i (2 c+d (2 n-1) x)} \, _2F_1\left (n+\frac {1}{2},\frac {1}{4} (2 n-1);\frac {1}{4} (2 n+3);-e^{2 i (c+d x)}\right )}{d (2 n-1)}\right )}{A \cos (2 c+2 d x)+A+2 B \cos (c+d x)+2 C} \]