Optimal. Leaf size=158 \[ -\frac {b \left (17 a^2+4 b^2\right ) \cos ^5(c+d x)}{70 d}+\frac {a \left (2 a^2+b^2\right ) \sin (c+d x) \cos ^3(c+d x)}{8 d}+\frac {3 a \left (2 a^2+b^2\right ) \sin (c+d x) \cos (c+d x)}{16 d}+\frac {3}{16} a x \left (2 a^2+b^2\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}-\frac {3 a b \cos ^5(c+d x) (a+b \sin (c+d x))}{14 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2692, 2862, 2669, 2635, 8} \[ -\frac {b \left (17 a^2+4 b^2\right ) \cos ^5(c+d x)}{70 d}+\frac {a \left (2 a^2+b^2\right ) \sin (c+d x) \cos ^3(c+d x)}{8 d}+\frac {3 a \left (2 a^2+b^2\right ) \sin (c+d x) \cos (c+d x)}{16 d}+\frac {3}{16} a x \left (2 a^2+b^2\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}-\frac {3 a b \cos ^5(c+d x) (a+b \sin (c+d x))}{14 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2669
Rule 2692
Rule 2862
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+b \sin (c+d x))^3 \, dx &=-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}+\frac {1}{7} \int \cos ^4(c+d x) (a+b \sin (c+d x)) \left (7 a^2+2 b^2+9 a b \sin (c+d x)\right ) \, dx\\ &=-\frac {3 a b \cos ^5(c+d x) (a+b \sin (c+d x))}{14 d}-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}+\frac {1}{42} \int \cos ^4(c+d x) \left (21 a \left (2 a^2+b^2\right )+3 b \left (17 a^2+4 b^2\right ) \sin (c+d x)\right ) \, dx\\ &=-\frac {b \left (17 a^2+4 b^2\right ) \cos ^5(c+d x)}{70 d}-\frac {3 a b \cos ^5(c+d x) (a+b \sin (c+d x))}{14 d}-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}+\frac {1}{2} \left (a \left (2 a^2+b^2\right )\right ) \int \cos ^4(c+d x) \, dx\\ &=-\frac {b \left (17 a^2+4 b^2\right ) \cos ^5(c+d x)}{70 d}+\frac {a \left (2 a^2+b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{8 d}-\frac {3 a b \cos ^5(c+d x) (a+b \sin (c+d x))}{14 d}-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}+\frac {1}{8} \left (3 a \left (2 a^2+b^2\right )\right ) \int \cos ^2(c+d x) \, dx\\ &=-\frac {b \left (17 a^2+4 b^2\right ) \cos ^5(c+d x)}{70 d}+\frac {3 a \left (2 a^2+b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {a \left (2 a^2+b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{8 d}-\frac {3 a b \cos ^5(c+d x) (a+b \sin (c+d x))}{14 d}-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}+\frac {1}{16} \left (3 a \left (2 a^2+b^2\right )\right ) \int 1 \, dx\\ &=\frac {3}{16} a \left (2 a^2+b^2\right ) x-\frac {b \left (17 a^2+4 b^2\right ) \cos ^5(c+d x)}{70 d}+\frac {3 a \left (2 a^2+b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {a \left (2 a^2+b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{8 d}-\frac {3 a b \cos ^5(c+d x) (a+b \sin (c+d x))}{14 d}-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))^2}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.38, size = 182, normalized size = 1.15 \[ \frac {560 a^3 \sin (2 (c+d x))+70 a^3 \sin (4 (c+d x))+840 a^3 c+840 a^3 d x-35 \left (12 a^2 b+b^3\right ) \cos (3 (c+d x))-105 b \left (8 a^2+b^2\right ) \cos (c+d x)-84 a^2 b \cos (5 (c+d x))+105 a b^2 \sin (2 (c+d x))-105 a b^2 \sin (4 (c+d x))-35 a b^2 \sin (6 (c+d x))+420 a b^2 c+420 a b^2 d x+7 b^3 \cos (5 (c+d x))+5 b^3 \cos (7 (c+d x))}{2240 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 117, normalized size = 0.74 \[ \frac {80 \, b^{3} \cos \left (d x + c\right )^{7} - 112 \, {\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{5} + 105 \, {\left (2 \, a^{3} + a b^{2}\right )} d x - 35 \, {\left (8 \, a b^{2} \cos \left (d x + c\right )^{5} - 2 \, {\left (2 \, a^{3} + a b^{2}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, a^{3} + a b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{560 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.26, size = 173, normalized size = 1.09 \[ \frac {b^{3} \cos \left (7 \, d x + 7 \, c\right )}{448 \, d} - \frac {a b^{2} \sin \left (6 \, d x + 6 \, c\right )}{64 \, d} + \frac {3}{16} \, {\left (2 \, a^{3} + a b^{2}\right )} x - \frac {{\left (12 \, a^{2} b - b^{3}\right )} \cos \left (5 \, d x + 5 \, c\right )}{320 \, d} - \frac {{\left (12 \, a^{2} b + b^{3}\right )} \cos \left (3 \, d x + 3 \, c\right )}{64 \, d} - \frac {3 \, {\left (8 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )}{64 \, d} + \frac {{\left (2 \, a^{3} - 3 \, a b^{2}\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (16 \, a^{3} + 3 \, a b^{2}\right )} \sin \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.28, size = 145, normalized size = 0.92 \[ \frac {b^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )+3 a \,b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )-\frac {3 a^{2} b \left (\cos ^{5}\left (d x +c \right )\right )}{5}+a^{3} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 117, normalized size = 0.74 \[ -\frac {1344 \, a^{2} b \cos \left (d x + c\right )^{5} - 70 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} - 35 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 12 \, d x + 12 \, c - 3 \, \sin \left (4 \, d x + 4 \, c\right )\right )} a b^{2} - 64 \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} b^{3}}{2240 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.93, size = 474, normalized size = 3.00 \[ \frac {3\,a\,\mathrm {atan}\left (\frac {3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2+b^2\right )}{8\,\left (\frac {3\,a^3}{4}+\frac {3\,a\,b^2}{8}\right )}\right )\,\left (2\,a^2+b^2\right )}{8\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,a\,b^2}{8}-\frac {5\,a^3}{4}\right )+\frac {6\,a^2\,b}{5}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,a^3+\frac {11\,a\,b^2}{2}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\left (3\,a^3+\frac {11\,a\,b^2}{2}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}\,\left (\frac {3\,a\,b^2}{8}-\frac {5\,a^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {31\,a\,b^2}{8}-\frac {9\,a^3}{4}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (\frac {31\,a\,b^2}{8}-\frac {9\,a^3}{4}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,\left (12\,a^2\,b+4\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {12\,a^2\,b}{5}+\frac {4\,b^3}{5}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (18\,a^2\,b-4\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (24\,a^2\,b+8\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {66\,a^2\,b}{5}-\frac {8\,b^3}{5}\right )+\frac {4\,b^3}{35}+6\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {3\,a\,\left (2\,a^2+b^2\right )\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\frac {d\,x}{2}\right )}{8\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 8.67, size = 348, normalized size = 2.20 \[ \begin {cases} \frac {3 a^{3} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 a^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 a^{3} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 a^{3} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 a^{3} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} - \frac {3 a^{2} b \cos ^{5}{\left (c + d x \right )}}{5 d} + \frac {3 a b^{2} x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {9 a b^{2} x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {9 a b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {3 a b^{2} x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {3 a b^{2} \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} + \frac {a b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{2 d} - \frac {3 a b^{2} \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} - \frac {b^{3} \sin ^{2}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{5 d} - \frac {2 b^{3} \cos ^{7}{\left (c + d x \right )}}{35 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\relax (c )}\right )^{3} \cos ^{4}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________