Optimal. Leaf size=86 \[ \frac {a \sin ^2(c+d x)}{2 d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {2 a \log (\sin (c+d x))}{d}+\frac {b \sin ^3(c+d x)}{3 d}-\frac {2 b \sin (c+d x)}{d}-\frac {b \csc (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2837, 12, 766} \[ \frac {a \sin ^2(c+d x)}{2 d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {2 a \log (\sin (c+d x))}{d}+\frac {b \sin ^3(c+d x)}{3 d}-\frac {2 b \sin (c+d x)}{d}-\frac {b \csc (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 766
Rule 2837
Rubi steps
\begin {align*} \int \cos ^2(c+d x) \cot ^3(c+d x) (a+b \sin (c+d x)) \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b^3 (a+x) \left (b^2-x^2\right )^2}{x^3} \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {(a+x) \left (b^2-x^2\right )^2}{x^3} \, dx,x,b \sin (c+d x)\right )}{b^2 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-2 b^2+\frac {a b^4}{x^3}+\frac {b^4}{x^2}-\frac {2 a b^2}{x}+a x+x^2\right ) \, dx,x,b \sin (c+d x)\right )}{b^2 d}\\ &=-\frac {b \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {2 a \log (\sin (c+d x))}{d}-\frac {2 b \sin (c+d x)}{d}+\frac {a \sin ^2(c+d x)}{2 d}+\frac {b \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 77, normalized size = 0.90 \[ -\frac {a \left (-\sin ^2(c+d x)+\csc ^2(c+d x)+4 \log (\sin (c+d x))\right )}{2 d}+\frac {b \sin ^3(c+d x)}{3 d}-\frac {2 b \sin (c+d x)}{d}-\frac {b \csc (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.26, size = 102, normalized size = 1.19 \[ -\frac {6 \, a \cos \left (d x + c\right )^{4} - 9 \, a \cos \left (d x + c\right )^{2} + 24 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 4 \, {\left (b \cos \left (d x + c\right )^{4} + 4 \, b \cos \left (d x + c\right )^{2} - 8 \, b\right )} \sin \left (d x + c\right ) - 3 \, a}{12 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 82, normalized size = 0.95 \[ \frac {2 \, b \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2} - 12 \, a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - 12 \, b \sin \left (d x + c\right ) + \frac {3 \, {\left (6 \, a \sin \left (d x + c\right )^{2} - 2 \, b \sin \left (d x + c\right ) - a\right )}}{\sin \left (d x + c\right )^{2}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.38, size = 139, normalized size = 1.62 \[ -\frac {a \left (\cos ^{6}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{2}}-\frac {a \left (\cos ^{4}\left (d x +c \right )\right )}{2 d}-\frac {a \left (\cos ^{2}\left (d x +c \right )\right )}{d}-\frac {2 a \ln \left (\sin \left (d x +c \right )\right )}{d}-\frac {b \left (\cos ^{6}\left (d x +c \right )\right )}{d \sin \left (d x +c \right )}-\frac {8 b \sin \left (d x +c \right )}{3 d}-\frac {\left (\cos ^{4}\left (d x +c \right )\right ) \sin \left (d x +c \right ) b}{d}-\frac {4 b \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right )}{3 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 68, normalized size = 0.79 \[ \frac {2 \, b \sin \left (d x + c\right )^{3} + 3 \, a \sin \left (d x + c\right )^{2} - 12 \, a \log \left (\sin \left (d x + c\right )\right ) - 12 \, b \sin \left (d x + c\right ) - \frac {3 \, {\left (2 \, b \sin \left (d x + c\right ) + a\right )}}{\sin \left (d x + c\right )^{2}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.89, size = 229, normalized size = 2.66 \[ \frac {2\,a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}-\frac {18\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-\frac {15\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{2}+\frac {82\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3}-\frac {13\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}+22\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{2}}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+12\,{\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 {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {2\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{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]
________________________________________________________________________________________