Optimal. Leaf size=120 \[ \frac {b \csc ^2(c+d x)}{2 a^2 d}+\frac {b \left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^4 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4 b d}+\frac {\left (2 a^2-b^2\right ) \csc (c+d x)}{a^3 d}-\frac {\csc ^3(c+d x)}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 120, 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 (2 a^2-b^2\right ) \csc (c+d x)}{a^3 d}+\frac {b \left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^4 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4 b d}+\frac {b \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^3(c+d x)}{3 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 894
Rule 2837
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {b^4 \left (b^2-x^2\right )^2}{x^4 (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^4 (a+x)} \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {b^4}{a x^4}-\frac {b^4}{a^2 x^3}+\frac {-2 a^2 b^2+b^4}{a^3 x^2}+\frac {2 a^2 b^2-b^4}{a^4 x}+\frac {\left (a^2-b^2\right )^2}{a^4 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\left (2 a^2-b^2\right ) \csc (c+d x)}{a^3 d}+\frac {b \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^3(c+d x)}{3 a d}+\frac {b \left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^4 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 110, normalized size = 0.92 \[ \frac {-2 a^3 b \csc ^3(c+d x)+3 a^2 b^2 \csc ^2(c+d x)+6 a b \left (2 a^2-b^2\right ) \csc (c+d x)-6 b^2 \left (b^2-2 a^2\right ) \log (\sin (c+d x))+6 \left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{6 a^4 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.89, size = 198, normalized size = 1.65 \[ -\frac {3 \, a^{2} b^{2} \sin \left (d x + c\right ) + 10 \, a^{3} b - 6 \, a b^{3} - 6 \, {\left (2 \, a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) \sin \left (d x + c\right ) + 6 \, {\left (2 \, a^{2} b^{2} - b^{4} - {\left (2 \, a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right )}{6 \, {\left (a^{4} b d \cos \left (d x + c\right )^{2} - a^{4} b d\right )} \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 151, normalized size = 1.26 \[ \frac {\frac {6 \, {\left (2 \, a^{2} b - b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{4}} + \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^{4} b} - \frac {22 \, a^{2} b \sin \left (d x + c\right )^{3} - 11 \, b^{3} \sin \left (d x + c\right )^{3} - 12 \, a^{3} \sin \left (d x + c\right )^{2} + 6 \, a b^{2} \sin \left (d x + c\right )^{2} - 3 \, a^{2} b \sin \left (d x + c\right ) + 2 \, a^{3}}{a^{4} \sin \left (d x + c\right )^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.45, size = 163, normalized size = 1.36 \[ \frac {\ln \left (a +b \sin \left (d x +c \right )\right )}{b d}-\frac {2 b \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{2} d}+\frac {b^{3} \ln \left (a +b \sin \left (d x +c \right )\right )}{d \,a^{4}}-\frac {1}{3 d a \sin \left (d x +c \right )^{3}}+\frac {2}{d a \sin \left (d x +c \right )}-\frac {b^{2}}{d \,a^{3} \sin \left (d x +c \right )}+\frac {2 b \ln \left (\sin \left (d x +c \right )\right )}{a^{2} d}-\frac {b^{3} \ln \left (\sin \left (d x +c \right )\right )}{d \,a^{4}}+\frac {b}{2 d \,a^{2} \sin \left (d x +c \right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.30, size = 113, normalized size = 0.94 \[ \frac {\frac {6 \, {\left (2 \, a^{2} b - b^{3}\right )} \log \left (\sin \left (d x + c\right )\right )}{a^{4}} + \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^{4} b} + \frac {3 \, a b \sin \left (d x + c\right ) + 6 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} - 2 \, a^{2}}{a^{3} \sin \left (d x + c\right )^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.93, size = 227, normalized size = 1.89 \[ \frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {7}{8\,a}-\frac {b^2}{2\,a^3}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,a\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{b\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a^2\,b-b^3\right )}{a^4\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (7\,a^2-4\,b^2\right )-\frac {a^2}{3}+a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,a^3\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}+\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^4\,b\,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]
________________________________________________________________________________________