Optimal. Leaf size=82 \[ \frac {2 \cot ^3(c+d x)}{3 a^2 d}+\frac {5 \tanh ^{-1}(\cos (c+d x))}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2875, 2873, 2611, 3770, 2607, 30, 3768} \[ \frac {2 \cot ^3(c+d x)}{3 a^2 d}+\frac {5 \tanh ^{-1}(\cos (c+d x))}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2607
Rule 2611
Rule 2873
Rule 2875
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot ^5(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \cot ^2(c+d x) \csc ^3(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2 \cot ^2(c+d x) \csc (c+d x)-2 a^2 \cot ^2(c+d x) \csc ^2(c+d x)+a^2 \cot ^2(c+d x) \csc ^3(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \cot ^2(c+d x) \csc (c+d x) \, dx}{a^2}+\frac {\int \cot ^2(c+d x) \csc ^3(c+d x) \, dx}{a^2}-\frac {2 \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx}{a^2}\\ &=-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {\int \csc ^3(c+d x) \, dx}{4 a^2}-\frac {\int \csc (c+d x) \, dx}{2 a^2}-\frac {2 \operatorname {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{a^2 d}\\ &=\frac {\tanh ^{-1}(\cos (c+d x))}{2 a^2 d}+\frac {2 \cot ^3(c+d x)}{3 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {\int \csc (c+d x) \, dx}{8 a^2}\\ &=\frac {5 \tanh ^{-1}(\cos (c+d x))}{8 a^2 d}+\frac {2 \cot ^3(c+d x)}{3 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d}-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.42, size = 116, normalized size = 1.41 \[ \frac {\left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (24 \sin (2 (c+d x))-33 \cos (c+d x)+(16 \sin (c+d x)+9) \cos (3 (c+d x))+60 \sin ^4(c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{1536 a^2 d (\sin (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 138, normalized size = 1.68 \[ \frac {32 \, \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) + 18 \, \cos \left (d x + c\right )^{3} + 15 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 15 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 30 \, \cos \left (d x + c\right )}{48 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} - 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.25, size = 158, normalized size = 1.93 \[ -\frac {\frac {120 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {250 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 48 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 16 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}} - \frac {3 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 16 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 48 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{8}}}{192 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.63, size = 170, normalized size = 2.07 \[ \frac {\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )}{64 a^{2} d}-\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{12 d \,a^{2}}+\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a^{2} d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d \,a^{2}}-\frac {1}{4 d \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d \,a^{2}}-\frac {1}{8 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {1}{64 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}+\frac {1}{12 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.33, size = 194, normalized size = 2.37 \[ \frac {\frac {\frac {48 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {24 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}}{a^{2}} - \frac {120 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac {{\left (\frac {16 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {24 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {48 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - 3\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{4}}{a^{2} \sin \left (d x + c\right )^{4}}}{192 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.03, size = 151, normalized size = 1.84 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{12\,a^2\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,a^2\,d}-\frac {5\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,a^2\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {1}{4}\right )}{16\,a^2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________