24.8 Problem number 411

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

Optimal antiderivative \[ -\frac {\left (A -B +C \right ) \left (\cos ^{3}\left (d x +c \right )\right ) \sin \! \left (d x +c \right )}{2 d \left (a +a \cos \! \left (d x +c \right )\right )^{\frac {3}{2}}}-\frac {\left (7 A -11 B +15 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}}{4 a^{\frac {3}{2}} d}+\frac {\left (45 A -65 B +93 C \right ) \sin \! \left (d x +c \right )}{15 a d \sqrt {a +a \cos \! \left (d x +c \right )}}+\frac {\left (5 A -5 B +9 C \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \! \left (d x +c \right )}{10 a d \sqrt {a +a \cos \! \left (d x +c \right )}}-\frac {\left (15 A -35 B +39 C \right ) \sin \! \left (d x +c \right ) \sqrt {a +a \cos \! \left (d x +c \right )}}{30 a^{2} d} \]

command

integrate(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(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 {15 \, \sqrt {2} {\left (7 \, A - 11 \, B + 15 \, C\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 |}\right )}{a^{\frac {3}{2}}} + \frac {{\left ({\left ({\left (\frac {15 \, \sqrt {2} {\left (A a^{3} - B a^{3} + C a^{3}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{2}} + \frac {\sqrt {2} {\left (165 \, A a^{3} - 245 \, B a^{3} + 381 \, C a^{3}\right )}}{a^{2}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {5 \, \sqrt {2} {\left (57 \, A a^{3} - 73 \, B a^{3} + 105 \, C a^{3}\right )}}{a^{2}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {15 \, \sqrt {2} {\left (9 \, A a^{3} - 9 \, B a^{3} + 17 \, C a^{3}\right )}}{a^{2}}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a\right )}^{\frac {5}{2}}}}{60 \, d} \]