Optimal. Leaf size=107 \[ -\frac {b \left (16 a^2+b^2\right ) \cos (2 c+2 d x)}{24 d}+\frac {1}{8} a x \left (8 a^2+3 b^2\right )-\frac {5 a b^2 \sin (2 c+2 d x) \cos (2 c+2 d x)}{48 d}-\frac {b \cos (2 c+2 d x) (2 a+b \sin (2 c+2 d x))^2}{48 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2666, 2656, 2734} \[ -\frac {b \left (16 a^2+b^2\right ) \cos (2 c+2 d x)}{24 d}+\frac {1}{8} a x \left (8 a^2+3 b^2\right )-\frac {5 a b^2 \sin (2 c+2 d x) \cos (2 c+2 d x)}{48 d}-\frac {b \cos (2 c+2 d x) (2 a+b \sin (2 c+2 d x))^2}{48 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2656
Rule 2666
Rule 2734
Rubi steps
\begin {align*} \int (a+b \cos (c+d x) \sin (c+d x))^3 \, dx &=\int \left (a+\frac {1}{2} b \sin (2 c+2 d x)\right )^3 \, dx\\ &=-\frac {b \cos (2 c+2 d x) (2 a+b \sin (2 c+2 d x))^2}{48 d}+\frac {1}{3} \int \left (a+\frac {1}{2} b \sin (2 c+2 d x)\right ) \left (\frac {1}{2} \left (6 a^2+b^2\right )+\frac {5}{2} a b \sin (2 c+2 d x)\right ) \, dx\\ &=\frac {1}{8} a \left (8 a^2+3 b^2\right ) x-\frac {b \left (16 a^2+b^2\right ) \cos (2 c+2 d x)}{24 d}-\frac {5 a b^2 \cos (2 c+2 d x) \sin (2 c+2 d x)}{48 d}-\frac {b \cos (2 c+2 d x) (2 a+b \sin (2 c+2 d x))^2}{48 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.27, size = 75, normalized size = 0.70 \[ \frac {-9 \left (16 a^2 b+b^3\right ) \cos (2 (c+d x))+6 a \left (4 \left (8 a^2+3 b^2\right ) (c+d x)-3 b^2 \sin (4 (c+d x))\right )+b^3 \cos (6 (c+d x))}{192 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.75, size = 97, normalized size = 0.91 \[ \frac {4 \, b^{3} \cos \left (d x + c\right )^{6} - 6 \, b^{3} \cos \left (d x + c\right )^{4} - 36 \, a^{2} b \cos \left (d x + c\right )^{2} + 3 \, {\left (8 \, a^{3} + 3 \, a b^{2}\right )} d x - 9 \, {\left (2 \, a b^{2} \cos \left (d x + c\right )^{3} - a b^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 75, normalized size = 0.70 \[ \frac {b^{3} \cos \left (6 \, d x + 6 \, c\right )}{192 \, d} - \frac {3 \, a b^{2} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {1}{8} \, {\left (8 \, a^{3} + 3 \, a b^{2}\right )} x - \frac {3 \, {\left (16 \, a^{2} b + b^{3}\right )} \cos \left (2 \, d x + 2 \, c\right )}{64 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 106, normalized size = 0.99 \[ \frac {b^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{6}-\frac {\left (\cos ^{4}\left (d x +c \right )\right )}{12}\right )+3 a \,b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-\frac {3 \left (\cos ^{2}\left (d x +c \right )\right ) a^{2} b}{2}+a^{3} \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.38, size = 80, normalized size = 0.75 \[ a^{3} x - \frac {3 \, a^{2} b \cos \left (d x + c\right )^{2}}{2 \, d} + \frac {3 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a b^{2}}{32 \, d} - \frac {{\left (2 \, \sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4}\right )} b^{3}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.44, size = 125, normalized size = 1.17 \[ a^3\,x-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (72\,a^2\,b+6\,b^3\right )+36\,a^2\,b+2\,b^3+36\,a^2\,b\,{\mathrm {tan}\left (c+d\,x\right )}^4-9\,a\,b^2\,{\mathrm {tan}\left (c+d\,x\right )}^5+9\,a\,b^2\,\mathrm {tan}\left (c+d\,x\right )}{d\,\left (24\,{\mathrm {tan}\left (c+d\,x\right )}^6+72\,{\mathrm {tan}\left (c+d\,x\right )}^4+72\,{\mathrm {tan}\left (c+d\,x\right )}^2+24\right )}+\frac {3\,a\,b^2\,x}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.36, size = 190, normalized size = 1.78 \[ \begin {cases} a^{3} x - \frac {3 a^{2} b \cos ^{2}{\left (c + d x \right )}}{2 d} + \frac {3 a b^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 a b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 a b^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 a b^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} - \frac {3 a b^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {b^{3} \sin ^{6}{\left (c + d x \right )}}{12 d} + \frac {b^{3} \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\relax (c )} \cos {\relax (c )}\right )^{3} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________