23.5 Problem number 113

\[ \int \frac {(A+B \cos (c+d x)) \sec ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx \]

Optimal antiderivative \[ -\frac {\left (3 A -2 B \right ) \arctanh \! \left (\frac {\sin \left (d x +c \right ) \sqrt {a}}{\sqrt {a +a \cos \left (d x +c \right )}}\right )}{a^{\frac {3}{2}} d}+\frac {\left (9 A -5 B \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}}{4 a^{\frac {3}{2}} d}-\frac {\left (A -B \right ) \tan \! \left (d x +c \right )}{2 d \left (a +a \cos \! \left (d x +c \right )\right )^{\frac {3}{2}}}+\frac {\left (3 A -B \right ) \tan \! \left (d x +c \right )}{2 a d \sqrt {a +a \cos \! \left (d x +c \right )}} \]

command

integrate((A+B*cos(d*x+c))*sec(d*x+c)^2/(a+a*cos(d*x+c))^(3/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 {\frac {\sqrt {2} {\left (9 \, A \sqrt {a} - 5 \, B \sqrt {a}\right )} \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 )}{a^{2}} + \frac {4 \, {\left (3 \, A \sqrt {a} - 2 \, B \sqrt {a}\right )} \log \left ({\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} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right )}{a^{2}} - \frac {4 \, {\left (3 \, A \sqrt {a} - 2 \, B \sqrt {a}\right )} \log \left ({\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} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right )}{a^{2}} - \frac {16 \, \sqrt {2} {\left (3 \, {\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 \sqrt {a} - A a^{\frac {3}{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 )} a} - \frac {2 \, \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} {\left (\sqrt {2} A a - \sqrt {2} B a\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}}}{8 \, d} \]