Optimal. Leaf size=89 \[ \frac {(a \sin (c+d x)+a)^8}{8 a^6 d}-\frac {5 (a \sin (c+d x)+a)^7}{7 a^5 d}+\frac {4 (a \sin (c+d x)+a)^6}{3 a^4 d}-\frac {4 (a \sin (c+d x)+a)^5}{5 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 89, 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 = {2836, 12, 77} \[ \frac {(a \sin (c+d x)+a)^8}{8 a^6 d}-\frac {5 (a \sin (c+d x)+a)^7}{7 a^5 d}+\frac {4 (a \sin (c+d x)+a)^6}{3 a^4 d}-\frac {4 (a \sin (c+d x)+a)^5}{5 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 77
Rule 2836
Rubi steps
\begin {align*} \int \cos ^5(c+d x) \sin (c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {(a-x)^2 x (a+x)^4}{a} \, dx,x,a \sin (c+d x)\right )}{a^5 d}\\ &=\frac {\operatorname {Subst}\left (\int (a-x)^2 x (a+x)^4 \, dx,x,a \sin (c+d x)\right )}{a^6 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-4 a^3 (a+x)^4+8 a^2 (a+x)^5-5 a (a+x)^6+(a+x)^7\right ) \, dx,x,a \sin (c+d x)\right )}{a^6 d}\\ &=-\frac {4 (a+a \sin (c+d x))^5}{5 a^3 d}+\frac {4 (a+a \sin (c+d x))^6}{3 a^4 d}-\frac {5 (a+a \sin (c+d x))^7}{7 a^5 d}+\frac {(a+a \sin (c+d x))^8}{8 a^6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.32, size = 90, normalized size = 1.01 \[ -\frac {a^2 (-16800 \sin (c+d x)+1120 \sin (3 (c+d x))+2016 \sin (5 (c+d x))+480 \sin (7 (c+d x))+10920 \cos (2 (c+d x))+3780 \cos (4 (c+d x))+280 \cos (6 (c+d x))-105 \cos (8 (c+d x))-2590)}{107520 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.73, size = 85, normalized size = 0.96 \[ \frac {105 \, a^{2} \cos \left (d x + c\right )^{8} - 280 \, a^{2} \cos \left (d x + c\right )^{6} - 16 \, {\left (15 \, a^{2} \cos \left (d x + c\right )^{6} - 3 \, a^{2} \cos \left (d x + c\right )^{4} - 4 \, a^{2} \cos \left (d x + c\right )^{2} - 8 \, a^{2}\right )} \sin \left (d x + c\right )}{840 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 134, normalized size = 1.51 \[ \frac {a^{2} \cos \left (8 \, d x + 8 \, c\right )}{1024 \, d} - \frac {a^{2} \cos \left (6 \, d x + 6 \, c\right )}{384 \, d} - \frac {9 \, a^{2} \cos \left (4 \, d x + 4 \, c\right )}{256 \, d} - \frac {13 \, a^{2} \cos \left (2 \, d x + 2 \, c\right )}{128 \, d} - \frac {a^{2} \sin \left (7 \, d x + 7 \, c\right )}{224 \, d} - \frac {3 \, a^{2} \sin \left (5 \, d x + 5 \, c\right )}{160 \, d} - \frac {a^{2} \sin \left (3 \, d x + 3 \, c\right )}{96 \, d} + \frac {5 \, a^{2} \sin \left (d x + c\right )}{32 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 102, normalized size = 1.15 \[ \frac {a^{2} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{6}\left (d x +c \right )\right )}{8}-\frac {\left (\cos ^{6}\left (d x +c \right )\right )}{24}\right )+2 a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {a^{2} \left (\cos ^{6}\left (d x +c \right )\right )}{6}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 97, normalized size = 1.09 \[ \frac {105 \, a^{2} \sin \left (d x + c\right )^{8} + 240 \, a^{2} \sin \left (d x + c\right )^{7} - 140 \, a^{2} \sin \left (d x + c\right )^{6} - 672 \, a^{2} \sin \left (d x + c\right )^{5} - 210 \, a^{2} \sin \left (d x + c\right )^{4} + 560 \, a^{2} \sin \left (d x + c\right )^{3} + 420 \, a^{2} \sin \left (d x + c\right )^{2}}{840 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.81, size = 96, normalized size = 1.08 \[ \frac {\frac {a^2\,{\sin \left (c+d\,x\right )}^8}{8}+\frac {2\,a^2\,{\sin \left (c+d\,x\right )}^7}{7}-\frac {a^2\,{\sin \left (c+d\,x\right )}^6}{6}-\frac {4\,a^2\,{\sin \left (c+d\,x\right )}^5}{5}-\frac {a^2\,{\sin \left (c+d\,x\right )}^4}{4}+\frac {2\,a^2\,{\sin \left (c+d\,x\right )}^3}{3}+\frac {a^2\,{\sin \left (c+d\,x\right )}^2}{2}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 9.88, size = 139, normalized size = 1.56 \[ \begin {cases} \frac {16 a^{2} \sin ^{7}{\left (c + d x \right )}}{105 d} + \frac {8 a^{2} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{15 d} + \frac {2 a^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{3 d} - \frac {a^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{6}{\left (c + d x \right )}}{6 d} - \frac {a^{2} \cos ^{8}{\left (c + d x \right )}}{24 d} - \frac {a^{2} \cos ^{6}{\left (c + d x \right )}}{6 d} & \text {for}\: d \neq 0 \\x \left (a \sin {\relax (c )} + a\right )^{2} \sin {\relax (c )} \cos ^{5}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________