Optimal. Leaf size=73 \[ \frac {\cos (c+d x)}{a^2 d}+\frac {2 \cot (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 {2 x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2875, 2872, 3767, 8, 3768, 3770, 2638} \[ \frac {\cos (c+d x)}{a^2 d}+\frac {2 \cot (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 {2 x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2638
Rule 2872
Rule 2875
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) \cot ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \cot ^2(c+d x) \csc (c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (2 a^4-2 a^4 \csc ^2(c+d x)+a^4 \csc ^3(c+d x)-a^4 \sin (c+d x)\right ) \, dx}{a^6}\\ &=\frac {2 x}{a^2}+\frac {\int \csc ^3(c+d x) \, dx}{a^2}-\frac {\int \sin (c+d x) \, dx}{a^2}-\frac {2 \int \csc ^2(c+d x) \, dx}{a^2}\\ &=\frac {2 x}{a^2}+\frac {\cos (c+d x)}{a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}+\frac {\int \csc (c+d x) \, dx}{2 a^2}+\frac {2 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}\\ &=\frac {2 x}{a^2}-\frac {\tanh ^{-1}(\cos (c+d x))}{2 a^2 d}+\frac {\cos (c+d x)}{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}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.58, size = 134, normalized size = 1.84 \[ \frac {\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (16 (c+d x)+8 \cos (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 )\right )}{8 d (a \sin (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 118, normalized size = 1.62 \[ \frac {8 \, d x \cos \left (d x + c\right )^{2} + 4 \, \cos \left (d x + c\right )^{3} - 8 \, d x - {\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 ) + {\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 ) - 8 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{4 \, {\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.21, size = 128, normalized size = 1.75 \[ \frac {\frac {16 \, {\left (d x + c\right )}}{a^{2}} + \frac {4 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {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 )}{a^{4}} + \frac {16}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{2}} - \frac {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}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.56, size = 134, normalized size = 1.84 \[ \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}{d \,a^{2} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+\frac {4 \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.41, size = 204, normalized size = 2.79 \[ \frac {\frac {\frac {8 \, \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 {8 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - 1}{\frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {\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}}}{a^{2}} + \frac {32 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac {4 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.10, size = 186, normalized size = 2.55 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}-\frac {4\,\mathrm {atan}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-4}+\frac {16}{16\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-4}\right )}{a^2\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a^2\,d}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+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 )}^4+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\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]
________________________________________________________________________________________