Optimal. Leaf size=112 \[ -\frac {\cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^3(c+d x)}{a^2 d}-\frac {2 \cot (c+d x)}{a^2 d}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{4 a^2 d}+\frac {\cot (c+d x) \csc ^3(c+d x)}{2 a^2 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{4 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.24, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2869, 2757, 3767, 3768, 3770} \[ -\frac {\cot ^5(c+d x)}{5 a^2 d}-\frac {\cot ^3(c+d x)}{a^2 d}-\frac {2 \cot (c+d x)}{a^2 d}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{4 a^2 d}+\frac {\cot (c+d x) \csc ^3(c+d x)}{2 a^2 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{4 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 ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \csc ^6(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2 \csc ^4(c+d x)-2 a^2 \csc ^5(c+d x)+a^2 \csc ^6(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \csc ^4(c+d x) \, dx}{a^2}+\frac {\int \csc ^6(c+d x) \, dx}{a^2}-\frac {2 \int \csc ^5(c+d x) \, dx}{a^2}\\ &=\frac {\cot (c+d x) \csc ^3(c+d x)}{2 a^2 d}-\frac {3 \int \csc ^3(c+d x) \, dx}{2 a^2}-\frac {\operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{a^2 d}-\frac {\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 {\cot ^3(c+d x)}{a^2 d}-\frac {\cot ^5(c+d x)}{5 a^2 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{4 a^2 d}+\frac {\cot (c+d x) \csc ^3(c+d x)}{2 a^2 d}-\frac {3 \int \csc (c+d x) \, dx}{4 a^2}\\ &=\frac {3 \tanh ^{-1}(\cos (c+d x))}{4 a^2 d}-\frac {2 \cot (c+d x)}{a^2 d}-\frac {\cot ^3(c+d x)}{a^2 d}-\frac {\cot ^5(c+d x)}{5 a^2 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{4 a^2 d}+\frac {\cot (c+d x) \csc ^3(c+d x)}{2 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.75, size = 189, normalized size = 1.69 \[ \frac {\csc ^5(c+d x) \left (140 \sin (2 (c+d x))-30 \sin (4 (c+d x))-160 \cos (c+d x)+120 \cos (3 (c+d x))-24 \cos (5 (c+d x))-150 \sin (c+d x) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+75 \sin (3 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-15 \sin (5 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+150 \sin (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-75 \sin (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+15 \sin (5 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )}{320 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 179, normalized size = 1.60 \[ -\frac {48 \, \cos \left (d x + c\right )^{5} - 120 \, \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 ) \sin \left (d x + c\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 ) \sin \left (d x + c\right ) + 10 \, {\left (3 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) + 80 \, \cos \left (d x + c\right )}{40 \, {\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 )} \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 186, normalized size = 1.66 \[ -\frac {\frac {120 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {274 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 110 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 40 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 5 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}} - \frac {a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 5 \, a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 15 \, a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 110 \, a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{10}}}{160 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.64, size = 208, normalized size = 1.86 \[ \frac {\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )}{160 a^{2} d}-\frac {\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )}{32 a^{2} d}+\frac {3 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d \,a^{2}}-\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a^{2} d}+\frac {11 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{16 d \,a^{2}}-\frac {11}{16 d \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{2}}-\frac {1}{160 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}+\frac {1}{4 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {1}{32 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}-\frac {3}{32 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.37, size = 233, normalized size = 2.08 \[ \frac {\frac {\frac {110 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {40 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {15 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {5 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{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 {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {15 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {40 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {110 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{5}}{a^{2} \sin \left (d x + c\right )^{5}}}{160 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.30, size = 289, normalized size = 2.58 \[ -\frac {{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9-5\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )-15\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+40\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-110\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+110\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-40\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+15\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+120\,\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 )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,a^2\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5} \]
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]
________________________________________________________________________________________