Optimal. Leaf size=98 \[ \frac {3 a^3 \cos (c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}+\frac {a^3 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {5 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {5 a^3 x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 98, 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 = {2872, 3770, 3767, 8, 3768, 2638, 2635} \[ \frac {3 a^3 \cos (c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}+\frac {a^3 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {5 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}-\frac {5 a^3 x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2638
Rule 2872
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \cot ^2(c+d x) \csc (c+d x) (a+a \sin (c+d x))^3 \, dx &=\frac {\int \left (-2 a^5+2 a^5 \csc (c+d x)+3 a^5 \csc ^2(c+d x)+a^5 \csc ^3(c+d x)-3 a^5 \sin (c+d x)-a^5 \sin ^2(c+d x)\right ) \, dx}{a^2}\\ &=-2 a^3 x+a^3 \int \csc ^3(c+d x) \, dx-a^3 \int \sin ^2(c+d x) \, dx+\left (2 a^3\right ) \int \csc (c+d x) \, dx+\left (3 a^3\right ) \int \csc ^2(c+d x) \, dx-\left (3 a^3\right ) \int \sin (c+d x) \, dx\\ &=-2 a^3 x-\frac {2 a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {3 a^3 \cos (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac {a^3 \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} a^3 \int 1 \, dx+\frac {1}{2} a^3 \int \csc (c+d x) \, dx-\frac {\left (3 a^3\right ) \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}\\ &=-\frac {5 a^3 x}{2}-\frac {5 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}+\frac {3 a^3 \cos (c+d x)}{d}-\frac {3 a^3 \cot (c+d x)}{d}-\frac {a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac {a^3 \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.04, size = 112, normalized size = 1.14 \[ \frac {a^3 \left (2 \sin (2 (c+d x))+24 \cos (c+d x)+12 \tan \left (\frac {1}{2} (c+d x)\right )-12 \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 )+20 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-20 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-20 c-20 d x\right )}{8 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 159, normalized size = 1.62 \[ -\frac {10 \, a^{3} d x \cos \left (d x + c\right )^{2} - 12 \, a^{3} \cos \left (d x + c\right )^{3} - 10 \, a^{3} d x + 10 \, a^{3} \cos \left (d x + c\right ) + 5 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 5 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (a^{3} \cos \left (d x + c\right )^{3} + 5 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 184, normalized size = 1.88 \[ \frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 20 \, {\left (d x + c\right )} a^{3} + 20 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {10 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 20 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 27 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 16 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.42, size = 113, normalized size = 1.15 \[ \frac {a^{3} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}-\frac {5 a^{3} x}{2}-\frac {5 a^{3} c}{2 d}+\frac {5 a^{3} \cos \left (d x +c \right )}{2 d}+\frac {5 a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d}-\frac {3 a^{3} \cot \left (d x +c \right )}{d}-\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.43, size = 124, normalized size = 1.27 \[ \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} - 12 \, {\left (d x + c + \frac {1}{\tan \left (d x + c\right )}\right )} a^{3} + a^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + \log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 6 \, a^{3} {\left (2 \, \cos \left (d x + c\right ) - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.68, size = 259, normalized size = 2.64 \[ \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {5\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {10\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-\frac {47\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+8\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-23\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+6\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a^3}{2}}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}+\frac {5\,a^3\,\mathrm {atan}\left (\frac {25\,a^6}{25\,a^6+25\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {25\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{25\,a^6+25\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{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]
________________________________________________________________________________________