24.6 Problem number 281

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

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

command

integrate((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 {{\left (\frac {\sqrt {2} {\left (B a^{2} - C a^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{a^{3}} + \frac {\sqrt {2} {\left (B a^{2} - 9 \, C a^{2}\right )}}{a^{3}}\right )} \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}} + \frac {\sqrt {2} {\left (3 \, B - 7 \, 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}}}}{4 \, d} \]