Integrand size = 31, antiderivative size = 231 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {\left (a^2-b^2\right )^2 (A b-a B) (a+b \sin (c+d x))^3}{3 b^6 d}-\frac {\left (a^2-b^2\right ) \left (4 a A b-5 a^2 B+b^2 B\right ) (a+b \sin (c+d x))^4}{4 b^6 d}+\frac {2 \left (3 a^2 A b-A b^3-5 a^3 B+3 a b^2 B\right ) (a+b \sin (c+d x))^5}{5 b^6 d}-\frac {\left (2 a A b-5 a^2 B+b^2 B\right ) (a+b \sin (c+d x))^6}{3 b^6 d}+\frac {(A b-5 a B) (a+b \sin (c+d x))^7}{7 b^6 d}+\frac {B (a+b \sin (c+d x))^8}{8 b^6 d} \] Output:
1/3*(a^2-b^2)^2*(A*b-B*a)*(a+b*sin(d*x+c))^3/b^6/d-1/4*(a^2-b^2)*(4*A*a*b- 5*B*a^2+B*b^2)*(a+b*sin(d*x+c))^4/b^6/d+2/5*(3*A*a^2*b-A*b^3-5*B*a^3+3*B*a *b^2)*(a+b*sin(d*x+c))^5/b^6/d-1/3*(2*A*a*b-5*B*a^2+B*b^2)*(a+b*sin(d*x+c) )^6/b^6/d+1/7*(A*b-5*B*a)*(a+b*sin(d*x+c))^7/b^6/d+1/8*B*(a+b*sin(d*x+c))^ 8/b^6/d
Time = 0.53 (sec) , antiderivative size = 227, normalized size of antiderivative = 0.98 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {a^4 \left (3 a^4-28 a^2 b^2+210 b^4\right ) B+840 a^2 A b^6 \sin (c+d x)+420 a b^6 (2 A b+a B) \sin ^2(c+d x)+280 b^6 \left (-2 a^2 A+A b^2+2 a b B\right ) \sin ^3(c+d x)+210 b^6 \left (-4 a A b-2 a^2 B+b^2 B\right ) \sin ^4(c+d x)+168 b^6 \left (a^2 A-2 A b^2-4 a b B\right ) \sin ^5(c+d x)+140 b^6 \left (2 a A b+a^2 B-2 b^2 B\right ) \sin ^6(c+d x)+120 b^7 (A b+2 a B) \sin ^7(c+d x)+105 b^8 B \sin ^8(c+d x)}{840 b^6 d} \] Input:
Integrate[Cos[c + d*x]^5*(a + b*Sin[c + d*x])^2*(A + B*Sin[c + d*x]),x]
Output:
(a^4*(3*a^4 - 28*a^2*b^2 + 210*b^4)*B + 840*a^2*A*b^6*Sin[c + d*x] + 420*a *b^6*(2*A*b + a*B)*Sin[c + d*x]^2 + 280*b^6*(-2*a^2*A + A*b^2 + 2*a*b*B)*S in[c + d*x]^3 + 210*b^6*(-4*a*A*b - 2*a^2*B + b^2*B)*Sin[c + d*x]^4 + 168* b^6*(a^2*A - 2*A*b^2 - 4*a*b*B)*Sin[c + d*x]^5 + 140*b^6*(2*a*A*b + a^2*B - 2*b^2*B)*Sin[c + d*x]^6 + 120*b^7*(A*b + 2*a*B)*Sin[c + d*x]^7 + 105*b^8 *B*Sin[c + d*x]^8)/(840*b^6*d)
Time = 0.48 (sec) , antiderivative size = 202, normalized size of antiderivative = 0.87, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3042, 3316, 27, 652, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^5 (a+b \sin (c+d x))^2 (A+B \sin (c+d x))dx\) |
\(\Big \downarrow \) 3316 |
\(\displaystyle \frac {\int \frac {(a+b \sin (c+d x))^2 (A b+B \sin (c+d x) b) \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b}d(b \sin (c+d x))}{b^5 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int (a+b \sin (c+d x))^2 (A b+B \sin (c+d x) b) \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^6 d}\) |
\(\Big \downarrow \) 652 |
\(\displaystyle \frac {\int \left (B (a+b \sin (c+d x))^7+(A b-5 a B) (a+b \sin (c+d x))^6+2 \left (5 B a^2-2 A b a-b^2 B\right ) (a+b \sin (c+d x))^5-2 \left (5 B a^3-3 A b a^2-3 b^2 B a+A b^3\right ) (a+b \sin (c+d x))^4+\left (a^2-b^2\right ) \left (5 B a^2-4 A b a-b^2 B\right ) (a+b \sin (c+d x))^3-\left (a^2-b^2\right )^2 (a B-A b) (a+b \sin (c+d x))^2\right )d(b \sin (c+d x))}{b^6 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\frac {1}{3} \left (-5 a^2 B+2 a A b+b^2 B\right ) (a+b \sin (c+d x))^6-\frac {1}{4} \left (a^2-b^2\right ) \left (-5 a^2 B+4 a A b+b^2 B\right ) (a+b \sin (c+d x))^4+\frac {1}{3} \left (a^2-b^2\right )^2 (A b-a B) (a+b \sin (c+d x))^3+\frac {2}{5} \left (-5 a^3 B+3 a^2 A b+3 a b^2 B-A b^3\right ) (a+b \sin (c+d x))^5+\frac {1}{7} (A b-5 a B) (a+b \sin (c+d x))^7+\frac {1}{8} B (a+b \sin (c+d x))^8}{b^6 d}\) |
Input:
Int[Cos[c + d*x]^5*(a + b*Sin[c + d*x])^2*(A + B*Sin[c + d*x]),x]
Output:
(((a^2 - b^2)^2*(A*b - a*B)*(a + b*Sin[c + d*x])^3)/3 - ((a^2 - b^2)*(4*a* A*b - 5*a^2*B + b^2*B)*(a + b*Sin[c + d*x])^4)/4 + (2*(3*a^2*A*b - A*b^3 - 5*a^3*B + 3*a*b^2*B)*(a + b*Sin[c + d*x])^5)/5 - ((2*a*A*b - 5*a^2*B + b^ 2*B)*(a + b*Sin[c + d*x])^6)/3 + ((A*b - 5*a*B)*(a + b*Sin[c + d*x])^7)/7 + (B*(a + b*Sin[c + d*x])^8)/8)/(b^6*d)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (c_.)*(x_ )^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + c *x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] && IGtQ[p, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) /2] && NeQ[a^2 - b^2, 0]
Time = 0.20 (sec) , antiderivative size = 181, normalized size of antiderivative = 0.78
\[\frac {\frac {B \,b^{2} \sin \left (d x +c \right )^{8}}{8}+\frac {\left (b^{2} A +2 a b B \right ) \sin \left (d x +c \right )^{7}}{7}+\frac {\left (\left (a^{2}-2 b^{2}\right ) B +2 A a b \right ) \sin \left (d x +c \right )^{6}}{6}+\frac {\left (-4 a b B +\left (a^{2}-2 b^{2}\right ) A \right ) \sin \left (d x +c \right )^{5}}{5}+\frac {\left (\left (-2 a^{2}+b^{2}\right ) B -4 A a b \right ) \sin \left (d x +c \right )^{4}}{4}+\frac {\left (2 a b B +\left (-2 a^{2}+b^{2}\right ) A \right ) \sin \left (d x +c \right )^{3}}{3}+\frac {\left (2 A a b +a^{2} B \right ) \sin \left (d x +c \right )^{2}}{2}+\sin \left (d x +c \right ) A \,a^{2}}{d}\]
Input:
int(cos(d*x+c)^5*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x)
Output:
1/d*(1/8*B*b^2*sin(d*x+c)^8+1/7*(A*b^2+2*B*a*b)*sin(d*x+c)^7+1/6*((a^2-2*b ^2)*B+2*A*a*b)*sin(d*x+c)^6+1/5*(-4*a*b*B+(a^2-2*b^2)*A)*sin(d*x+c)^5+1/4* ((-2*a^2+b^2)*B-4*A*a*b)*sin(d*x+c)^4+1/3*(2*a*b*B+(-2*a^2+b^2)*A)*sin(d*x +c)^3+1/2*(2*A*a*b+B*a^2)*sin(d*x+c)^2+sin(d*x+c)*A*a^2)
Time = 0.10 (sec) , antiderivative size = 147, normalized size of antiderivative = 0.64 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {105 \, B b^{2} \cos \left (d x + c\right )^{8} - 140 \, {\left (B a^{2} + 2 \, A a b + B b^{2}\right )} \cos \left (d x + c\right )^{6} - 8 \, {\left (15 \, {\left (2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{6} - 3 \, {\left (7 \, A a^{2} + 2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{4} - 56 \, A a^{2} - 16 \, B a b - 8 \, A b^{2} - 4 \, {\left (7 \, A a^{2} + 2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{840 \, d} \] Input:
integrate(cos(d*x+c)^5*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="f ricas")
Output:
1/840*(105*B*b^2*cos(d*x + c)^8 - 140*(B*a^2 + 2*A*a*b + B*b^2)*cos(d*x + c)^6 - 8*(15*(2*B*a*b + A*b^2)*cos(d*x + c)^6 - 3*(7*A*a^2 + 2*B*a*b + A*b ^2)*cos(d*x + c)^4 - 56*A*a^2 - 16*B*a*b - 8*A*b^2 - 4*(7*A*a^2 + 2*B*a*b + A*b^2)*cos(d*x + c)^2)*sin(d*x + c))/d
Time = 0.71 (sec) , antiderivative size = 335, normalized size of antiderivative = 1.45 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\begin {cases} \frac {8 A a^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {4 A a^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {A a^{2} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} - \frac {A a b \cos ^{6}{\left (c + d x \right )}}{3 d} + \frac {8 A b^{2} \sin ^{7}{\left (c + d x \right )}}{105 d} + \frac {4 A b^{2} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{15 d} + \frac {A b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{3 d} - \frac {B a^{2} \cos ^{6}{\left (c + d x \right )}}{6 d} + \frac {16 B a b \sin ^{7}{\left (c + d x \right )}}{105 d} + \frac {8 B a b \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{15 d} + \frac {2 B a b \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{3 d} + \frac {B b^{2} \sin ^{8}{\left (c + d x \right )}}{24 d} + \frac {B b^{2} \sin ^{6}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{6 d} + \frac {B b^{2} \sin ^{4}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\left (c \right )}\right ) \left (a + b \sin {\left (c \right )}\right )^{2} \cos ^{5}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**5*(a+b*sin(d*x+c))**2*(A+B*sin(d*x+c)),x)
Output:
Piecewise((8*A*a**2*sin(c + d*x)**5/(15*d) + 4*A*a**2*sin(c + d*x)**3*cos( c + d*x)**2/(3*d) + A*a**2*sin(c + d*x)*cos(c + d*x)**4/d - A*a*b*cos(c + d*x)**6/(3*d) + 8*A*b**2*sin(c + d*x)**7/(105*d) + 4*A*b**2*sin(c + d*x)** 5*cos(c + d*x)**2/(15*d) + A*b**2*sin(c + d*x)**3*cos(c + d*x)**4/(3*d) - B*a**2*cos(c + d*x)**6/(6*d) + 16*B*a*b*sin(c + d*x)**7/(105*d) + 8*B*a*b* sin(c + d*x)**5*cos(c + d*x)**2/(15*d) + 2*B*a*b*sin(c + d*x)**3*cos(c + d *x)**4/(3*d) + B*b**2*sin(c + d*x)**8/(24*d) + B*b**2*sin(c + d*x)**6*cos( c + d*x)**2/(6*d) + B*b**2*sin(c + d*x)**4*cos(c + d*x)**4/(4*d), Ne(d, 0) ), (x*(A + B*sin(c))*(a + b*sin(c))**2*cos(c)**5, True))
Time = 0.03 (sec) , antiderivative size = 184, normalized size of antiderivative = 0.80 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {105 \, B b^{2} \sin \left (d x + c\right )^{8} + 120 \, {\left (2 \, B a b + A b^{2}\right )} \sin \left (d x + c\right )^{7} + 140 \, {\left (B a^{2} + 2 \, A a b - 2 \, B b^{2}\right )} \sin \left (d x + c\right )^{6} + 168 \, {\left (A a^{2} - 4 \, B a b - 2 \, A b^{2}\right )} \sin \left (d x + c\right )^{5} - 210 \, {\left (2 \, B a^{2} + 4 \, A a b - B b^{2}\right )} \sin \left (d x + c\right )^{4} + 840 \, A a^{2} \sin \left (d x + c\right ) - 280 \, {\left (2 \, A a^{2} - 2 \, B a b - A b^{2}\right )} \sin \left (d x + c\right )^{3} + 420 \, {\left (B a^{2} + 2 \, A a b\right )} \sin \left (d x + c\right )^{2}}{840 \, d} \] Input:
integrate(cos(d*x+c)^5*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="m axima")
Output:
1/840*(105*B*b^2*sin(d*x + c)^8 + 120*(2*B*a*b + A*b^2)*sin(d*x + c)^7 + 1 40*(B*a^2 + 2*A*a*b - 2*B*b^2)*sin(d*x + c)^6 + 168*(A*a^2 - 4*B*a*b - 2*A *b^2)*sin(d*x + c)^5 - 210*(2*B*a^2 + 4*A*a*b - B*b^2)*sin(d*x + c)^4 + 84 0*A*a^2*sin(d*x + c) - 280*(2*A*a^2 - 2*B*a*b - A*b^2)*sin(d*x + c)^3 + 42 0*(B*a^2 + 2*A*a*b)*sin(d*x + c)^2)/d
Time = 0.41 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.08 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {105 \, B b^{2} \sin \left (d x + c\right )^{8} + 240 \, B a b \sin \left (d x + c\right )^{7} + 120 \, A b^{2} \sin \left (d x + c\right )^{7} + 140 \, B a^{2} \sin \left (d x + c\right )^{6} + 280 \, A a b \sin \left (d x + c\right )^{6} - 280 \, B b^{2} \sin \left (d x + c\right )^{6} + 168 \, A a^{2} \sin \left (d x + c\right )^{5} - 672 \, B a b \sin \left (d x + c\right )^{5} - 336 \, A b^{2} \sin \left (d x + c\right )^{5} - 420 \, B a^{2} \sin \left (d x + c\right )^{4} - 840 \, A a b \sin \left (d x + c\right )^{4} + 210 \, B b^{2} \sin \left (d x + c\right )^{4} - 560 \, A a^{2} \sin \left (d x + c\right )^{3} + 560 \, B a b \sin \left (d x + c\right )^{3} + 280 \, A b^{2} \sin \left (d x + c\right )^{3} + 420 \, B a^{2} \sin \left (d x + c\right )^{2} + 840 \, A a b \sin \left (d x + c\right )^{2} + 840 \, A a^{2} \sin \left (d x + c\right )}{840 \, d} \] Input:
integrate(cos(d*x+c)^5*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="g iac")
Output:
1/840*(105*B*b^2*sin(d*x + c)^8 + 240*B*a*b*sin(d*x + c)^7 + 120*A*b^2*sin (d*x + c)^7 + 140*B*a^2*sin(d*x + c)^6 + 280*A*a*b*sin(d*x + c)^6 - 280*B* b^2*sin(d*x + c)^6 + 168*A*a^2*sin(d*x + c)^5 - 672*B*a*b*sin(d*x + c)^5 - 336*A*b^2*sin(d*x + c)^5 - 420*B*a^2*sin(d*x + c)^4 - 840*A*a*b*sin(d*x + c)^4 + 210*B*b^2*sin(d*x + c)^4 - 560*A*a^2*sin(d*x + c)^3 + 560*B*a*b*si n(d*x + c)^3 + 280*A*b^2*sin(d*x + c)^3 + 420*B*a^2*sin(d*x + c)^2 + 840*A *a*b*sin(d*x + c)^2 + 840*A*a^2*sin(d*x + c))/d
Time = 0.12 (sec) , antiderivative size = 180, normalized size of antiderivative = 0.78 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {{\sin \left (c+d\,x\right )}^2\,\left (\frac {B\,a^2}{2}+A\,b\,a\right )+{\sin \left (c+d\,x\right )}^7\,\left (\frac {A\,b^2}{7}+\frac {2\,B\,a\,b}{7}\right )+{\sin \left (c+d\,x\right )}^3\,\left (-\frac {2\,A\,a^2}{3}+\frac {2\,B\,a\,b}{3}+\frac {A\,b^2}{3}\right )-{\sin \left (c+d\,x\right )}^5\,\left (-\frac {A\,a^2}{5}+\frac {4\,B\,a\,b}{5}+\frac {2\,A\,b^2}{5}\right )-{\sin \left (c+d\,x\right )}^4\,\left (\frac {B\,a^2}{2}+A\,a\,b-\frac {B\,b^2}{4}\right )+{\sin \left (c+d\,x\right )}^6\,\left (\frac {B\,a^2}{6}+\frac {A\,a\,b}{3}-\frac {B\,b^2}{3}\right )+\frac {B\,b^2\,{\sin \left (c+d\,x\right )}^8}{8}+A\,a^2\,\sin \left (c+d\,x\right )}{d} \] Input:
int(cos(c + d*x)^5*(A + B*sin(c + d*x))*(a + b*sin(c + d*x))^2,x)
Output:
(sin(c + d*x)^2*((B*a^2)/2 + A*a*b) + sin(c + d*x)^7*((A*b^2)/7 + (2*B*a*b )/7) + sin(c + d*x)^3*((A*b^2)/3 - (2*A*a^2)/3 + (2*B*a*b)/3) - sin(c + d* x)^5*((2*A*b^2)/5 - (A*a^2)/5 + (4*B*a*b)/5) - sin(c + d*x)^4*((B*a^2)/2 - (B*b^2)/4 + A*a*b) + sin(c + d*x)^6*((B*a^2)/6 - (B*b^2)/3 + (A*a*b)/3) + (B*b^2*sin(c + d*x)^8)/8 + A*a^2*sin(c + d*x))/d
Time = 0.17 (sec) , antiderivative size = 164, normalized size of antiderivative = 0.71 \[ \int \cos ^5(c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {\sin \left (d x +c \right ) \left (105 \sin \left (d x +c \right )^{7} b^{3}+360 \sin \left (d x +c \right )^{6} a \,b^{2}+420 \sin \left (d x +c \right )^{5} a^{2} b -280 \sin \left (d x +c \right )^{5} b^{3}+168 \sin \left (d x +c \right )^{4} a^{3}-1008 \sin \left (d x +c \right )^{4} a \,b^{2}-1260 \sin \left (d x +c \right )^{3} a^{2} b +210 \sin \left (d x +c \right )^{3} b^{3}-560 \sin \left (d x +c \right )^{2} a^{3}+840 \sin \left (d x +c \right )^{2} a \,b^{2}+1260 \sin \left (d x +c \right ) a^{2} b +840 a^{3}\right )}{840 d} \] Input:
int(cos(d*x+c)^5*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x)
Output:
(sin(c + d*x)*(105*sin(c + d*x)**7*b**3 + 360*sin(c + d*x)**6*a*b**2 + 420 *sin(c + d*x)**5*a**2*b - 280*sin(c + d*x)**5*b**3 + 168*sin(c + d*x)**4*a **3 - 1008*sin(c + d*x)**4*a*b**2 - 1260*sin(c + d*x)**3*a**2*b + 210*sin( c + d*x)**3*b**3 - 560*sin(c + d*x)**2*a**3 + 840*sin(c + d*x)**2*a*b**2 + 1260*sin(c + d*x)*a**2*b + 840*a**3))/(840*d)