Optimal. Leaf size=138 \[ \frac {2 \cot ^5(c+d x)}{5 a^2 d}+\frac {4 \cot ^3(c+d x)}{3 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}-\frac {11 \tanh ^{-1}(\cos (c+d x))}{16 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac {11 \cot (c+d x) \csc ^3(c+d x)}{24 a^2 d}-\frac {11 \cot (c+d x) \csc (c+d x)}{16 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.25, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2869, 2757, 3768, 3770, 3767} \[ \frac {2 \cot ^5(c+d x)}{5 a^2 d}+\frac {4 \cot ^3(c+d x)}{3 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}-\frac {11 \tanh ^{-1}(\cos (c+d x))}{16 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}-\frac {11 \cot (c+d x) \csc ^3(c+d x)}{24 a^2 d}-\frac {11 \cot (c+d x) \csc (c+d x)}{16 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2757
Rule 2869
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cot ^4(c+d x) \csc ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \csc ^7(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2 \csc ^5(c+d x)-2 a^2 \csc ^6(c+d x)+a^2 \csc ^7(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \csc ^5(c+d x) \, dx}{a^2}+\frac {\int \csc ^7(c+d x) \, dx}{a^2}-\frac {2 \int \csc ^6(c+d x) \, dx}{a^2}\\ &=-\frac {\cot (c+d x) \csc ^3(c+d x)}{4 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}+\frac {3 \int \csc ^3(c+d x) \, dx}{4 a^2}+\frac {5 \int \csc ^5(c+d x) \, dx}{6 a^2}+\frac {2 \operatorname {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,\cot (c+d x)\right )}{a^2 d}\\ &=\frac {2 \cot (c+d x)}{a^2 d}+\frac {4 \cot ^3(c+d x)}{3 a^2 d}+\frac {2 \cot ^5(c+d x)}{5 a^2 d}-\frac {3 \cot (c+d x) \csc (c+d x)}{8 a^2 d}-\frac {11 \cot (c+d x) \csc ^3(c+d x)}{24 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}+\frac {3 \int \csc (c+d x) \, dx}{8 a^2}+\frac {5 \int \csc ^3(c+d x) \, dx}{8 a^2}\\ &=-\frac {3 \tanh ^{-1}(\cos (c+d x))}{8 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}+\frac {4 \cot ^3(c+d x)}{3 a^2 d}+\frac {2 \cot ^5(c+d x)}{5 a^2 d}-\frac {11 \cot (c+d x) \csc (c+d x)}{16 a^2 d}-\frac {11 \cot (c+d x) \csc ^3(c+d x)}{24 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}+\frac {5 \int \csc (c+d x) \, dx}{16 a^2}\\ &=-\frac {11 \tanh ^{-1}(\cos (c+d x))}{16 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}+\frac {4 \cot ^3(c+d x)}{3 a^2 d}+\frac {2 \cot ^5(c+d x)}{5 a^2 d}-\frac {11 \cot (c+d x) \csc (c+d x)}{16 a^2 d}-\frac {11 \cot (c+d x) \csc ^3(c+d x)}{24 a^2 d}-\frac {\cot (c+d x) \csc ^5(c+d x)}{6 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.83, size = 229, normalized size = 1.66 \[ \frac {\csc ^6(c+d x) \left (3840 \sin (2 (c+d x))-1536 \sin (4 (c+d x))+256 \sin (6 (c+d x))-2820 \cos (c+d x)+1870 \cos (3 (c+d x))-330 \cos (5 (c+d x))+1650 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+2475 \cos (2 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-990 \cos (4 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+165 \cos (6 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-1650 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-2475 \cos (2 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+990 \cos (4 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-165 \cos (6 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )}{7680 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 204, normalized size = 1.48 \[ \frac {330 \, \cos \left (d x + c\right )^{5} - 880 \, \cos \left (d x + c\right )^{3} - 165 \, {\left (\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 165 \, {\left (\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 64 \, {\left (8 \, \cos \left (d x + c\right )^{5} - 20 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) + 630 \, \cos \left (d x + c\right )}{480 \, {\left (a^{2} d \cos \left (d x + c\right )^{6} - 3 \, a^{2} d \cos \left (d x + c\right )^{4} + 3 \, 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.27, size = 215, normalized size = 1.56 \[ \frac {\frac {1320 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {3234 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1200 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 465 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 200 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 75 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}} + \frac {5 \, a^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 24 \, a^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 75 \, a^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 200 \, a^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 465 \, a^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1200 \, a^{10} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{12}}}{1920 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.66, size = 246, normalized size = 1.78 \[ \frac {\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )}{384 a^{2} d}-\frac {\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )}{80 a^{2} d}+\frac {5 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128 a^{2} d}-\frac {5 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{48 d \,a^{2}}+\frac {31 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128 a^{2} d}-\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d \,a^{2}}-\frac {1}{384 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}+\frac {5}{8 d \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {11 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d \,a^{2}}+\frac {1}{80 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}-\frac {31}{128 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {5}{128 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}+\frac {5}{48 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.34, size = 275, normalized size = 1.99 \[ -\frac {\frac {\frac {1200 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {465 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {200 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {75 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {24 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {5 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}}{a^{2}} - \frac {1320 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {{\left (\frac {24 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {75 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {200 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {465 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {1200 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - 5\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{6}}{a^{2} \sin \left (d x + c\right )^{6}}}{1920 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.74, size = 339, normalized size = 2.46 \[ \frac {5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-5\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}-24\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+24\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+75\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-200\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+465\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-1200\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+1200\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-465\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+200\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-75\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1320\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{1920\,a^2\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6} \]
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]
________________________________________________________________________________________