Optimal. Leaf size=107 \[ -\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a b^4 d}+\frac {\left (a^2-2 b^2\right ) \sin (c+d x)}{b^3 d}-\frac {a \sin ^2(c+d x)}{2 b^2 d}+\frac {\log (\sin (c+d x))}{a d}+\frac {\sin ^3(c+d x)}{3 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 107, 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, 894} \[ \frac {\left (a^2-2 b^2\right ) \sin (c+d x)}{b^3 d}-\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a b^4 d}-\frac {a \sin ^2(c+d x)}{2 b^2 d}+\frac {\log (\sin (c+d x))}{a d}+\frac {\sin ^3(c+d x)}{3 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 894
Rule 2837
Rubi steps
\begin {align*} \int \frac {\cos ^4(c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b \left (b^2-x^2\right )^2}{x (a+x)} \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac {\operatorname {Subst}\left (\int \frac {\left (b^2-x^2\right )^2}{x (a+x)} \, dx,x,b \sin (c+d x)\right )}{b^4 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2 \left (1-\frac {2 b^2}{a^2}\right )+\frac {b^4}{a x}-a x+x^2-\frac {\left (a^2-b^2\right )^2}{a (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{b^4 d}\\ &=\frac {\log (\sin (c+d x))}{a d}-\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a b^4 d}+\frac {\left (a^2-2 b^2\right ) \sin (c+d x)}{b^3 d}-\frac {a \sin ^2(c+d x)}{2 b^2 d}+\frac {\sin ^3(c+d x)}{3 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.14, size = 101, normalized size = 0.94 \[ \frac {-3 a^2 b^2 \sin ^2(c+d x)+6 a b \left (a^2-2 b^2\right ) \sin (c+d x)+6 \left (b^4 \log (\sin (c+d x))-\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))\right )+2 a b^3 \sin ^3(c+d x)}{6 a b^4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.96, size = 104, normalized size = 0.97 \[ \frac {3 \, a^{2} b^{2} \cos \left (d x + c\right )^{2} + 6 \, b^{4} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) - 2 \, {\left (a b^{3} \cos \left (d x + c\right )^{2} - 3 \, a^{3} b + 5 \, a b^{3}\right )} \sin \left (d x + c\right )}{6 \, a b^{4} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 106, normalized size = 0.99 \[ \frac {\frac {6 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a} + \frac {2 \, b^{2} \sin \left (d x + c\right )^{3} - 3 \, a b \sin \left (d x + c\right )^{2} + 6 \, a^{2} \sin \left (d x + c\right ) - 12 \, b^{2} \sin \left (d x + c\right )}{b^{3}} - \frac {6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a b^{4}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.42, size = 140, normalized size = 1.31 \[ \frac {\sin ^{3}\left (d x +c \right )}{3 b d}-\frac {a \left (\sin ^{2}\left (d x +c \right )\right )}{2 b^{2} d}+\frac {a^{2} \sin \left (d x +c \right )}{b^{3} d}-\frac {2 \sin \left (d x +c \right )}{b d}-\frac {a^{3} \ln \left (a +b \sin \left (d x +c \right )\right )}{b^{4} d}+\frac {2 a \ln \left (a +b \sin \left (d x +c \right )\right )}{d \,b^{2}}-\frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{d a}+\frac {\ln \left (\sin \left (d x +c \right )\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.30, size = 99, normalized size = 0.93 \[ \frac {\frac {6 \, \log \left (\sin \left (d x + c\right )\right )}{a} + \frac {2 \, b^{2} \sin \left (d x + c\right )^{3} - 3 \, a b \sin \left (d x + c\right )^{2} + 6 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )}{b^{3}} - \frac {6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a b^{4}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.10, size = 254, normalized size = 2.37 \[ \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a^2-2\,b^2\right )}{b^3}+\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (a^2-2\,b^2\right )}{b^3}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{b^2}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,a^2-4\,b^2\right )}{3\,b^3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^2-2\,b^2\right )}{b^4\,d}-\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,{\left (a^2-b^2\right )}^2}{a\,b^4\,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]
________________________________________________________________________________________