Optimal. Leaf size=54 \[ \frac {(A b-a B) (a+b \sin (c+d x))^3}{3 b^2 d}+\frac {B (a+b \sin (c+d x))^4}{4 b^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2833, 43} \[ \frac {(A b-a B) (a+b \sin (c+d x))^3}{3 b^2 d}+\frac {B (a+b \sin (c+d x))^4}{4 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2833
Rubi steps
\begin {align*} \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx &=\frac {\operatorname {Subst}\left (\int (a+x)^2 \left (A+\frac {B x}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {(A b-a B) (a+x)^2}{b}+\frac {B (a+x)^3}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {(A b-a B) (a+b \sin (c+d x))^3}{3 b^2 d}+\frac {B (a+b \sin (c+d x))^4}{4 b^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 41, normalized size = 0.76 \[ \frac {(a+b \sin (c+d x))^3 (-a B+4 A b+3 b B \sin (c+d x))}{12 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 92, normalized size = 1.70 \[ \frac {3 \, B b^{2} \cos \left (d x + c\right )^{4} - 6 \, {\left (B a^{2} + 2 \, A a b + B b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (3 \, A a^{2} + 2 \, B a b + A b^{2} - {\left (2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 86, normalized size = 1.59 \[ \frac {3 \, B b^{2} \sin \left (d x + c\right )^{4} + 8 \, B a b \sin \left (d x + c\right )^{3} + 4 \, A b^{2} \sin \left (d x + c\right )^{3} + 6 \, B a^{2} \sin \left (d x + c\right )^{2} + 12 \, A a b \sin \left (d x + c\right )^{2} + 12 \, A a^{2} \sin \left (d x + c\right )}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 73, normalized size = 1.35 \[ \frac {\frac {B \,b^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (A \,b^{2}+2 B a b \right ) \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {\left (2 A a b +B \,a^{2}\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{2}+a^{2} A \sin \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 74, normalized size = 1.37 \[ \frac {3 \, B b^{2} \sin \left (d x + c\right )^{4} + 12 \, A a^{2} \sin \left (d x + c\right ) + 4 \, {\left (2 \, B a b + A b^{2}\right )} \sin \left (d x + c\right )^{3} + 6 \, {\left (B a^{2} + 2 \, A a b\right )} \sin \left (d x + c\right )^{2}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 71, normalized size = 1.31 \[ \frac {{\sin \left (c+d\,x\right )}^2\,\left (\frac {B\,a^2}{2}+A\,b\,a\right )+{\sin \left (c+d\,x\right )}^3\,\left (\frac {A\,b^2}{3}+\frac {2\,B\,a\,b}{3}\right )+\frac {B\,b^2\,{\sin \left (c+d\,x\right )}^4}{4}+A\,a^2\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.02, size = 117, normalized size = 2.17 \[ \begin {cases} \frac {A a^{2} \sin {\left (c + d x \right )}}{d} - \frac {A a b \cos ^{2}{\left (c + d x \right )}}{d} + \frac {A b^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} - \frac {B a^{2} \cos ^{2}{\left (c + d x \right )}}{2 d} + \frac {2 B a b \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {B b^{2} \sin ^{4}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\relax (c )}\right ) \left (a + b \sin {\relax (c )}\right )^{2} \cos {\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________