Integrand size = 30, antiderivative size = 161 \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=\frac {5 a b x}{8}-\frac {\left (a^2+b^2\right ) \cos (c+d x)}{d}+\frac {\left (2 a^2+3 b^2\right ) \cos ^3(c+d x)}{3 d}-\frac {\left (a^2+3 b^2\right ) \cos ^5(c+d x)}{5 d}+\frac {b^2 \cos ^7(c+d x)}{7 d}-\frac {5 a b \cos (c+d x) \sin (c+d x)}{8 d}-\frac {5 a b \cos (c+d x) \sin ^3(c+d x)}{12 d}-\frac {a b \cos (c+d x) \sin ^5(c+d x)}{3 d} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4478, 2868, 2715, 8, 3092, 380} \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=-\frac {\left (a^2+3 b^2\right ) \cos ^5(c+d x)}{5 d}+\frac {\left (2 a^2+3 b^2\right ) \cos ^3(c+d x)}{3 d}-\frac {\left (a^2+b^2\right ) \cos (c+d x)}{d}-\frac {a b \sin ^5(c+d x) \cos (c+d x)}{3 d}-\frac {5 a b \sin ^3(c+d x) \cos (c+d x)}{12 d}-\frac {5 a b \sin (c+d x) \cos (c+d x)}{8 d}+\frac {5 a b x}{8}+\frac {b^2 \cos ^7(c+d x)}{7 d} \]
[In]
[Out]
Rule 8
Rule 380
Rule 2715
Rule 2868
Rule 3092
Rule 4478
Rubi steps \begin{align*} \text {integral}& = \int \sin ^5(c+d x) (a+b \sin (c+d x))^2 \, dx \\ & = (2 a b) \int \sin ^6(c+d x) \, dx+\int \sin ^5(c+d x) \left (a^2+b^2 \sin ^2(c+d x)\right ) \, dx \\ & = -\frac {a b \cos (c+d x) \sin ^5(c+d x)}{3 d}+\frac {1}{3} (5 a b) \int \sin ^4(c+d x) \, dx-\frac {\text {Subst}\left (\int \left (1-x^2\right )^2 \left (a^2+b^2-b^2 x^2\right ) \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {5 a b \cos (c+d x) \sin ^3(c+d x)}{12 d}-\frac {a b \cos (c+d x) \sin ^5(c+d x)}{3 d}+\frac {1}{4} (5 a b) \int \sin ^2(c+d x) \, dx-\frac {\text {Subst}\left (\int \left (a^2 \left (1+\frac {b^2}{a^2}\right )-\left (2 a^2+3 b^2\right ) x^2+\left (a^2+3 b^2\right ) x^4-b^2 x^6\right ) \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {\left (a^2+b^2\right ) \cos (c+d x)}{d}+\frac {\left (2 a^2+3 b^2\right ) \cos ^3(c+d x)}{3 d}-\frac {\left (a^2+3 b^2\right ) \cos ^5(c+d x)}{5 d}+\frac {b^2 \cos ^7(c+d x)}{7 d}-\frac {5 a b \cos (c+d x) \sin (c+d x)}{8 d}-\frac {5 a b \cos (c+d x) \sin ^3(c+d x)}{12 d}-\frac {a b \cos (c+d x) \sin ^5(c+d x)}{3 d}+\frac {1}{8} (5 a b) \int 1 \, dx \\ & = \frac {5 a b x}{8}-\frac {\left (a^2+b^2\right ) \cos (c+d x)}{d}+\frac {\left (2 a^2+3 b^2\right ) \cos ^3(c+d x)}{3 d}-\frac {\left (a^2+3 b^2\right ) \cos ^5(c+d x)}{5 d}+\frac {b^2 \cos ^7(c+d x)}{7 d}-\frac {5 a b \cos (c+d x) \sin (c+d x)}{8 d}-\frac {5 a b \cos (c+d x) \sin ^3(c+d x)}{12 d}-\frac {a b \cos (c+d x) \sin ^5(c+d x)}{3 d} \\ \end{align*}
Time = 0.31 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.83 \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=\frac {4200 a b c+4200 a b d x-525 \left (8 a^2+7 b^2\right ) \cos (c+d x)+35 \left (20 a^2+21 b^2\right ) \cos (3 (c+d x))-84 a^2 \cos (5 (c+d x))-147 b^2 \cos (5 (c+d x))+15 b^2 \cos (7 (c+d x))-3150 a b \sin (2 (c+d x))+630 a b \sin (4 (c+d x))-70 a b \sin (6 (c+d x))}{6720 d} \]
[In]
[Out]
Time = 2.76 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.78
method | result | size |
derivativedivides | \(\frac {-\frac {b^{2} \left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )}{7}+2 a b \left (-\frac {\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )-\frac {a^{2} \left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )}{5}}{d}\) | \(125\) |
default | \(\frac {-\frac {b^{2} \left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )}{7}+2 a b \left (-\frac {\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )-\frac {a^{2} \left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )}{5}}{d}\) | \(125\) |
parts | \(-\frac {a^{2} \left (\frac {8}{3}+\sin \left (d x +c \right )^{4}+\frac {4 \sin \left (d x +c \right )^{2}}{3}\right ) \cos \left (d x +c \right )}{5 d}-\frac {b^{2} \left (\frac {16}{5}+\sin \left (d x +c \right )^{6}+\frac {6 \sin \left (d x +c \right )^{4}}{5}+\frac {8 \sin \left (d x +c \right )^{2}}{5}\right ) \cos \left (d x +c \right )}{7 d}+\frac {2 a b \left (-\frac {\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}\) | \(130\) |
parallelrisch | \(\frac {\left (700 a^{2}+735 b^{2}\right ) \cos \left (3 d x +3 c \right )+\left (-84 a^{2}-147 b^{2}\right ) \cos \left (5 d x +5 c \right )+15 b^{2} \cos \left (7 d x +7 c \right )-3150 a b \sin \left (2 d x +2 c \right )+630 a b \sin \left (4 d x +4 c \right )-70 a b \sin \left (6 d x +6 c \right )+\left (-4200 a^{2}-3675 b^{2}\right ) \cos \left (d x +c \right )+4200 x a b d -3584 a^{2}-3072 b^{2}}{6720 d}\) | \(136\) |
risch | \(\frac {5 x a b}{8}-\frac {5 a^{2} \cos \left (d x +c \right )}{8 d}-\frac {35 \cos \left (d x +c \right ) b^{2}}{64 d}+\frac {b^{2} \cos \left (7 d x +7 c \right )}{448 d}-\frac {a b \sin \left (6 d x +6 c \right )}{96 d}-\frac {\cos \left (5 d x +5 c \right ) a^{2}}{80 d}-\frac {7 \cos \left (5 d x +5 c \right ) b^{2}}{320 d}+\frac {3 a b \sin \left (4 d x +4 c \right )}{32 d}+\frac {5 \cos \left (3 d x +3 c \right ) a^{2}}{48 d}+\frac {7 \cos \left (3 d x +3 c \right ) b^{2}}{64 d}-\frac {15 a b \sin \left (2 d x +2 c \right )}{32 d}\) | \(168\) |
norman | \(\frac {-\frac {112 a^{2}+96 b^{2}}{105 d}+\frac {5 x a b}{8}-\frac {32 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{3 d}-\frac {\left (80 a^{2}+96 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{3 d}-\frac {\left (112 a^{2}+96 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{15 d}-\frac {\left (112 a^{2}+96 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{5 d}-\frac {5 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {25 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}-\frac {283 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}+\frac {283 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{12 d}+\frac {25 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{3 d}+\frac {5 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{4 d}+\frac {35 x a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{8}+\frac {105 x a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8}+\frac {175 x a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{8}+\frac {175 x a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8}+\frac {105 x a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{8}+\frac {35 x a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{8}+\frac {5 x a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}}{8}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{7}}\) | \(357\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.76 \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=\frac {120 \, b^{2} \cos \left (d x + c\right )^{7} - 168 \, {\left (a^{2} + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{5} + 525 \, a b d x + 280 \, {\left (2 \, a^{2} + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{3} - 840 \, {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right ) - 35 \, {\left (8 \, a b \cos \left (d x + c\right )^{5} - 26 \, a b \cos \left (d x + c\right )^{3} + 33 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{840 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 326 vs. \(2 (148) = 296\).
Time = 0.50 (sec) , antiderivative size = 326, normalized size of antiderivative = 2.02 \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=\begin {cases} - \frac {a^{2} \sin ^{4}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} - \frac {4 a^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {8 a^{2} \cos ^{5}{\left (c + d x \right )}}{15 d} + \frac {5 a b x \sin ^{6}{\left (c + d x \right )}}{8} + \frac {15 a b x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{8} + \frac {15 a b x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{8} + \frac {5 a b x \cos ^{6}{\left (c + d x \right )}}{8} - \frac {11 a b \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} - \frac {5 a b \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {5 a b \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{8 d} - \frac {b^{2} \sin ^{6}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} - \frac {2 b^{2} \sin ^{4}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{d} - \frac {8 b^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{5 d} - \frac {16 b^{2} \cos ^{7}{\left (c + d x \right )}}{35 d} & \text {for}\: d \neq 0 \\x \left (a \sin ^{2}{\left (c \right )} + b \sin ^{3}{\left (c \right )}\right )^{2} \sin {\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.81 \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=-\frac {224 \, {\left (3 \, \cos \left (d x + c\right )^{5} - 10 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )} a^{2} - 35 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 60 \, d x + 60 \, c + 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a b - 96 \, {\left (5 \, \cos \left (d x + c\right )^{7} - 21 \, \cos \left (d x + c\right )^{5} + 35 \, \cos \left (d x + c\right )^{3} - 35 \, \cos \left (d x + c\right )\right )} b^{2}}{3360 \, d} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.89 \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=\frac {5}{8} \, a b x + \frac {b^{2} \cos \left (7 \, d x + 7 \, c\right )}{448 \, d} - \frac {a b \sin \left (6 \, d x + 6 \, c\right )}{96 \, d} + \frac {3 \, a b \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} - \frac {15 \, a b \sin \left (2 \, d x + 2 \, c\right )}{32 \, d} - \frac {{\left (4 \, a^{2} + 7 \, b^{2}\right )} \cos \left (5 \, d x + 5 \, c\right )}{320 \, d} + \frac {{\left (20 \, a^{2} + 21 \, b^{2}\right )} \cos \left (3 \, d x + 3 \, c\right )}{192 \, d} - \frac {5 \, {\left (8 \, a^{2} + 7 \, b^{2}\right )} \cos \left (d x + c\right )}{64 \, d} \]
[In]
[Out]
Time = 30.88 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.30 \[ \int \sin (c+d x) \left (a \sin ^2(c+d x)+b \sin ^3(c+d x)\right )^2 \, dx=\frac {5\,a\,b\,x}{8}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {80\,a^2}{3}+32\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {112\,a^2}{15}+\frac {32\,b^2}{5}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {112\,a^2}{5}+\frac {96\,b^2}{5}\right )+\frac {32\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{3}+\frac {16\,a^2}{15}+\frac {32\,b^2}{35}+\frac {25\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\frac {283\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{12}-\frac {283\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{12}-\frac {25\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{3}-\frac {5\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{4}+\frac {5\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^7} \]
[In]
[Out]