Optimal. Leaf size=97 \[ \frac {\cos ^3(c+d x)}{3 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}+\frac {\sin (c+d x) \cos (c+d x)}{a^2 d}+\frac {\tanh ^{-1}(\cos (c+d x))}{2 a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}+\frac {3 x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 9, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {2875, 2872, 3770, 3767, 8, 3768, 2638, 2635, 2633} \[ \frac {\cos ^3(c+d x)}{3 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}+\frac {\sin (c+d x) \cos (c+d x)}{a^2 d}+\frac {\tanh ^{-1}(\cos (c+d x))}{2 a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}+\frac {3 x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2638
Rule 2872
Rule 2875
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos ^5(c+d x) \cot ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \cos (c+d x) \cot ^3(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (4 a^6-a^6 \csc (c+d x)-2 a^6 \csc ^2(c+d x)+a^6 \csc ^3(c+d x)-a^6 \sin (c+d x)-2 a^6 \sin ^2(c+d x)+a^6 \sin ^3(c+d x)\right ) \, dx}{a^8}\\ &=\frac {4 x}{a^2}-\frac {\int \csc (c+d x) \, dx}{a^2}+\frac {\int \csc ^3(c+d x) \, dx}{a^2}-\frac {\int \sin (c+d x) \, dx}{a^2}+\frac {\int \sin ^3(c+d x) \, dx}{a^2}-\frac {2 \int \csc ^2(c+d x) \, dx}{a^2}-\frac {2 \int \sin ^2(c+d x) \, dx}{a^2}\\ &=\frac {4 x}{a^2}+\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {\cos (c+d x)}{a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{a^2 d}+\frac {\int \csc (c+d x) \, dx}{2 a^2}-\frac {\int 1 \, dx}{a^2}-\frac {\operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a^2 d}+\frac {2 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}\\ &=\frac {3 x}{a^2}+\frac {\tanh ^{-1}(\cos (c+d x))}{2 a^2 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.99, size = 158, normalized size = 1.63 \[ \frac {\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (6 \cos (c+d x)+2 \cos (3 (c+d x))+3 \left (4 \sin (2 (c+d x))-8 \tan \left (\frac {1}{2} (c+d x)\right )+8 \cot \left (\frac {1}{2} (c+d x)\right )-\csc ^2\left (\frac {1}{2} (c+d x)\right )+\sec ^2\left (\frac {1}{2} (c+d x)\right )-4 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+24 c+24 d x\right )\right )}{24 a^2 d (\sin (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 140, normalized size = 1.44 \[ \frac {4 \, \cos \left (d x + c\right )^{5} + 36 \, d x \cos \left (d x + c\right )^{2} - 4 \, \cos \left (d x + c\right )^{3} - 36 \, d x + 3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 12 \, {\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) + 6 \, \cos \left (d x + c\right )}{12 \, {\left (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 [A] time = 0.23, size = 168, normalized size = 1.73 \[ \frac {\frac {72 \, {\left (d x + c\right )}}{a^{2}} - \frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {3 \, {\left (a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a^{4}} + \frac {3 \, {\left (6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} - \frac {16 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3} a^{2}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.62, size = 234, normalized size = 2.41 \[ \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 )}{d \,a^{2}}-\frac {2 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {2 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {2}{3 d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {6 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}-\frac {1}{8 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {1}{d \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.44, size = 330, normalized size = 3.40 \[ \frac {\frac {\frac {24 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {7 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {120 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {9 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {72 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {45 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {24 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - 3}{\frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {3 \, {\left (\frac {8 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}}{a^{2}} + \frac {144 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.07, size = 270, normalized size = 2.78 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}-\frac {6\,\mathrm {atan}\left (\frac {36}{36\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+6}-\frac {6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{36\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+6}\right )}{a^2\,d}+\frac {-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\frac {15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2}+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+20\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{6}+4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{2}}{d\,\left (4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+12\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+12\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a^2\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{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]
________________________________________________________________________________________