\(\int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx\) [1089]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (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 = 127 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3 b x}{128}-\frac {a \cos ^5(c+d x)}{5 d}+\frac {a \cos ^7(c+d x)}{7 d}+\frac {3 b \cos (c+d x) \sin (c+d x)}{128 d}+\frac {b \cos ^3(c+d x) \sin (c+d x)}{64 d}-\frac {b \cos ^5(c+d x) \sin (c+d x)}{16 d}-\frac {b \cos ^5(c+d x) \sin ^3(c+d x)}{8 d} \] Output:

3/128*b*x-1/5*a*cos(d*x+c)^5/d+1/7*a*cos(d*x+c)^7/d+3/128*b*cos(d*x+c)*sin 
(d*x+c)/d+1/64*b*cos(d*x+c)^3*sin(d*x+c)/d-1/16*b*cos(d*x+c)^5*sin(d*x+c)/ 
d-1/8*b*cos(d*x+c)^5*sin(d*x+c)^3/d
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.61 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {840 b d x-1680 a \cos (c+d x)-560 a \cos (3 (c+d x))+112 a \cos (5 (c+d x))+80 a \cos (7 (c+d x))-280 b \sin (4 (c+d x))+35 b \sin (8 (c+d x))}{35840 d} \] Input:

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

Output:

(840*b*d*x - 1680*a*Cos[c + d*x] - 560*a*Cos[3*(c + d*x)] + 112*a*Cos[5*(c 
 + d*x)] + 80*a*Cos[7*(c + d*x)] - 280*b*Sin[4*(c + d*x)] + 35*b*Sin[8*(c 
+ d*x)])/(35840*d)
 

Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.09, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.519, Rules used = {3042, 3317, 3042, 3045, 244, 2009, 3048, 3042, 3048, 3042, 3115, 3042, 3115, 24}

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 ^3(c+d x) \cos ^4(c+d x) (a+b \sin (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sin (c+d x)^3 \cos (c+d x)^4 (a+b \sin (c+d x))dx\)

\(\Big \downarrow \) 3317

\(\displaystyle a \int \cos ^4(c+d x) \sin ^3(c+d x)dx+b \int \cos ^4(c+d x) \sin ^4(c+d x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int \cos (c+d x)^4 \sin (c+d x)^3dx+b \int \cos (c+d x)^4 \sin (c+d x)^4dx\)

\(\Big \downarrow \) 3045

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

\(\Big \downarrow \) 244

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

\(\Big \downarrow \) 2009

\(\displaystyle b \int \cos (c+d x)^4 \sin (c+d x)^4dx-\frac {a \left (\frac {1}{5} \cos ^5(c+d x)-\frac {1}{7} \cos ^7(c+d x)\right )}{d}\)

\(\Big \downarrow \) 3048

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3048

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3115

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3115

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

\(\Big \downarrow \) 24

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

Input:

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

Output:

-((a*(Cos[c + d*x]^5/5 - Cos[c + d*x]^7/7))/d) + b*(-1/8*(Cos[c + d*x]^5*S 
in[c + d*x]^3)/d + (3*(-1/6*(Cos[c + d*x]^5*Sin[c + d*x])/d + ((Cos[c + d* 
x]^3*Sin[c + d*x])/(4*d) + (3*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/4 
)/6))/8)
 

Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 244
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand 
Integrand[(c*x)^m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, 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 3045
Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_ 
Symbol] :> Simp[-(a*f)^(-1)   Subst[Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], 
x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] && 
 !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])
 

rule 3048
Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m 
_), x_Symbol] :> Simp[(-a)*(b*Cos[e + f*x])^(n + 1)*((a*Sin[e + f*x])^(m - 
1)/(b*f*(m + n))), x] + Simp[a^2*((m - 1)/(m + n))   Int[(b*Cos[e + f*x])^n 
*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] 
 && NeQ[m + n, 0] && IntegersQ[2*m, 2*n]
 

rule 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3317
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a   Int[(g*Co 
s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d   Int[(g*Cos[e + f*x])^ 
p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
 
Maple [A] (verified)

Time = 37.76 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.66

method result size
parallelrisch \(\frac {840 b x d -560 a \cos \left (3 d x +3 c \right )-1680 a \cos \left (d x +c \right )+35 b \sin \left (8 d x +8 c \right )+80 a \cos \left (7 d x +7 c \right )+112 a \cos \left (5 d x +5 c \right )-280 b \sin \left (4 d x +4 c \right )-2048 a}{35840 d}\) \(84\)
risch \(\frac {3 b x}{128}-\frac {3 a \cos \left (d x +c \right )}{64 d}+\frac {b \sin \left (8 d x +8 c \right )}{1024 d}+\frac {a \cos \left (7 d x +7 c \right )}{448 d}+\frac {a \cos \left (5 d x +5 c \right )}{320 d}-\frac {b \sin \left (4 d x +4 c \right )}{128 d}-\frac {a \cos \left (3 d x +3 c \right )}{64 d}\) \(93\)
derivativedivides \(\frac {a \left (-\frac {\sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{5}}{7}-\frac {2 \cos \left (d x +c \right )^{5}}{35}\right )+b \left (-\frac {\sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{5}}{8}-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{5}}{16}+\frac {\left (\cos \left (d x +c \right )^{3}+\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 )}{d}\) \(106\)
default \(\frac {a \left (-\frac {\sin \left (d x +c \right )^{2} \cos \left (d x +c \right )^{5}}{7}-\frac {2 \cos \left (d x +c \right )^{5}}{35}\right )+b \left (-\frac {\sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{5}}{8}-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{5}}{16}+\frac {\left (\cos \left (d x +c \right )^{3}+\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 )}{d}\) \(106\)
norman \(\frac {\frac {3 b x}{128}+\frac {333 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{64 d}-\frac {4 a}{35 d}+\frac {21 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{16}+\frac {21 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{32}+\frac {3 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{16}}{128}-\frac {333 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{64 d}+\frac {3 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{15}}{64 d}-\frac {32 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{5 d}-\frac {671 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{64 d}-\frac {4 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}-\frac {32 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{35 d}+\frac {4 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{5 d}+\frac {3 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{16}-\frac {23 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{64 d}-\frac {4 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{d}-\frac {3 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{64 d}+\frac {105 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{64}+\frac {21 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{16}+\frac {21 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}}{32}+\frac {3 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}}{16}+\frac {671 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{64 d}+\frac {23 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{64 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{8}}\) \(367\)
orering \(\text {Expression too large to display}\) \(2316\)

Input:

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

Output:

1/35840*(840*b*x*d-560*a*cos(3*d*x+3*c)-1680*a*cos(d*x+c)+35*b*sin(8*d*x+8 
*c)+80*a*cos(7*d*x+7*c)+112*a*cos(5*d*x+5*c)-280*b*sin(4*d*x+4*c)-2048*a)/ 
d
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.66 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {640 \, a \cos \left (d x + c\right )^{7} - 896 \, a \cos \left (d x + c\right )^{5} + 105 \, b d x + 35 \, {\left (16 \, b \cos \left (d x + c\right )^{7} - 24 \, b \cos \left (d x + c\right )^{5} + 2 \, b \cos \left (d x + c\right )^{3} + 3 \, b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4480 \, d} \] Input:

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

Output:

1/4480*(640*a*cos(d*x + c)^7 - 896*a*cos(d*x + c)^5 + 105*b*d*x + 35*(16*b 
*cos(d*x + c)^7 - 24*b*cos(d*x + c)^5 + 2*b*cos(d*x + c)^3 + 3*b*cos(d*x + 
 c))*sin(d*x + c))/d
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 248 vs. \(2 (116) = 232\).

Time = 0.68 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.95 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\begin {cases} - \frac {a \sin ^{2}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{5 d} - \frac {2 a \cos ^{7}{\left (c + d x \right )}}{35 d} + \frac {3 b x \sin ^{8}{\left (c + d x \right )}}{128} + \frac {3 b x \sin ^{6}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{32} + \frac {9 b x \sin ^{4}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{64} + \frac {3 b x \sin ^{2}{\left (c + d x \right )} \cos ^{6}{\left (c + d x \right )}}{32} + \frac {3 b x \cos ^{8}{\left (c + d x \right )}}{128} + \frac {3 b \sin ^{7}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{128 d} + \frac {11 b \sin ^{5}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{128 d} - \frac {11 b \sin ^{3}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{128 d} - \frac {3 b \sin {\left (c + d x \right )} \cos ^{7}{\left (c + d x \right )}}{128 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right ) \sin ^{3}{\left (c \right )} \cos ^{4}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:

integrate(cos(d*x+c)**4*sin(d*x+c)**3*(a+b*sin(d*x+c)),x)
 

Output:

Piecewise((-a*sin(c + d*x)**2*cos(c + d*x)**5/(5*d) - 2*a*cos(c + d*x)**7/ 
(35*d) + 3*b*x*sin(c + d*x)**8/128 + 3*b*x*sin(c + d*x)**6*cos(c + d*x)**2 
/32 + 9*b*x*sin(c + d*x)**4*cos(c + d*x)**4/64 + 3*b*x*sin(c + d*x)**2*cos 
(c + d*x)**6/32 + 3*b*x*cos(c + d*x)**8/128 + 3*b*sin(c + d*x)**7*cos(c + 
d*x)/(128*d) + 11*b*sin(c + d*x)**5*cos(c + d*x)**3/(128*d) - 11*b*sin(c + 
 d*x)**3*cos(c + d*x)**5/(128*d) - 3*b*sin(c + d*x)*cos(c + d*x)**7/(128*d 
), Ne(d, 0)), (x*(a + b*sin(c))*sin(c)**3*cos(c)**4, True))
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.48 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {1024 \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} a + 35 \, {\left (24 \, d x + 24 \, c + \sin \left (8 \, d x + 8 \, c\right ) - 8 \, \sin \left (4 \, d x + 4 \, c\right )\right )} b}{35840 \, d} \] Input:

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

Output:

1/35840*(1024*(5*cos(d*x + c)^7 - 7*cos(d*x + c)^5)*a + 35*(24*d*x + 24*c 
+ sin(8*d*x + 8*c) - 8*sin(4*d*x + 4*c))*b)/d
 

Giac [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.72 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3}{128} \, b x + \frac {a \cos \left (7 \, d x + 7 \, c\right )}{448 \, d} + \frac {a \cos \left (5 \, d x + 5 \, c\right )}{320 \, d} - \frac {a \cos \left (3 \, d x + 3 \, c\right )}{64 \, d} - \frac {3 \, a \cos \left (d x + c\right )}{64 \, d} + \frac {b \sin \left (8 \, d x + 8 \, c\right )}{1024 \, d} - \frac {b \sin \left (4 \, d x + 4 \, c\right )}{128 \, d} \] Input:

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

Output:

3/128*b*x + 1/448*a*cos(7*d*x + 7*c)/d + 1/320*a*cos(5*d*x + 5*c)/d - 1/64 
*a*cos(3*d*x + 3*c)/d - 3/64*a*cos(d*x + c)/d + 1/1024*b*sin(8*d*x + 8*c)/ 
d - 1/128*b*sin(4*d*x + 4*c)/d
 

Mupad [B] (verification not implemented)

Time = 37.85 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.65 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {3\,b\,x}{128}-\frac {-\frac {3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}}{64}-\frac {23\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{64}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+\frac {333\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{64}-\frac {671\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{64}+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\frac {671\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{64}+\frac {32\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{5}-\frac {333\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{64}-\frac {4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{5}+\frac {23\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{64}+\frac {32\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{35}+\frac {3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64}+\frac {4\,a}{35}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^8} \] Input:

int(cos(c + d*x)^4*sin(c + d*x)^3*(a + b*sin(c + d*x)),x)
 

Output:

(3*b*x)/128 - ((4*a)/35 + (3*b*tan(c/2 + (d*x)/2))/64 + (32*a*tan(c/2 + (d 
*x)/2)^2)/35 - (4*a*tan(c/2 + (d*x)/2)^4)/5 + (32*a*tan(c/2 + (d*x)/2)^6)/ 
5 + 4*a*tan(c/2 + (d*x)/2)^8 + 4*a*tan(c/2 + (d*x)/2)^12 + (23*b*tan(c/2 + 
 (d*x)/2)^3)/64 - (333*b*tan(c/2 + (d*x)/2)^5)/64 + (671*b*tan(c/2 + (d*x) 
/2)^7)/64 - (671*b*tan(c/2 + (d*x)/2)^9)/64 + (333*b*tan(c/2 + (d*x)/2)^11 
)/64 - (23*b*tan(c/2 + (d*x)/2)^13)/64 - (3*b*tan(c/2 + (d*x)/2)^15)/64)/( 
d*(tan(c/2 + (d*x)/2)^2 + 1)^8)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.10 \[ \int \cos ^4(c+d x) \sin ^3(c+d x) (a+b \sin (c+d x)) \, dx=\frac {-560 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{7} b -640 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{6} a +840 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5} b +1024 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a -70 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} b -128 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a -105 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b -256 \cos \left (d x +c \right ) a +256 a +105 b d x}{4480 d} \] Input:

int(cos(d*x+c)^4*sin(d*x+c)^3*(a+b*sin(d*x+c)),x)
 

Output:

( - 560*cos(c + d*x)*sin(c + d*x)**7*b - 640*cos(c + d*x)*sin(c + d*x)**6* 
a + 840*cos(c + d*x)*sin(c + d*x)**5*b + 1024*cos(c + d*x)*sin(c + d*x)**4 
*a - 70*cos(c + d*x)*sin(c + d*x)**3*b - 128*cos(c + d*x)*sin(c + d*x)**2* 
a - 105*cos(c + d*x)*sin(c + d*x)*b - 256*cos(c + d*x)*a + 256*a + 105*b*d 
*x)/(4480*d)