Optimal. Leaf size=130 \[ -\frac {2 \sin ^2(c+d x) \cos (c+d x)}{5 d \sqrt {a \sin (c+d x)+a}}+\frac {2 \cos (c+d x) \sqrt {a \sin (c+d x)+a}}{15 a d}+\frac {32 \cos (c+d x)}{15 d \sqrt {a \sin (c+d x)+a}}-\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a \sin (c+d x)+a}}\right )}{\sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.56, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 10, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.345, Rules used = {2881, 2778, 2968, 3023, 2751, 2649, 206, 3046, 2985, 2773} \[ -\frac {2 \sin ^2(c+d x) \cos (c+d x)}{5 d \sqrt {a \sin (c+d x)+a}}+\frac {2 \cos (c+d x) \sqrt {a \sin (c+d x)+a}}{15 a d}+\frac {32 \cos (c+d x)}{15 d \sqrt {a \sin (c+d x)+a}}-\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a \sin (c+d x)+a}}\right )}{\sqrt {a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2751
Rule 2773
Rule 2778
Rule 2881
Rule 2968
Rule 2985
Rule 3023
Rule 3046
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) \cot (c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx &=\int \frac {\sin ^3(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx+\int \frac {\csc (c+d x) \left (1-2 \sin ^2(c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx\\ &=\frac {4 \cos (c+d x)}{d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sin ^2(c+d x)}{5 d \sqrt {a+a \sin (c+d x)}}-\frac {\int \frac {\sin (c+d x) (-4 a+a \sin (c+d x))}{\sqrt {a+a \sin (c+d x)}} \, dx}{5 a}+\frac {2 \int \frac {\csc (c+d x) \left (\frac {a}{2}+a \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{a}\\ &=\frac {4 \cos (c+d x)}{d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sin ^2(c+d x)}{5 d \sqrt {a+a \sin (c+d x)}}-\frac {\int \frac {-4 a \sin (c+d x)+a \sin ^2(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx}{5 a}+\frac {\int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx}{a}+\int \frac {1}{\sqrt {a+a \sin (c+d x)}} \, dx\\ &=\frac {4 \cos (c+d x)}{d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sin ^2(c+d x)}{5 d \sqrt {a+a \sin (c+d x)}}+\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{15 a d}-\frac {2 \int \frac {\frac {a^2}{2}-7 a^2 \sin (c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx}{15 a^2}-\frac {2 \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}-\frac {2 \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}\\ &=-\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}+\frac {32 \cos (c+d x)}{15 d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sin ^2(c+d x)}{5 d \sqrt {a+a \sin (c+d x)}}+\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{15 a d}-\int \frac {1}{\sqrt {a+a \sin (c+d x)}} \, dx\\ &=-\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}+\frac {32 \cos (c+d x)}{15 d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sin ^2(c+d x)}{5 d \sqrt {a+a \sin (c+d x)}}+\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{15 a d}+\frac {2 \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}\\ &=-\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}+\frac {32 \cos (c+d x)}{15 d \sqrt {a+a \sin (c+d x)}}-\frac {2 \cos (c+d x) \sin ^2(c+d x)}{5 d \sqrt {a+a \sin (c+d x)}}+\frac {2 \cos (c+d x) \sqrt {a+a \sin (c+d x)}}{15 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.25, size = 169, normalized size = 1.30 \[ \frac {\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right ) \left (-60 \sin \left (\frac {1}{2} (c+d x)\right )+5 \sin \left (\frac {3}{2} (c+d x)\right )-3 \sin \left (\frac {5}{2} (c+d x)\right )+60 \cos \left (\frac {1}{2} (c+d x)\right )+5 \cos \left (\frac {3}{2} (c+d x)\right )+3 \cos \left (\frac {5}{2} (c+d x)\right )-30 \log \left (-\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )+1\right )+30 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )-\cos \left (\frac {1}{2} (c+d x)\right )+1\right )\right )}{30 d \sqrt {a (\sin (c+d x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 279, normalized size = 2.15 \[ \frac {15 \, \sqrt {a} {\left (\cos \left (d x + c\right ) + \sin \left (d x + c\right ) + 1\right )} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} - 9 \, a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1}\right ) + 4 \, {\left (3 \, \cos \left (d x + c\right )^{3} + 4 \, \cos \left (d x + c\right )^{2} - {\left (3 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) + 13\right )} \sin \left (d x + c\right ) + 14 \, \cos \left (d x + c\right ) + 13\right )} \sqrt {a \sin \left (d x + c\right ) + a}}{30 \, {\left (a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.70, size = 386, normalized size = 2.97 \[ -\frac {\frac {{\left (30 \, a \arctan \left (\frac {\sqrt {2} \sqrt {a} + \sqrt {a}}{\sqrt {-a}}\right ) - 15 \, \sqrt {-a} \sqrt {a} \log \left (\sqrt {2} \sqrt {a} + \sqrt {a}\right ) + 26 \, \sqrt {2} \sqrt {-a} \sqrt {a}\right )} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{\sqrt {-a} a} - \frac {30 \, \arctan \left (-\frac {\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}}{\sqrt {-a}}\right )}{\sqrt {-a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )} + \frac {15 \, \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 )}{\sqrt {a} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )} + \frac {2 \, {\left ({\left ({\left ({\left ({\left (\frac {17 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )} - \frac {15 \, a^{2}}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {20 \, a^{2}}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {20 \, a^{2}}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {15 \, a^{2}}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {17 \, a^{2}}{\mathrm {sgn}\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a\right )}^{\frac {5}{2}}}}{15 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.90, size = 123, normalized size = 0.95 \[ -\frac {2 \left (1+\sin \left (d x +c \right )\right ) \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (15 a^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {a -a \sin \left (d x +c \right )}}{\sqrt {a}}\right )+3 \left (a -a \sin \left (d x +c \right )\right )^{\frac {5}{2}}-5 \left (a -a \sin \left (d x +c \right )\right )^{\frac {3}{2}} a -15 a^{2} \sqrt {a -a \sin \left (d x +c \right )}\right )}{15 a^{3} \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (d x + c\right )^{4} \csc \left (d x + c\right )}{\sqrt {a \sin \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\cos \left (c+d\,x\right )}^4}{\sin \left (c+d\,x\right )\,\sqrt {a+a\,\sin \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos ^{4}{\left (c + d x \right )} \csc {\left (c + d x \right )}}{\sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________