Optimal. Leaf size=78 \[ -\frac {B (a \sin (c+d x)+a)^5}{5 a^4 d}-\frac {(A-3 B) (a \sin (c+d x)+a)^4}{4 a^3 d}+\frac {2 (A-B) (a \sin (c+d x)+a)^3}{3 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 78, 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 = {2836, 77} \[ -\frac {(A-3 B) (a \sin (c+d x)+a)^4}{4 a^3 d}+\frac {2 (A-B) (a \sin (c+d x)+a)^3}{3 a^2 d}-\frac {B (a \sin (c+d x)+a)^5}{5 a^4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 2836
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+a \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac {\operatorname {Subst}\left (\int (a-x) (a+x)^2 \left (A+\frac {B x}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (2 a (A-B) (a+x)^2+(-A+3 B) (a+x)^3-\frac {B (a+x)^4}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {2 (A-B) (a+a \sin (c+d x))^3}{3 a^2 d}-\frac {(A-3 B) (a+a \sin (c+d x))^4}{4 a^3 d}-\frac {B (a+a \sin (c+d x))^5}{5 a^4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.81, size = 78, normalized size = 1.00 \[ -\frac {a (-4 (100 A+11 B) \sin (c+d x)+3 \cos (4 (c+d x)) (5 (A+B)+4 B \sin (c+d x))+\cos (2 (c+d x)) ((32 B-80 A) \sin (c+d x)+60 (A+B)))}{480 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.79, size = 65, normalized size = 0.83 \[ -\frac {15 \, {\left (A + B\right )} a \cos \left (d x + c\right )^{4} + 4 \, {\left (3 \, B a \cos \left (d x + c\right )^{4} - {\left (5 \, A + B\right )} a \cos \left (d x + c\right )^{2} - 2 \, {\left (5 \, A + B\right )} a\right )} \sin \left (d x + c\right )}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 100, normalized size = 1.28 \[ -\frac {12 \, B a \sin \left (d x + c\right )^{5} + 15 \, A a \sin \left (d x + c\right )^{4} + 15 \, B a \sin \left (d x + c\right )^{4} + 20 \, A a \sin \left (d x + c\right )^{3} - 20 \, B a \sin \left (d x + c\right )^{3} - 30 \, A a \sin \left (d x + c\right )^{2} - 30 \, B a \sin \left (d x + c\right )^{2} - 60 \, A a \sin \left (d x + c\right )}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.46, size = 88, normalized size = 1.13 \[ \frac {a B \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {a A \left (\cos ^{4}\left (d x +c \right )\right )}{4}-\frac {a B \left (\cos ^{4}\left (d x +c \right )\right )}{4}+\frac {a A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 72, normalized size = 0.92 \[ -\frac {12 \, B a \sin \left (d x + c\right )^{5} + 15 \, {\left (A + B\right )} a \sin \left (d x + c\right )^{4} + 20 \, {\left (A - B\right )} a \sin \left (d x + c\right )^{3} - 30 \, {\left (A + B\right )} a \sin \left (d x + c\right )^{2} - 60 \, A a \sin \left (d x + c\right )}{60 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.01, size = 72, normalized size = 0.92 \[ -\frac {\frac {B\,a\,{\sin \left (c+d\,x\right )}^5}{5}+\frac {a\,\left (A+B\right )\,{\sin \left (c+d\,x\right )}^4}{4}+\frac {a\,\left (A-B\right )\,{\sin \left (c+d\,x\right )}^3}{3}-\frac {a\,\left (A+B\right )\,{\sin \left (c+d\,x\right )}^2}{2}-A\,a\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.77, size = 128, normalized size = 1.64 \[ \begin {cases} \frac {2 A a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {A a \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac {A a \cos ^{4}{\left (c + d x \right )}}{4 d} + \frac {2 B a \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {B a \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} - \frac {B a \cos ^{4}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\relax (c )}\right ) \left (a \sin {\relax (c )} + a\right ) \cos ^{3}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________