\(\int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx\) [260]

Optimal result
Mathematica [A] (warning: unable to verify)
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 = 33, antiderivative size = 201 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {1}{8} a^3 (20 A c+15 B c+15 A d+13 B d) x-\frac {a^3 (20 A c+15 B c+15 A d+13 B d) \cos (e+f x)}{5 f}+\frac {a^3 (20 A c+15 B c+15 A d+13 B d) \cos ^3(e+f x)}{60 f}-\frac {3 a^3 (20 A c+15 B c+15 A d+13 B d) \cos (e+f x) \sin (e+f x)}{40 f}-\frac {(5 B c+5 A d-B d) \cos (e+f x) (a+a \sin (e+f x))^3}{20 f}-\frac {B d \cos (e+f x) (a+a \sin (e+f x))^4}{5 a f} \] Output:

1/8*a^3*(20*A*c+15*A*d+15*B*c+13*B*d)*x-1/5*a^3*(20*A*c+15*A*d+15*B*c+13*B 
*d)*cos(f*x+e)/f+1/60*a^3*(20*A*c+15*A*d+15*B*c+13*B*d)*cos(f*x+e)^3/f-3/4 
0*a^3*(20*A*c+15*A*d+15*B*c+13*B*d)*cos(f*x+e)*sin(f*x+e)/f-1/20*(5*A*d+5* 
B*c-B*d)*cos(f*x+e)*(a+a*sin(f*x+e))^3/f-1/5*B*d*cos(f*x+e)*(a+a*sin(f*x+e 
))^4/a/f
 

Mathematica [A] (warning: unable to verify)

Time = 1.18 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.78 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {\cos (e+f x) \left (-\frac {1}{4} a^4 (5 B c+5 A d-B d) (1+\sin (e+f x))^3-B d (a+a \sin (e+f x))^4-\frac {a^4 (20 A c+15 B c+15 A d+13 B d) \left (30 \arcsin \left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )+\sqrt {\cos ^2(e+f x)} \left (22+9 \sin (e+f x)+2 \sin ^2(e+f x)\right )\right )}{24 \sqrt {\cos ^2(e+f x)}}\right )}{5 a f} \] Input:

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

Output:

(Cos[e + f*x]*(-1/4*(a^4*(5*B*c + 5*A*d - B*d)*(1 + Sin[e + f*x])^3) - B*d 
*(a + a*Sin[e + f*x])^4 - (a^4*(20*A*c + 15*B*c + 15*A*d + 13*B*d)*(30*Arc 
Sin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]] + Sqrt[Cos[e + f*x]^2]*(22 + 9*Sin[e + 
 f*x] + 2*Sin[e + f*x]^2)))/(24*Sqrt[Cos[e + f*x]^2])))/(5*a*f)
 

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.81, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3042, 3447, 3042, 3502, 3042, 3230, 3042, 3124, 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 (a \sin (e+f x)+a)^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3447

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3502

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3230

\(\displaystyle \frac {\frac {1}{4} a (20 A c+15 A d+15 B c+13 B d) \int (\sin (e+f x) a+a)^3dx-\frac {a (5 A d+5 B c-B d) \cos (e+f x) (a \sin (e+f x)+a)^3}{4 f}}{5 a}-\frac {B d \cos (e+f x) (a \sin (e+f x)+a)^4}{5 a f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{4} a (20 A c+15 A d+15 B c+13 B d) \int (\sin (e+f x) a+a)^3dx-\frac {a (5 A d+5 B c-B d) \cos (e+f x) (a \sin (e+f x)+a)^3}{4 f}}{5 a}-\frac {B d \cos (e+f x) (a \sin (e+f x)+a)^4}{5 a f}\)

\(\Big \downarrow \) 3124

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

-1/5*(B*d*Cos[e + f*x]*(a + a*Sin[e + f*x])^4)/(a*f) + (-1/4*(a*(5*B*c + 5 
*A*d - B*d)*Cos[e + f*x]*(a + a*Sin[e + f*x])^3)/f + (a*(20*A*c + 15*B*c + 
 15*A*d + 13*B*d)*((5*a^3*x)/2 - (4*a^3*Cos[e + f*x])/f + (a^3*Cos[e + f*x 
]^3)/(3*f) - (3*a^3*Cos[e + f*x]*Sin[e + f*x])/(2*f)))/4)/(5*a)
 

Defintions of rubi rules used

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 3124
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandTri 
g[(a + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - 
b^2, 0] && IGtQ[n, 0]
 

rule 3230
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( 
f*(m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(b*(m + 1))   Int[(a + b*Sin[e 
 + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] 
&& EqQ[a^2 - b^2, 0] &&  !LtQ[m, -2^(-1)]
 

rule 3447
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a 
 + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), 
 x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
 

rule 3502
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co 
s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m 
+ 2))   Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m 
 + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] 
 &&  !LtQ[m, -1]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(413\) vs. \(2(189)=378\).

Time = 0.67 (sec) , antiderivative size = 414, normalized size of antiderivative = 2.06

\[\frac {-\frac {a^{3} A c \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+a^{3} A d \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 )+a^{3} B c \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 {a^{3} B d \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}+3 a^{3} A c \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a^{3} A d \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )-a^{3} B c \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )+3 a^{3} B d \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 )-3 a^{3} A c \cos \left (f x +e \right )+3 a^{3} A d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+3 a^{3} B c \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a^{3} B d \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )+a^{3} A c \left (f x +e \right )-a^{3} A d \cos \left (f x +e \right )-a^{3} B c \cos \left (f x +e \right )+a^{3} B d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\]

Input:

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

Output:

1/f*(-1/3*a^3*A*c*(2+sin(f*x+e)^2)*cos(f*x+e)+a^3*A*d*(-1/4*(sin(f*x+e)^3+ 
3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+a^3*B*c*(-1/4*(sin(f*x+e)^3+3/2* 
sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*a^3*B*d*(8/3+sin(f*x+e)^4+4/3*si 
n(f*x+e)^2)*cos(f*x+e)+3*a^3*A*c*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e 
)-a^3*A*d*(2+sin(f*x+e)^2)*cos(f*x+e)-a^3*B*c*(2+sin(f*x+e)^2)*cos(f*x+e)+ 
3*a^3*B*d*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-3* 
a^3*A*c*cos(f*x+e)+3*a^3*A*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)+3* 
a^3*B*c*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-a^3*B*d*(2+sin(f*x+e)^2 
)*cos(f*x+e)+a^3*A*c*(f*x+e)-a^3*A*d*cos(f*x+e)-a^3*B*c*cos(f*x+e)+a^3*B*d 
*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 178, normalized size of antiderivative = 0.89 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=-\frac {24 \, B a^{3} d \cos \left (f x + e\right )^{5} - 40 \, {\left ({\left (A + 3 \, B\right )} a^{3} c + {\left (3 \, A + 5 \, B\right )} a^{3} d\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (5 \, {\left (4 \, A + 3 \, B\right )} a^{3} c + {\left (15 \, A + 13 \, B\right )} a^{3} d\right )} f x + 480 \, {\left ({\left (A + B\right )} a^{3} c + {\left (A + B\right )} a^{3} d\right )} \cos \left (f x + e\right ) - 15 \, {\left (2 \, {\left (B a^{3} c + {\left (A + 3 \, B\right )} a^{3} d\right )} \cos \left (f x + e\right )^{3} - {\left ({\left (12 \, A + 17 \, B\right )} a^{3} c + {\left (17 \, A + 19 \, B\right )} a^{3} d\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \] Input:

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorith 
m="fricas")
 

Output:

-1/120*(24*B*a^3*d*cos(f*x + e)^5 - 40*((A + 3*B)*a^3*c + (3*A + 5*B)*a^3* 
d)*cos(f*x + e)^3 - 15*(5*(4*A + 3*B)*a^3*c + (15*A + 13*B)*a^3*d)*f*x + 4 
80*((A + B)*a^3*c + (A + B)*a^3*d)*cos(f*x + e) - 15*(2*(B*a^3*c + (A + 3* 
B)*a^3*d)*cos(f*x + e)^3 - ((12*A + 17*B)*a^3*c + (17*A + 19*B)*a^3*d)*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. 960 vs. \(2 (201) = 402\).

Time = 0.35 (sec) , antiderivative size = 960, normalized size of antiderivative = 4.78 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\text {Too large to display} \] Input:

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

Output:

Piecewise((3*A*a**3*c*x*sin(e + f*x)**2/2 + 3*A*a**3*c*x*cos(e + f*x)**2/2 
 + A*a**3*c*x - A*a**3*c*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**3*c*sin(e 
 + f*x)*cos(e + f*x)/(2*f) - 2*A*a**3*c*cos(e + f*x)**3/(3*f) - 3*A*a**3*c 
*cos(e + f*x)/f + 3*A*a**3*d*x*sin(e + f*x)**4/8 + 3*A*a**3*d*x*sin(e + f* 
x)**2*cos(e + f*x)**2/4 + 3*A*a**3*d*x*sin(e + f*x)**2/2 + 3*A*a**3*d*x*co 
s(e + f*x)**4/8 + 3*A*a**3*d*x*cos(e + f*x)**2/2 - 5*A*a**3*d*sin(e + f*x) 
**3*cos(e + f*x)/(8*f) - 3*A*a**3*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a 
**3*d*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 3*A*a**3*d*sin(e + f*x)*cos(e + 
 f*x)/(2*f) - 2*A*a**3*d*cos(e + f*x)**3/f - A*a**3*d*cos(e + f*x)/f + 3*B 
*a**3*c*x*sin(e + f*x)**4/8 + 3*B*a**3*c*x*sin(e + f*x)**2*cos(e + f*x)**2 
/4 + 3*B*a**3*c*x*sin(e + f*x)**2/2 + 3*B*a**3*c*x*cos(e + f*x)**4/8 + 3*B 
*a**3*c*x*cos(e + f*x)**2/2 - 5*B*a**3*c*sin(e + f*x)**3*cos(e + f*x)/(8*f 
) - 3*B*a**3*c*sin(e + f*x)**2*cos(e + f*x)/f - 3*B*a**3*c*sin(e + f*x)*co 
s(e + f*x)**3/(8*f) - 3*B*a**3*c*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*B*a** 
3*c*cos(e + f*x)**3/f - B*a**3*c*cos(e + f*x)/f + 9*B*a**3*d*x*sin(e + f*x 
)**4/8 + 9*B*a**3*d*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + B*a**3*d*x*sin(e 
 + f*x)**2/2 + 9*B*a**3*d*x*cos(e + f*x)**4/8 + B*a**3*d*x*cos(e + f*x)**2 
/2 - B*a**3*d*sin(e + f*x)**4*cos(e + f*x)/f - 15*B*a**3*d*sin(e + f*x)**3 
*cos(e + f*x)/(8*f) - 4*B*a**3*d*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - 3 
*B*a**3*d*sin(e + f*x)**2*cos(e + f*x)/f - 9*B*a**3*d*sin(e + f*x)*cos(...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 398 vs. \(2 (189) = 378\).

Time = 0.04 (sec) , antiderivative size = 398, normalized size of antiderivative = 1.98 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {160 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{3} c + 360 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{3} c + 480 \, {\left (f x + e\right )} A a^{3} c + 480 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{3} c + 15 \, {\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^{3} c + 360 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{3} c + 480 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{3} d + 15 \, {\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^{3} d + 360 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{3} d - 32 \, {\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^{3} d + 480 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{3} d + 45 \, {\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^{3} d + 120 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{3} d - 1440 \, A a^{3} c \cos \left (f x + e\right ) - 480 \, B a^{3} c \cos \left (f x + e\right ) - 480 \, A a^{3} d \cos \left (f x + e\right )}{480 \, f} \] Input:

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorith 
m="maxima")
 

Output:

1/480*(160*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^3*c + 360*(2*f*x + 2*e - 
sin(2*f*x + 2*e))*A*a^3*c + 480*(f*x + e)*A*a^3*c + 480*(cos(f*x + e)^3 - 
3*cos(f*x + e))*B*a^3*c + 15*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f 
*x + 2*e))*B*a^3*c + 360*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^3*c + 480*(c 
os(f*x + e)^3 - 3*cos(f*x + e))*A*a^3*d + 15*(12*f*x + 12*e + sin(4*f*x + 
4*e) - 8*sin(2*f*x + 2*e))*A*a^3*d + 360*(2*f*x + 2*e - sin(2*f*x + 2*e))* 
A*a^3*d - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^ 
3*d + 480*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^3*d + 45*(12*f*x + 12*e + 
sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^3*d + 120*(2*f*x + 2*e - sin(2* 
f*x + 2*e))*B*a^3*d - 1440*A*a^3*c*cos(f*x + e) - 480*B*a^3*c*cos(f*x + e) 
 - 480*A*a^3*d*cos(f*x + e))/f
 

Giac [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.05 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=-\frac {B a^{3} d \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {1}{8} \, {\left (20 \, A a^{3} c + 15 \, B a^{3} c + 15 \, A a^{3} d + 13 \, B a^{3} d\right )} x + \frac {{\left (4 \, A a^{3} c + 12 \, B a^{3} c + 12 \, A a^{3} d + 17 \, B a^{3} d\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (30 \, A a^{3} c + 26 \, B a^{3} c + 26 \, A a^{3} d + 23 \, B a^{3} d\right )} \cos \left (f x + e\right )}{8 \, f} + \frac {{\left (B a^{3} c + A a^{3} d + 3 \, B a^{3} d\right )} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {{\left (3 \, A a^{3} c + 4 \, B a^{3} c + 4 \, A a^{3} d + 4 \, B a^{3} d\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorith 
m="giac")
 

Output:

-1/80*B*a^3*d*cos(5*f*x + 5*e)/f + 1/8*(20*A*a^3*c + 15*B*a^3*c + 15*A*a^3 
*d + 13*B*a^3*d)*x + 1/48*(4*A*a^3*c + 12*B*a^3*c + 12*A*a^3*d + 17*B*a^3* 
d)*cos(3*f*x + 3*e)/f - 1/8*(30*A*a^3*c + 26*B*a^3*c + 26*A*a^3*d + 23*B*a 
^3*d)*cos(f*x + e)/f + 1/32*(B*a^3*c + A*a^3*d + 3*B*a^3*d)*sin(4*f*x + 4* 
e)/f - 1/4*(3*A*a^3*c + 4*B*a^3*c + 4*A*a^3*d + 4*B*a^3*d)*sin(2*f*x + 2*e 
)/f
 

Mupad [B] (verification not implemented)

Time = 36.06 (sec) , antiderivative size = 550, normalized size of antiderivative = 2.74 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx =\text {Too large to display} \] Input:

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

Output:

(a^3*atan((a^3*tan(e/2 + (f*x)/2)*(20*A*c + 15*A*d + 15*B*c + 13*B*d))/(4* 
(5*A*a^3*c + (15*A*a^3*d)/4 + (15*B*a^3*c)/4 + (13*B*a^3*d)/4)))*(20*A*c + 
 15*A*d + 15*B*c + 13*B*d))/(4*f) - (a^3*(atan(tan(e/2 + (f*x)/2)) - (f*x) 
/2)*(20*A*c + 15*A*d + 15*B*c + 13*B*d))/(4*f) - (tan(e/2 + (f*x)/2)^3*(6* 
A*a^3*c + (19*A*a^3*d)/2 + (19*B*a^3*c)/2 + (25*B*a^3*d)/2) - tan(e/2 + (f 
*x)/2)^9*(3*A*a^3*c + (15*A*a^3*d)/4 + (15*B*a^3*c)/4 + (13*B*a^3*d)/4) - 
tan(e/2 + (f*x)/2)^7*(6*A*a^3*c + (19*A*a^3*d)/2 + (19*B*a^3*c)/2 + (25*B* 
a^3*d)/2) + tan(e/2 + (f*x)/2)^6*(28*A*a^3*c + 20*A*a^3*d + 20*B*a^3*c + 1 
2*B*a^3*d) + tan(e/2 + (f*x)/2)^2*((92*A*a^3*c)/3 + 28*A*a^3*d + 28*B*a^3* 
c + (76*B*a^3*d)/3) + tan(e/2 + (f*x)/2)^4*((136*A*a^3*c)/3 + 40*A*a^3*d + 
 40*B*a^3*c + (116*B*a^3*d)/3) + tan(e/2 + (f*x)/2)^8*(6*A*a^3*c + 2*A*a^3 
*d + 2*B*a^3*c) + tan(e/2 + (f*x)/2)*(3*A*a^3*c + (15*A*a^3*d)/4 + (15*B*a 
^3*c)/4 + (13*B*a^3*d)/4) + (22*A*a^3*c)/3 + 6*A*a^3*d + 6*B*a^3*c + (76*B 
*a^3*d)/15)/(f*(5*tan(e/2 + (f*x)/2)^2 + 10*tan(e/2 + (f*x)/2)^4 + 10*tan( 
e/2 + (f*x)/2)^6 + 5*tan(e/2 + (f*x)/2)^8 + tan(e/2 + (f*x)/2)^10 + 1))
                                                                                    
                                                                                    
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 297, normalized size of antiderivative = 1.48 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {a^{3} \left (-24 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} b d -30 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} a d -30 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} b c -90 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} b d -40 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a c -120 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a d -120 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b c -152 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b d -180 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a c -225 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a d -225 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b c -195 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b d -440 \cos \left (f x +e \right ) a c -360 \cos \left (f x +e \right ) a d -360 \cos \left (f x +e \right ) b c -304 \cos \left (f x +e \right ) b d +300 a c f x +440 a c +225 a d f x +360 a d +225 b c f x +360 b c +195 b d f x +304 b d \right )}{120 f} \] Input:

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

Output:

(a**3*( - 24*cos(e + f*x)*sin(e + f*x)**4*b*d - 30*cos(e + f*x)*sin(e + f* 
x)**3*a*d - 30*cos(e + f*x)*sin(e + f*x)**3*b*c - 90*cos(e + f*x)*sin(e + 
f*x)**3*b*d - 40*cos(e + f*x)*sin(e + f*x)**2*a*c - 120*cos(e + f*x)*sin(e 
 + f*x)**2*a*d - 120*cos(e + f*x)*sin(e + f*x)**2*b*c - 152*cos(e + f*x)*s 
in(e + f*x)**2*b*d - 180*cos(e + f*x)*sin(e + f*x)*a*c - 225*cos(e + f*x)* 
sin(e + f*x)*a*d - 225*cos(e + f*x)*sin(e + f*x)*b*c - 195*cos(e + f*x)*si 
n(e + f*x)*b*d - 440*cos(e + f*x)*a*c - 360*cos(e + f*x)*a*d - 360*cos(e + 
 f*x)*b*c - 304*cos(e + f*x)*b*d + 300*a*c*f*x + 440*a*c + 225*a*d*f*x + 3 
60*a*d + 225*b*c*f*x + 360*b*c + 195*b*d*f*x + 304*b*d))/(120*f)