\(\int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx\) [1212]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 102 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {\left (4 a^2+b^2\right ) \cos ^6(c+d x)}{24 d}-\frac {b^2 \cos ^6(c+d x) \sin ^2(c+d x)}{8 d}+\frac {2 a b \sin ^3(c+d x)}{3 d}-\frac {4 a b \sin ^5(c+d x)}{5 d}+\frac {2 a b \sin ^7(c+d x)}{7 d} \] Output:

-1/24*(4*a^2+b^2)*cos(d*x+c)^6/d-1/8*b^2*cos(d*x+c)^6*sin(d*x+c)^2/d+2/3*a 
*b*sin(d*x+c)^3/d-4/5*a*b*sin(d*x+c)^5/d+2/7*a*b*sin(d*x+c)^7/d
 

Mathematica [A] (verified)

Time = 0.62 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.35 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {-2590 b^2+840 \left (10 a^2+3 b^2\right ) \cos (2 (c+d x))+420 \left (8 a^2+b^2\right ) \cos (4 (c+d x))+560 a^2 \cos (6 (c+d x))-280 b^2 \cos (6 (c+d x))-105 b^2 \cos (8 (c+d x))-16800 a b \sin (c+d x)+1120 a b \sin (3 (c+d x))+2016 a b \sin (5 (c+d x))+480 a b \sin (7 (c+d x))}{107520 d} \] Input:

Integrate[Cos[c + d*x]^5*Sin[c + d*x]*(a + b*Sin[c + d*x])^2,x]
 

Output:

-1/107520*(-2590*b^2 + 840*(10*a^2 + 3*b^2)*Cos[2*(c + d*x)] + 420*(8*a^2 
+ b^2)*Cos[4*(c + d*x)] + 560*a^2*Cos[6*(c + d*x)] - 280*b^2*Cos[6*(c + d* 
x)] - 105*b^2*Cos[8*(c + d*x)] - 16800*a*b*Sin[c + d*x] + 1120*a*b*Sin[3*( 
c + d*x)] + 2016*a*b*Sin[5*(c + d*x)] + 480*a*b*Sin[7*(c + d*x)])/d
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.36, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3316, 27, 522, 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 \sin (c+d x) \cos ^5(c+d x) (a+b \sin (c+d x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sin (c+d x) \cos (c+d x)^5 (a+b \sin (c+d x))^2dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \sin (c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int b \sin (c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^6 d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {\int \left (b^7 \sin ^7(c+d x)+2 a b^6 \sin ^6(c+d x)+b^5 \left (a^2-2 b^2\right ) \sin ^5(c+d x)-4 a b^6 \sin ^4(c+d x)+b^5 \left (b^2-2 a^2\right ) \sin ^3(c+d x)+2 a b^6 \sin ^2(c+d x)+a^2 b^5 \sin (c+d x)\right )d(b \sin (c+d x))}{b^6 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {1}{2} a^2 b^6 \sin ^2(c+d x)+\frac {1}{6} b^6 \left (a^2-2 b^2\right ) \sin ^6(c+d x)-\frac {1}{4} b^6 \left (2 a^2-b^2\right ) \sin ^4(c+d x)+\frac {2}{7} a b^7 \sin ^7(c+d x)-\frac {4}{5} a b^7 \sin ^5(c+d x)+\frac {2}{3} a b^7 \sin ^3(c+d x)+\frac {1}{8} b^8 \sin ^8(c+d x)}{b^6 d}\)

Input:

Int[Cos[c + d*x]^5*Sin[c + d*x]*(a + b*Sin[c + d*x])^2,x]
 

Output:

((a^2*b^6*Sin[c + d*x]^2)/2 + (2*a*b^7*Sin[c + d*x]^3)/3 - (b^6*(2*a^2 - b 
^2)*Sin[c + d*x]^4)/4 - (4*a*b^7*Sin[c + d*x]^5)/5 + (b^6*(a^2 - 2*b^2)*Si 
n[c + d*x]^6)/6 + (2*a*b^7*Sin[c + d*x]^7)/7 + (b^8*Sin[c + d*x]^8)/8)/(b^ 
6*d)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
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]
 
Maple [A] (verified)

Time = 227.52 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.04

method result size
derivativedivides \(\frac {\frac {b^{2} \sin \left (d x +c \right )^{8}}{8}+\frac {2 a b \sin \left (d x +c \right )^{7}}{7}+\frac {\left (a^{2}-2 b^{2}\right ) \sin \left (d x +c \right )^{6}}{6}-\frac {4 a b \sin \left (d x +c \right )^{5}}{5}+\frac {\left (-2 a^{2}+b^{2}\right ) \sin \left (d x +c \right )^{4}}{4}+\frac {2 a b \sin \left (d x +c \right )^{3}}{3}+\frac {a^{2} \sin \left (d x +c \right )^{2}}{2}}{d}\) \(106\)
default \(\frac {\frac {b^{2} \sin \left (d x +c \right )^{8}}{8}+\frac {2 a b \sin \left (d x +c \right )^{7}}{7}+\frac {\left (a^{2}-2 b^{2}\right ) \sin \left (d x +c \right )^{6}}{6}-\frac {4 a b \sin \left (d x +c \right )^{5}}{5}+\frac {\left (-2 a^{2}+b^{2}\right ) \sin \left (d x +c \right )^{4}}{4}+\frac {2 a b \sin \left (d x +c \right )^{3}}{3}+\frac {a^{2} \sin \left (d x +c \right )^{2}}{2}}{d}\) \(106\)
parallelrisch \(\frac {105 b^{2} \cos \left (8 d x +8 c \right )-2520 b^{2} \cos \left (2 d x +2 c \right )+2555 b^{2}+16800 a b \sin \left (d x +c \right )+12320 a^{2}-560 a^{2} \cos \left (6 d x +6 c \right )-3360 a^{2} \cos \left (4 d x +4 c \right )-420 b^{2} \cos \left (4 d x +4 c \right )+280 b^{2} \cos \left (6 d x +6 c \right )-8400 a^{2} \cos \left (2 d x +2 c \right )-2016 a b \sin \left (5 d x +5 c \right )-1120 a b \sin \left (3 d x +3 c \right )-480 a b \sin \left (7 d x +7 c \right )}{107520 d}\) \(164\)
risch \(\frac {5 a b \sin \left (d x +c \right )}{32 d}+\frac {b^{2} \cos \left (8 d x +8 c \right )}{1024 d}-\frac {a b \sin \left (7 d x +7 c \right )}{224 d}-\frac {\cos \left (6 d x +6 c \right ) a^{2}}{192 d}+\frac {\cos \left (6 d x +6 c \right ) b^{2}}{384 d}-\frac {3 a b \sin \left (5 d x +5 c \right )}{160 d}-\frac {\cos \left (4 d x +4 c \right ) a^{2}}{32 d}-\frac {\cos \left (4 d x +4 c \right ) b^{2}}{256 d}-\frac {a b \sin \left (3 d x +3 c \right )}{96 d}-\frac {5 \cos \left (2 d x +2 c \right ) a^{2}}{64 d}-\frac {3 \cos \left (2 d x +2 c \right ) b^{2}}{128 d}\) \(182\)
norman \(\frac {\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}}{d}+\frac {4 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}+\frac {4 \left (a^{2}+b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{d}+\frac {10 \left (4 a^{2}+4 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{3 d}+\frac {2 \left (13 a^{2}-8 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{3 d}+\frac {2 \left (13 a^{2}-8 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{3 d}+\frac {16 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {16 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}+\frac {1376 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{105 d}+\frac {1376 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{105 d}+\frac {16 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{15 d}+\frac {16 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{8}}\) \(291\)
orering \(\text {Expression too large to display}\) \(2272\)

Input:

int(cos(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 

Output:

1/d*(1/8*b^2*sin(d*x+c)^8+2/7*a*b*sin(d*x+c)^7+1/6*(a^2-2*b^2)*sin(d*x+c)^ 
6-4/5*a*b*sin(d*x+c)^5+1/4*(-2*a^2+b^2)*sin(d*x+c)^4+2/3*a*b*sin(d*x+c)^3+ 
1/2*a^2*sin(d*x+c)^2)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.83 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {105 \, b^{2} \cos \left (d x + c\right )^{8} - 140 \, {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{6} - 16 \, {\left (15 \, a b \cos \left (d x + c\right )^{6} - 3 \, a b \cos \left (d x + c\right )^{4} - 4 \, a b \cos \left (d x + c\right )^{2} - 8 \, a b\right )} \sin \left (d x + c\right )}{840 \, d} \] Input:

integrate(cos(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="fricas" 
)
 

Output:

1/840*(105*b^2*cos(d*x + c)^8 - 140*(a^2 + b^2)*cos(d*x + c)^6 - 16*(15*a* 
b*cos(d*x + c)^6 - 3*a*b*cos(d*x + c)^4 - 4*a*b*cos(d*x + c)^2 - 8*a*b)*si 
n(d*x + c))/d
 

Sympy [A] (verification not implemented)

Time = 0.65 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.60 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=\begin {cases} - \frac {a^{2} \cos ^{6}{\left (c + d x \right )}}{6 d} + \frac {16 a b \sin ^{7}{\left (c + d x \right )}}{105 d} + \frac {8 a b \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{15 d} + \frac {2 a b \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{3 d} + \frac {b^{2} \sin ^{8}{\left (c + d x \right )}}{24 d} + \frac {b^{2} \sin ^{6}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{6 d} + \frac {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 )^{2} \sin {\left (c \right )} \cos ^{5}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:

integrate(cos(d*x+c)**5*sin(d*x+c)*(a+b*sin(d*x+c))**2,x)
 

Output:

Piecewise((-a**2*cos(c + d*x)**6/(6*d) + 16*a*b*sin(c + d*x)**7/(105*d) + 
8*a*b*sin(c + d*x)**5*cos(c + d*x)**2/(15*d) + 2*a*b*sin(c + d*x)**3*cos(c 
 + d*x)**4/(3*d) + b**2*sin(c + d*x)**8/(24*d) + b**2*sin(c + d*x)**6*cos( 
c + d*x)**2/(6*d) + b**2*sin(c + d*x)**4*cos(c + d*x)**4/(4*d), Ne(d, 0)), 
 (x*(a + b*sin(c))**2*sin(c)*cos(c)**5, True))
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.06 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {105 \, b^{2} \sin \left (d x + c\right )^{8} + 240 \, a b \sin \left (d x + c\right )^{7} - 672 \, a b \sin \left (d x + c\right )^{5} + 140 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{6} + 560 \, a b \sin \left (d x + c\right )^{3} - 210 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{4} + 420 \, a^{2} \sin \left (d x + c\right )^{2}}{840 \, d} \] Input:

integrate(cos(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="maxima" 
)
 

Output:

1/840*(105*b^2*sin(d*x + c)^8 + 240*a*b*sin(d*x + c)^7 - 672*a*b*sin(d*x + 
 c)^5 + 140*(a^2 - 2*b^2)*sin(d*x + c)^6 + 560*a*b*sin(d*x + c)^3 - 210*(2 
*a^2 - b^2)*sin(d*x + c)^4 + 420*a^2*sin(d*x + c)^2)/d
                                                                                    
                                                                                    
 

Giac [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.18 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {105 \, b^{2} \sin \left (d x + c\right )^{8} + 240 \, a b \sin \left (d x + c\right )^{7} + 140 \, a^{2} \sin \left (d x + c\right )^{6} - 280 \, b^{2} \sin \left (d x + c\right )^{6} - 672 \, a b \sin \left (d x + c\right )^{5} - 420 \, a^{2} \sin \left (d x + c\right )^{4} + 210 \, b^{2} \sin \left (d x + c\right )^{4} + 560 \, a b \sin \left (d x + c\right )^{3} + 420 \, a^{2} \sin \left (d x + c\right )^{2}}{840 \, d} \] Input:

integrate(cos(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^2,x, algorithm="giac")
 

Output:

1/840*(105*b^2*sin(d*x + c)^8 + 240*a*b*sin(d*x + c)^7 + 140*a^2*sin(d*x + 
 c)^6 - 280*b^2*sin(d*x + c)^6 - 672*a*b*sin(d*x + c)^5 - 420*a^2*sin(d*x 
+ c)^4 + 210*b^2*sin(d*x + c)^4 + 560*a*b*sin(d*x + c)^3 + 420*a^2*sin(d*x 
 + c)^2)/d
 

Mupad [B] (verification not implemented)

Time = 21.64 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.06 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {{\sin \left (c+d\,x\right )}^6\,\left (\frac {a^2}{6}-\frac {b^2}{3}\right )-{\sin \left (c+d\,x\right )}^4\,\left (\frac {a^2}{2}-\frac {b^2}{4}\right )+\frac {a^2\,{\sin \left (c+d\,x\right )}^2}{2}+\frac {b^2\,{\sin \left (c+d\,x\right )}^8}{8}+\frac {2\,a\,b\,{\sin \left (c+d\,x\right )}^3}{3}-\frac {4\,a\,b\,{\sin \left (c+d\,x\right )}^5}{5}+\frac {2\,a\,b\,{\sin \left (c+d\,x\right )}^7}{7}}{d} \] Input:

int(cos(c + d*x)^5*sin(c + d*x)*(a + b*sin(c + d*x))^2,x)
 

Output:

(sin(c + d*x)^6*(a^2/6 - b^2/3) - sin(c + d*x)^4*(a^2/2 - b^2/4) + (a^2*si 
n(c + d*x)^2)/2 + (b^2*sin(c + d*x)^8)/8 + (2*a*b*sin(c + d*x)^3)/3 - (4*a 
*b*sin(c + d*x)^5)/5 + (2*a*b*sin(c + d*x)^7)/7)/d
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.16 \[ \int \cos ^5(c+d x) \sin (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {\sin \left (d x +c \right )^{2} \left (105 \sin \left (d x +c \right )^{6} b^{2}+240 \sin \left (d x +c \right )^{5} a b +140 \sin \left (d x +c \right )^{4} a^{2}-280 \sin \left (d x +c \right )^{4} b^{2}-672 \sin \left (d x +c \right )^{3} a b -420 \sin \left (d x +c \right )^{2} a^{2}+210 \sin \left (d x +c \right )^{2} b^{2}+560 \sin \left (d x +c \right ) a b +420 a^{2}\right )}{840 d} \] Input:

int(cos(d*x+c)^5*sin(d*x+c)*(a+b*sin(d*x+c))^2,x)
 

Output:

(sin(c + d*x)**2*(105*sin(c + d*x)**6*b**2 + 240*sin(c + d*x)**5*a*b + 140 
*sin(c + d*x)**4*a**2 - 280*sin(c + d*x)**4*b**2 - 672*sin(c + d*x)**3*a*b 
 - 420*sin(c + d*x)**2*a**2 + 210*sin(c + d*x)**2*b**2 + 560*sin(c + d*x)* 
a*b + 420*a**2))/(840*d)