\[ \int \frac {\left (A+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx \]
Optimal antiderivative \[ -\frac {\left (9 A +8 C \right ) \arctanh \! \left (\frac {\sin \left (d x +c \right ) \sqrt {a}}{\sqrt {a +a \cos \left (d x +c \right )}}\right )}{8 d \sqrt {a}}+\frac {\left (A +C \right ) \arctanh \! \left (\frac {\sin \left (d x +c \right ) \sqrt {a}\, \sqrt {2}}{2 \sqrt {a +a \cos \left (d x +c \right )}}\right ) \sqrt {2}}{d \sqrt {a}}+\frac {\left (7 A +8 C \right ) \tan \! \left (d x +c \right )}{8 d \sqrt {a +a \cos \! \left (d x +c \right )}}-\frac {A \sec \! \left (d x +c \right ) \tan \! \left (d x +c \right )}{12 d \sqrt {a +a \cos \! \left (d x +c \right )}}+\frac {A \left (\sec ^{2}\left (d x +c \right )\right ) \tan \! \left (d x +c \right )}{3 d \sqrt {a +a \cos \! \left (d x +c \right )}} \]
command
integrate((A+C*cos(d*x+c)^2)*sec(d*x+c)^4/(a+a*cos(d*x+c))^(1/2),x, algorithm="giac")
Giac 1.9.0-11 via sagemath 9.6 output
\[ \text {Exception raised: TypeError} \]
Giac 1.7.0 via sagemath 9.3 output
\[ \text {output too large to display} \]