Optimal. Leaf size=301 \[ \frac {\left (9 a^2+4 b^2\right ) \cos ^3(c+d x)}{315 d}-\frac {\left (9 a^2+4 b^2\right ) \cos (c+d x)}{105 d}-\frac {a \left (10 a^2-29 b^2\right ) \sin ^5(c+d x) \cos (c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \sin ^4(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}-\frac {\left (15 a^4-44 a^2 b^2+6 b^4\right ) \sin ^4(c+d x) \cos (c+d x)}{630 b^2 d}+\frac {a \sin ^4(c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\sin ^5(c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{9 b d}-\frac {a b \sin ^3(c+d x) \cos (c+d x)}{32 d}-\frac {3 a b \sin (c+d x) \cos (c+d x)}{64 d}+\frac {3 a b x}{64} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.65, antiderivative size = 301, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2895, 3049, 3033, 3023, 2748, 2633, 2635, 8} \[ \frac {\left (9 a^2+4 b^2\right ) \cos ^3(c+d x)}{315 d}-\frac {\left (9 a^2+4 b^2\right ) \cos (c+d x)}{105 d}-\frac {a \left (10 a^2-29 b^2\right ) \sin ^5(c+d x) \cos (c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \sin ^4(c+d x) \cos (c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}-\frac {\left (-44 a^2 b^2+15 a^4+6 b^4\right ) \sin ^4(c+d x) \cos (c+d x)}{630 b^2 d}+\frac {a \sin ^4(c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\sin ^5(c+d x) \cos (c+d x) (a+b \sin (c+d x))^3}{9 b d}-\frac {a b \sin ^3(c+d x) \cos (c+d x)}{32 d}-\frac {3 a b \sin (c+d x) \cos (c+d x)}{64 d}+\frac {3 a b x}{64} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2748
Rule 2895
Rule 3023
Rule 3033
Rule 3049
Rubi steps
\begin {align*} \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x))^2 \, dx &=\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}-\frac {\int \sin ^3(c+d x) (a+b \sin (c+d x))^2 \left (24 \left (a^2-3 b^2\right )+2 a b \sin (c+d x)-10 \left (3 a^2-8 b^2\right ) \sin ^2(c+d x)\right ) \, dx}{72 b^2}\\ &=-\frac {5 \left (3 a^2-8 b^2\right ) \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}+\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}-\frac {\int \sin ^3(c+d x) (a+b \sin (c+d x)) \left (8 a \left (6 a^2-23 b^2\right )+2 b \left (a^2-12 b^2\right ) \sin (c+d x)-6 a \left (10 a^2-29 b^2\right ) \sin ^2(c+d x)\right ) \, dx}{504 b^2}\\ &=-\frac {a \left (10 a^2-29 b^2\right ) \cos (c+d x) \sin ^5(c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}+\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}-\frac {\int \sin ^3(c+d x) \left (48 a^2 \left (6 a^2-23 b^2\right )-378 a b^3 \sin (c+d x)-24 \left (15 a^4-44 a^2 b^2+6 b^4\right ) \sin ^2(c+d x)\right ) \, dx}{3024 b^2}\\ &=-\frac {\left (15 a^4-44 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin ^4(c+d x)}{630 b^2 d}-\frac {a \left (10 a^2-29 b^2\right ) \cos (c+d x) \sin ^5(c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}+\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}-\frac {\int \sin ^3(c+d x) \left (-144 b^2 \left (9 a^2+4 b^2\right )-1890 a b^3 \sin (c+d x)\right ) \, dx}{15120 b^2}\\ &=-\frac {\left (15 a^4-44 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin ^4(c+d x)}{630 b^2 d}-\frac {a \left (10 a^2-29 b^2\right ) \cos (c+d x) \sin ^5(c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}+\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}+\frac {1}{8} (a b) \int \sin ^4(c+d x) \, dx-\frac {1}{105} \left (-9 a^2-4 b^2\right ) \int \sin ^3(c+d x) \, dx\\ &=-\frac {a b \cos (c+d x) \sin ^3(c+d x)}{32 d}-\frac {\left (15 a^4-44 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin ^4(c+d x)}{630 b^2 d}-\frac {a \left (10 a^2-29 b^2\right ) \cos (c+d x) \sin ^5(c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}+\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}+\frac {1}{32} (3 a b) \int \sin ^2(c+d x) \, dx-\frac {\left (9 a^2+4 b^2\right ) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{105 d}\\ &=-\frac {\left (9 a^2+4 b^2\right ) \cos (c+d x)}{105 d}+\frac {\left (9 a^2+4 b^2\right ) \cos ^3(c+d x)}{315 d}-\frac {3 a b \cos (c+d x) \sin (c+d x)}{64 d}-\frac {a b \cos (c+d x) \sin ^3(c+d x)}{32 d}-\frac {\left (15 a^4-44 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin ^4(c+d x)}{630 b^2 d}-\frac {a \left (10 a^2-29 b^2\right ) \cos (c+d x) \sin ^5(c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}+\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}+\frac {1}{64} (3 a b) \int 1 \, dx\\ &=\frac {3 a b x}{64}-\frac {\left (9 a^2+4 b^2\right ) \cos (c+d x)}{105 d}+\frac {\left (9 a^2+4 b^2\right ) \cos ^3(c+d x)}{315 d}-\frac {3 a b \cos (c+d x) \sin (c+d x)}{64 d}-\frac {a b \cos (c+d x) \sin ^3(c+d x)}{32 d}-\frac {\left (15 a^4-44 a^2 b^2+6 b^4\right ) \cos (c+d x) \sin ^4(c+d x)}{630 b^2 d}-\frac {a \left (10 a^2-29 b^2\right ) \cos (c+d x) \sin ^5(c+d x)}{504 b d}-\frac {5 \left (3 a^2-8 b^2\right ) \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^2}{252 b^2 d}+\frac {a \cos (c+d x) \sin ^4(c+d x) (a+b \sin (c+d x))^3}{12 b^2 d}-\frac {\cos (c+d x) \sin ^5(c+d x) (a+b \sin (c+d x))^3}{9 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.96, size = 144, normalized size = 0.48 \[ \frac {-3780 \left (2 a^2+b^2\right ) \cos (c+d x)-840 \left (3 a^2+b^2\right ) \cos (3 (c+d x))+504 a^2 \cos (5 (c+d x))+360 a^2 \cos (7 (c+d x))-2520 a b \sin (4 (c+d x))+315 a b \sin (8 (c+d x))+7560 a b c+7560 a b d x+504 b^2 \cos (5 (c+d x))+90 b^2 \cos (7 (c+d x))-70 b^2 \cos (9 (c+d x))}{161280 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.91, size = 116, normalized size = 0.39 \[ -\frac {2240 \, b^{2} \cos \left (d x + c\right )^{9} - 2880 \, {\left (a^{2} + 2 \, b^{2}\right )} \cos \left (d x + c\right )^{7} + 4032 \, {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{5} - 945 \, a b d x - 315 \, {\left (16 \, a b \cos \left (d x + c\right )^{7} - 24 \, a b \cos \left (d x + c\right )^{5} + 2 \, a b \cos \left (d x + c\right )^{3} + 3 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{20160 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.37, size = 142, normalized size = 0.47 \[ \frac {3}{64} \, a b x - \frac {b^{2} \cos \left (9 \, d x + 9 \, c\right )}{2304 \, d} + \frac {a b \sin \left (8 \, d x + 8 \, c\right )}{512 \, d} - \frac {a b \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (4 \, a^{2} + b^{2}\right )} \cos \left (7 \, d x + 7 \, c\right )}{1792 \, d} + \frac {{\left (a^{2} + b^{2}\right )} \cos \left (5 \, d x + 5 \, c\right )}{320 \, d} - \frac {{\left (3 \, a^{2} + b^{2}\right )} \cos \left (3 \, d x + 3 \, c\right )}{192 \, d} - \frac {3 \, {\left (2 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )}{128 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.33, size = 161, normalized size = 0.53 \[ \frac {a^{2} \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 )+2 a b \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{8}-\frac {\sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )}{16}+\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 )}{64}+\frac {3 d x}{128}+\frac {3 c}{128}\right )+b^{2} \left (-\frac {\left (\sin ^{4}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{9}-\frac {4 \left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{63}-\frac {8 \left (\cos ^{5}\left (d x +c \right )\right )}{315}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 100, normalized size = 0.33 \[ \frac {4608 \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} a^{2} + 315 \, {\left (24 \, d x + 24 \, c + \sin \left (8 \, d x + 8 \, c\right ) - 8 \, \sin \left (4 \, d x + 4 \, c\right )\right )} a b - 512 \, {\left (35 \, \cos \left (d x + c\right )^{9} - 90 \, \cos \left (d x + c\right )^{7} + 63 \, \cos \left (d x + c\right )^{5}\right )} b^{2}}{161280 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.92, size = 309, normalized size = 1.03 \[ \frac {3\,a\,b\,x}{64}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,\left (4\,a^2-16\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}\,\left (4\,a^2+\frac {32\,b^2}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {28\,a^2}{5}-\frac {32\,b^2}{5}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {36\,a^2}{35}+\frac {16\,b^2}{35}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {4\,a^2}{35}+\frac {64\,b^2}{35}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (\frac {52\,a^2}{5}+\frac {112\,b^2}{5}\right )+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+\frac {4\,a^2}{35}+\frac {16\,b^2}{315}+\frac {13\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{16}-\frac {155\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{16}+\frac {169\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{16}-\frac {169\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{16}+\frac {155\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{16}-\frac {13\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}}{16}-\frac {3\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{17}}{32}+\frac {3\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{32}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^9} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 15.58, size = 335, normalized size = 1.11 \[ \begin {cases} - \frac {a^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{5 d} - \frac {2 a^{2} \cos ^{7}{\left (c + d x \right )}}{35 d} + \frac {3 a b x \sin ^{8}{\left (c + d x \right )}}{64} + \frac {3 a b x \sin ^{6}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {9 a b x \sin ^{4}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{32} + \frac {3 a b x \sin ^{2}{\left (c + d x \right )} \cos ^{6}{\left (c + d x \right )}}{16} + \frac {3 a b x \cos ^{8}{\left (c + d x \right )}}{64} + \frac {3 a b \sin ^{7}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{64 d} + \frac {11 a b \sin ^{5}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{64 d} - \frac {11 a b \sin ^{3}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{64 d} - \frac {3 a b \sin {\left (c + d x \right )} \cos ^{7}{\left (c + d x \right )}}{64 d} - \frac {b^{2} \sin ^{4}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{5 d} - \frac {4 b^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{7}{\left (c + d x \right )}}{35 d} - \frac {8 b^{2} \cos ^{9}{\left (c + d x \right )}}{315 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\relax (c )}\right )^{2} \sin ^{3}{\relax (c )} \cos ^{4}{\relax (c )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________