22.3 Problem number 130

\[ \int \frac {\sec ^4(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx \]

Optimal antiderivative \[ -\frac {9 \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 {\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 {7 \tan \! \left (d x +c \right )}{8 d \sqrt {a +a \cos \! \left (d x +c \right )}}-\frac {\sec \! \left (d x +c \right ) \tan \! \left (d x +c \right )}{12 d \sqrt {a +a \cos \! \left (d x +c \right )}}+\frac {\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(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

\[ -\frac {\sqrt {2} {\left (\frac {27 \, \sqrt {2} \sqrt {a} \log \left (\frac {{\left | 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right )}{{\left | a \right |}} + \frac {48 \, \log \left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right )}{\sqrt {a}} - \frac {8 \, {\left (165 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{10} \sqrt {a} - 1323 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{8} a^{\frac {3}{2}} + 3906 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{6} a^{\frac {5}{2}} - 2118 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} a^{\frac {7}{2}} + 393 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a^{\frac {9}{2}} - 31 \, a^{\frac {11}{2}}\right )}}{{\left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}\right )}^{3}}\right )}}{96 \, d} \]