\(\int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx\) [28]

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

Optimal result

Integrand size = 36, antiderivative size = 147 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {1}{16} a^2 (6 A-B) c^3 x+\frac {a^2 (6 A-B) c^3 \cos ^5(e+f x)}{30 f}+\frac {a^2 (6 A-B) c^3 \cos (e+f x) \sin (e+f x)}{16 f}+\frac {a^2 (6 A-B) c^3 \cos ^3(e+f x) \sin (e+f x)}{24 f}-\frac {a^2 B \cos ^5(e+f x) \left (c^3-c^3 \sin (e+f x)\right )}{6 f} \] Output:

1/16*a^2*(6*A-B)*c^3*x+1/30*a^2*(6*A-B)*c^3*cos(f*x+e)^5/f+1/16*a^2*(6*A-B 
)*c^3*cos(f*x+e)*sin(f*x+e)/f+1/24*a^2*(6*A-B)*c^3*cos(f*x+e)^3*sin(f*x+e) 
/f-1/6*a^2*B*cos(f*x+e)^5*(c^3-c^3*sin(f*x+e))/f
 

Mathematica [A] (verified)

Time = 7.98 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.93 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {a^2 c^3 (360 A e-60 B e+360 A f x-60 B f x+120 (A-B) \cos (e+f x)+60 (A-B) \cos (3 (e+f x))+12 A \cos (5 (e+f x))-12 B \cos (5 (e+f x))+240 A \sin (2 (e+f x))-15 B \sin (2 (e+f x))+30 A \sin (4 (e+f x))+15 B \sin (4 (e+f x))+5 B \sin (6 (e+f x)))}{960 f} \] Input:

Integrate[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x]) 
^3,x]
 

Output:

(a^2*c^3*(360*A*e - 60*B*e + 360*A*f*x - 60*B*f*x + 120*(A - B)*Cos[e + f* 
x] + 60*(A - B)*Cos[3*(e + f*x)] + 12*A*Cos[5*(e + f*x)] - 12*B*Cos[5*(e + 
 f*x)] + 240*A*Sin[2*(e + f*x)] - 15*B*Sin[2*(e + f*x)] + 30*A*Sin[4*(e + 
f*x)] + 15*B*Sin[4*(e + f*x)] + 5*B*Sin[6*(e + f*x)]))/(960*f)
 

Rubi [A] (verified)

Time = 0.63 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.79, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.306, Rules used = {3042, 3446, 3042, 3339, 3042, 3148, 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 (a \sin (e+f x)+a)^2 (c-c \sin (e+f x))^3 (A+B \sin (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \sin (e+f x)+a)^2 (c-c \sin (e+f x))^3 (A+B \sin (e+f x))dx\)

\(\Big \downarrow \) 3446

\(\displaystyle a^2 c^2 \int \cos ^4(e+f x) (A+B \sin (e+f x)) (c-c \sin (e+f x))dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a^2 c^2 \int \cos (e+f x)^4 (A+B \sin (e+f x)) (c-c \sin (e+f x))dx\)

\(\Big \downarrow \) 3339

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \int \cos ^4(e+f x) (c-c \sin (e+f x))dx-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \int \cos (e+f x)^4 (c-c \sin (e+f x))dx-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

\(\Big \downarrow \) 3148

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \left (c \int \cos ^4(e+f x)dx+\frac {c \cos ^5(e+f x)}{5 f}\right )-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \left (c \int \sin \left (e+f x+\frac {\pi }{2}\right )^4dx+\frac {c \cos ^5(e+f x)}{5 f}\right )-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

\(\Big \downarrow \) 3115

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \left (c \left (\frac {3}{4} \int \cos ^2(e+f x)dx+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )+\frac {c \cos ^5(e+f x)}{5 f}\right )-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \left (c \left (\frac {3}{4} \int \sin \left (e+f x+\frac {\pi }{2}\right )^2dx+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )+\frac {c \cos ^5(e+f x)}{5 f}\right )-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

\(\Big \downarrow \) 3115

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \left (c \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (e+f x) \cos (e+f x)}{2 f}\right )+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}\right )+\frac {c \cos ^5(e+f x)}{5 f}\right )-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

\(\Big \downarrow \) 24

\(\displaystyle a^2 c^2 \left (\frac {1}{6} (6 A-B) \left (\frac {c \cos ^5(e+f x)}{5 f}+c \left (\frac {\sin (e+f x) \cos ^3(e+f x)}{4 f}+\frac {3}{4} \left (\frac {\sin (e+f x) \cos (e+f x)}{2 f}+\frac {x}{2}\right )\right )\right )-\frac {B \cos ^5(e+f x) (c-c \sin (e+f x))}{6 f}\right )\)

Input:

Int[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^3,x]
 

Output:

a^2*c^2*(-1/6*(B*Cos[e + f*x]^5*(c - c*Sin[e + f*x]))/f + ((6*A - B)*((c*C 
os[e + f*x]^5)/(5*f) + c*((Cos[e + f*x]^3*Sin[e + f*x])/(4*f) + (3*(x/2 + 
(Cos[e + f*x]*Sin[e + f*x])/(2*f)))/4)))/6)
 

Defintions of rubi rules used

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

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

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 3148
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + 
 Simp[a   Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && 
 (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
 

rule 3339
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* 
(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S 
imp[(a*d*m + b*c*(m + p + 1))/(b*(m + p + 1))   Int[(g*Cos[e + f*x])^p*(a + 
 b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[ 
a^2 - b^2, 0] && NeQ[m + p + 1, 0]
 

rule 3446
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + 
 (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si 
mp[a^m*c^m   Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin 
[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a* 
d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] 
&& GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(364\) vs. \(2(137)=274\).

Time = 0.08 (sec) , antiderivative size = 365, normalized size of antiderivative = 2.48

\[\frac {\frac {a^{2} A \,c^{3} \left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )}{5}+a^{2} A \,c^{3} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 a^{2} A \,c^{3} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}-2 a^{2} A \,c^{3} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a^{2} B \,c^{3} \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )-\frac {a^{2} B \,c^{3} \left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )}{5}+2 a^{2} B \,c^{3} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+\frac {2 a^{2} B \,c^{3} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+a^{2} A \,c^{3} \cos \left (f x +e \right )-a^{2} B \,c^{3} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+a^{2} A \,c^{3} \left (f x +e \right )-a^{2} B \,c^{3} \cos \left (f x +e \right )}{f}\]

Input:

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x)
 

Output:

1/f*(1/5*a^2*A*c^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+a^2*A*c^ 
3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-2/3*a^2*A* 
c^3*(2+sin(f*x+e)^2)*cos(f*x+e)-2*a^2*A*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/ 
2*f*x+1/2*e)-a^2*B*c^3*(-1/6*(sin(f*x+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e 
))*cos(f*x+e)+5/16*f*x+5/16*e)-1/5*a^2*B*c^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x 
+e)^2)*cos(f*x+e)+2*a^2*B*c^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+ 
e)+3/8*f*x+3/8*e)+2/3*a^2*B*c^3*(2+sin(f*x+e)^2)*cos(f*x+e)+a^2*A*c^3*cos( 
f*x+e)-a^2*B*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)+a^2*A*c^3*(f*x 
+e)-a^2*B*c^3*cos(f*x+e))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.78 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {48 \, {\left (A - B\right )} a^{2} c^{3} \cos \left (f x + e\right )^{5} + 15 \, {\left (6 \, A - B\right )} a^{2} c^{3} f x + 5 \, {\left (8 \, B a^{2} c^{3} \cos \left (f x + e\right )^{5} + 2 \, {\left (6 \, A - B\right )} a^{2} c^{3} \cos \left (f x + e\right )^{3} + 3 \, {\left (6 \, A - B\right )} a^{2} c^{3} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f} \] Input:

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x, algori 
thm="fricas")
 

Output:

1/240*(48*(A - B)*a^2*c^3*cos(f*x + e)^5 + 15*(6*A - B)*a^2*c^3*f*x + 5*(8 
*B*a^2*c^3*cos(f*x + e)^5 + 2*(6*A - B)*a^2*c^3*cos(f*x + e)^3 + 3*(6*A - 
B)*a^2*c^3*cos(f*x + e))*sin(f*x + e))/f
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 910 vs. \(2 (128) = 256\).

Time = 0.47 (sec) , antiderivative size = 910, normalized size of antiderivative = 6.19 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx =\text {Too large to display} \] Input:

integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))**3,x)
 

Output:

Piecewise((3*A*a**2*c**3*x*sin(e + f*x)**4/8 + 3*A*a**2*c**3*x*sin(e + f*x 
)**2*cos(e + f*x)**2/4 - A*a**2*c**3*x*sin(e + f*x)**2 + 3*A*a**2*c**3*x*c 
os(e + f*x)**4/8 - A*a**2*c**3*x*cos(e + f*x)**2 + A*a**2*c**3*x + A*a**2* 
c**3*sin(e + f*x)**4*cos(e + f*x)/f - 5*A*a**2*c**3*sin(e + f*x)**3*cos(e 
+ f*x)/(8*f) + 4*A*a**2*c**3*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - 2*A*a 
**2*c**3*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**2*c**3*sin(e + f*x)*cos(e 
 + f*x)**3/(8*f) + A*a**2*c**3*sin(e + f*x)*cos(e + f*x)/f + 8*A*a**2*c**3 
*cos(e + f*x)**5/(15*f) - 4*A*a**2*c**3*cos(e + f*x)**3/(3*f) + A*a**2*c** 
3*cos(e + f*x)/f - 5*B*a**2*c**3*x*sin(e + f*x)**6/16 - 15*B*a**2*c**3*x*s 
in(e + f*x)**4*cos(e + f*x)**2/16 + 3*B*a**2*c**3*x*sin(e + f*x)**4/4 - 15 
*B*a**2*c**3*x*sin(e + f*x)**2*cos(e + f*x)**4/16 + 3*B*a**2*c**3*x*sin(e 
+ f*x)**2*cos(e + f*x)**2/2 - B*a**2*c**3*x*sin(e + f*x)**2/2 - 5*B*a**2*c 
**3*x*cos(e + f*x)**6/16 + 3*B*a**2*c**3*x*cos(e + f*x)**4/4 - B*a**2*c**3 
*x*cos(e + f*x)**2/2 + 11*B*a**2*c**3*sin(e + f*x)**5*cos(e + f*x)/(16*f) 
- B*a**2*c**3*sin(e + f*x)**4*cos(e + f*x)/f + 5*B*a**2*c**3*sin(e + f*x)* 
*3*cos(e + f*x)**3/(6*f) - 5*B*a**2*c**3*sin(e + f*x)**3*cos(e + f*x)/(4*f 
) - 4*B*a**2*c**3*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) + 2*B*a**2*c**3*si 
n(e + f*x)**2*cos(e + f*x)/f + 5*B*a**2*c**3*sin(e + f*x)*cos(e + f*x)**5/ 
(16*f) - 3*B*a**2*c**3*sin(e + f*x)*cos(e + f*x)**3/(4*f) + B*a**2*c**3*si 
n(e + f*x)*cos(e + f*x)/(2*f) - 8*B*a**2*c**3*cos(e + f*x)**5/(15*f) + ...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 360 vs. \(2 (138) = 276\).

Time = 0.04 (sec) , antiderivative size = 360, normalized size of antiderivative = 2.45 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {64 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} A a^{2} c^{3} + 640 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{2} c^{3} + 30 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{3} - 480 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{3} + 960 \, {\left (f x + e\right )} A a^{2} c^{3} - 64 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a^{2} c^{3} - 640 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c^{3} - 5 \, {\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{3} + 60 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{3} - 240 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{3} + 960 \, A a^{2} c^{3} \cos \left (f x + e\right ) - 960 \, B a^{2} c^{3} \cos \left (f x + e\right )}{960 \, f} \] Input:

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x, algori 
thm="maxima")
 

Output:

1/960*(64*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*A*a^2*c 
^3 + 640*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*c^3 + 30*(12*f*x + 12*e + 
 sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^2*c^3 - 480*(2*f*x + 2*e - sin 
(2*f*x + 2*e))*A*a^2*c^3 + 960*(f*x + e)*A*a^2*c^3 - 64*(3*cos(f*x + e)^5 
- 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*c^3 - 640*(cos(f*x + e)^3 - 3 
*cos(f*x + e))*B*a^2*c^3 - 5*(4*sin(2*f*x + 2*e)^3 + 60*f*x + 60*e + 9*sin 
(4*f*x + 4*e) - 48*sin(2*f*x + 2*e))*B*a^2*c^3 + 60*(12*f*x + 12*e + sin(4 
*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c^3 - 240*(2*f*x + 2*e - sin(2*f*x 
 + 2*e))*B*a^2*c^3 + 960*A*a^2*c^3*cos(f*x + e) - 960*B*a^2*c^3*cos(f*x + 
e))/f
 

Giac [A] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.37 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {B a^{2} c^{3} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {1}{16} \, {\left (6 \, A a^{2} c^{3} - B a^{2} c^{3}\right )} x + \frac {{\left (A a^{2} c^{3} - B a^{2} c^{3}\right )} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {{\left (A a^{2} c^{3} - B a^{2} c^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{16 \, f} + \frac {{\left (A a^{2} c^{3} - B a^{2} c^{3}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac {{\left (2 \, A a^{2} c^{3} + B a^{2} c^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} + \frac {{\left (16 \, A a^{2} c^{3} - B a^{2} c^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \] Input:

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x, algori 
thm="giac")
 

Output:

1/192*B*a^2*c^3*sin(6*f*x + 6*e)/f + 1/16*(6*A*a^2*c^3 - B*a^2*c^3)*x + 1/ 
80*(A*a^2*c^3 - B*a^2*c^3)*cos(5*f*x + 5*e)/f + 1/16*(A*a^2*c^3 - B*a^2*c^ 
3)*cos(3*f*x + 3*e)/f + 1/8*(A*a^2*c^3 - B*a^2*c^3)*cos(f*x + e)/f + 1/64* 
(2*A*a^2*c^3 + B*a^2*c^3)*sin(4*f*x + 4*e)/f + 1/64*(16*A*a^2*c^3 - B*a^2* 
c^3)*sin(2*f*x + 2*e)/f
 

Mupad [B] (verification not implemented)

Time = 36.96 (sec) , antiderivative size = 542, normalized size of antiderivative = 3.69 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx =\text {Too large to display} \] Input:

int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^2*(c - c*sin(e + f*x))^3,x)
 

Output:

(tan(e/2 + (f*x)/2)^4*(4*A*a^2*c^3 - 4*B*a^2*c^3) + tan(e/2 + (f*x)/2)^8*( 
2*A*a^2*c^3 - 2*B*a^2*c^3) + tan(e/2 + (f*x)/2)^6*(4*A*a^2*c^3 - 4*B*a^2*c 
^3) + tan(e/2 + (f*x)/2)^10*(2*A*a^2*c^3 - 2*B*a^2*c^3) + tan(e/2 + (f*x)/ 
2)^2*((2*A*a^2*c^3)/5 - (2*B*a^2*c^3)/5) + tan(e/2 + (f*x)/2)^5*((A*a^2*c^ 
3)/2 + (13*B*a^2*c^3)/4) - tan(e/2 + (f*x)/2)^7*((A*a^2*c^3)/2 + (13*B*a^2 
*c^3)/4) - tan(e/2 + (f*x)/2)^11*((5*A*a^2*c^3)/4 + (B*a^2*c^3)/8) + tan(e 
/2 + (f*x)/2)^3*((7*A*a^2*c^3)/4 - (47*B*a^2*c^3)/24) - tan(e/2 + (f*x)/2) 
^9*((7*A*a^2*c^3)/4 - (47*B*a^2*c^3)/24) + tan(e/2 + (f*x)/2)*((5*A*a^2*c^ 
3)/4 + (B*a^2*c^3)/8) + (2*A*a^2*c^3)/5 - (2*B*a^2*c^3)/5)/(f*(6*tan(e/2 + 
 (f*x)/2)^2 + 15*tan(e/2 + (f*x)/2)^4 + 20*tan(e/2 + (f*x)/2)^6 + 15*tan(e 
/2 + (f*x)/2)^8 + 6*tan(e/2 + (f*x)/2)^10 + tan(e/2 + (f*x)/2)^12 + 1)) + 
(a^2*c^3*atan((a^2*c^3*tan(e/2 + (f*x)/2)*(6*A - B))/(8*((3*A*a^2*c^3)/4 - 
 (B*a^2*c^3)/8)))*(6*A - B))/(8*f) - (a^2*c^3*(6*A - B)*(atan(tan(e/2 + (f 
*x)/2)) - (f*x)/2))/(8*f)
                                                                                    
                                                                                    
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.33 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx=\frac {a^{2} c^{3} \left (40 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5} b +48 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} a -48 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} b -60 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} a -70 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} b -96 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a +96 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b +150 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a +15 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b +48 \cos \left (f x +e \right ) a -48 \cos \left (f x +e \right ) b +90 a f x -48 a -15 b f x +48 b \right )}{240 f} \] Input:

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^3,x)
 

Output:

(a**2*c**3*(40*cos(e + f*x)*sin(e + f*x)**5*b + 48*cos(e + f*x)*sin(e + f* 
x)**4*a - 48*cos(e + f*x)*sin(e + f*x)**4*b - 60*cos(e + f*x)*sin(e + f*x) 
**3*a - 70*cos(e + f*x)*sin(e + f*x)**3*b - 96*cos(e + f*x)*sin(e + f*x)** 
2*a + 96*cos(e + f*x)*sin(e + f*x)**2*b + 150*cos(e + f*x)*sin(e + f*x)*a 
+ 15*cos(e + f*x)*sin(e + f*x)*b + 48*cos(e + f*x)*a - 48*cos(e + f*x)*b + 
 90*a*f*x - 48*a - 15*b*f*x + 48*b))/(240*f)