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

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 = 222 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c-c \sin (e+f x))^5 \, dx=\frac {5}{128} a^3 (9 A-2 B) c^5 x+\frac {a^3 (9 A-2 B) c^5 \cos ^7(e+f x)}{56 f}+\frac {5 a^3 (9 A-2 B) c^5 \cos (e+f x) \sin (e+f x)}{128 f}+\frac {5 a^3 (9 A-2 B) c^5 \cos ^3(e+f x) \sin (e+f x)}{192 f}+\frac {a^3 (9 A-2 B) c^5 \cos ^5(e+f x) \sin (e+f x)}{48 f}-\frac {a^3 B c^3 \cos ^7(e+f x) (c-c \sin (e+f x))^2}{9 f}+\frac {a^3 (9 A-2 B) \cos ^7(e+f x) \left (c^5-c^5 \sin (e+f x)\right )}{72 f} \] Output:

5/128*a^3*(9*A-2*B)*c^5*x+1/56*a^3*(9*A-2*B)*c^5*cos(f*x+e)^7/f+5/128*a^3* 
(9*A-2*B)*c^5*cos(f*x+e)*sin(f*x+e)/f+5/192*a^3*(9*A-2*B)*c^5*cos(f*x+e)^3 
*sin(f*x+e)/f+1/48*a^3*(9*A-2*B)*c^5*cos(f*x+e)^5*sin(f*x+e)/f-1/9*a^3*B*c 
^3*cos(f*x+e)^7*(c-c*sin(f*x+e))^2/f+1/72*a^3*(9*A-2*B)*cos(f*x+e)^7*(c^5- 
c^5*sin(f*x+e))/f
 

Mathematica [A] (verified)

Time = 11.45 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.05 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c-c \sin (e+f x))^5 \, dx=\frac {(a+a \sin (e+f x))^3 (c-c \sin (e+f x))^5 (2520 (9 A-2 B) (e+f x)+504 (20 A-13 B) \cos (e+f x)+336 (18 A-11 B) \cos (3 (e+f x))+1008 (2 A-B) \cos (5 (e+f x))+36 (8 A-B) \cos (7 (e+f x))+28 B \cos (9 (e+f x))+2016 (8 A-B) \sin (2 (e+f x))+504 (5 A+2 B) \sin (4 (e+f x))+672 B \sin (6 (e+f x))-63 (A-2 B) \sin (8 (e+f x)))}{64512 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^{10} \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^6} \] Input:

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

Output:

((a + a*Sin[e + f*x])^3*(c - c*Sin[e + f*x])^5*(2520*(9*A - 2*B)*(e + f*x) 
 + 504*(20*A - 13*B)*Cos[e + f*x] + 336*(18*A - 11*B)*Cos[3*(e + f*x)] + 1 
008*(2*A - B)*Cos[5*(e + f*x)] + 36*(8*A - B)*Cos[7*(e + f*x)] + 28*B*Cos[ 
9*(e + f*x)] + 2016*(8*A - B)*Sin[2*(e + f*x)] + 504*(5*A + 2*B)*Sin[4*(e 
+ f*x)] + 672*B*Sin[6*(e + f*x)] - 63*(A - 2*B)*Sin[8*(e + f*x)]))/(64512* 
f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^10*(Cos[(e + f*x)/2] + Sin[(e + f* 
x)/2])^6)
 

Rubi [A] (verified)

Time = 0.93 (sec) , antiderivative size = 180, normalized size of antiderivative = 0.81, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3042, 3446, 3042, 3339, 3042, 3157, 3042, 3148, 3042, 3115, 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)^3 (c-c \sin (e+f x))^5 (A+B \sin (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3446

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3339

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3157

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3148

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3115

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3115

\(\displaystyle a^3 c^3 \left (\frac {1}{9} (9 A-2 B) \left (\frac {9}{8} c \left (c \left (\frac {5}{6} \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 {\sin (e+f x) \cos ^5(e+f x)}{6 f}\right )+\frac {c \cos ^7(e+f x)}{7 f}\right )+\frac {\cos ^7(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{8 f}\right )-\frac {B \cos ^7(e+f x) (c-c \sin (e+f x))^2}{9 f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle a^3 c^3 \left (\frac {1}{9} (9 A-2 B) \left (\frac {9}{8} c \left (c \left (\frac {5}{6} \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 {\sin (e+f x) \cos ^5(e+f x)}{6 f}\right )+\frac {c \cos ^7(e+f x)}{7 f}\right )+\frac {\cos ^7(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{8 f}\right )-\frac {B \cos ^7(e+f x) (c-c \sin (e+f x))^2}{9 f}\right )\)

\(\Big \downarrow \) 3115

\(\displaystyle a^3 c^3 \left (\frac {1}{9} (9 A-2 B) \left (\frac {9}{8} c \left (c \left (\frac {5}{6} \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 {\sin (e+f x) \cos ^5(e+f x)}{6 f}\right )+\frac {c \cos ^7(e+f x)}{7 f}\right )+\frac {\cos ^7(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{8 f}\right )-\frac {B \cos ^7(e+f x) (c-c \sin (e+f x))^2}{9 f}\right )\)

\(\Big \downarrow \) 24

\(\displaystyle a^3 c^3 \left (\frac {1}{9} (9 A-2 B) \left (\frac {\cos ^7(e+f x) \left (c^2-c^2 \sin (e+f x)\right )}{8 f}+\frac {9}{8} c \left (\frac {c \cos ^7(e+f x)}{7 f}+c \left (\frac {\sin (e+f x) \cos ^5(e+f x)}{6 f}+\frac {5}{6} \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 )\right )\right )-\frac {B \cos ^7(e+f x) (c-c \sin (e+f x))^2}{9 f}\right )\)

Input:

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

Output:

a^3*c^3*(-1/9*(B*Cos[e + f*x]^7*(c - c*Sin[e + f*x])^2)/f + ((9*A - 2*B)*( 
(Cos[e + f*x]^7*(c^2 - c^2*Sin[e + f*x]))/(8*f) + (9*c*((c*Cos[e + f*x]^7) 
/(7*f) + c*((Cos[e + f*x]^5*Sin[e + f*x])/(6*f) + (5*((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)))/8 
))/9)
 

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

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. \(610\) vs. \(2(208)=416\).

Time = 0.26 (sec) , antiderivative size = 611, normalized size of antiderivative = 2.75

\[\frac {a^{3} A \,c^{5} \left (f x +e \right )-2 a^{3} A \,c^{5} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )+6 a^{3} B \,c^{5} \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 )-2 a^{3} A \,c^{5} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+\frac {2 a^{3} B \,c^{5} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+2 a^{3} A \,c^{5} \cos \left (f x +e \right )-2 a^{3} B \,c^{5} \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 \,c^{5} \left (-\frac {\left (\sin \left (f x +e \right )^{7}+\frac {7 \sin \left (f x +e \right )^{5}}{6}+\frac {35 \sin \left (f x +e \right )^{3}}{24}+\frac {35 \sin \left (f x +e \right )}{16}\right ) \cos \left (f x +e \right )}{8}+\frac {35 f x}{128}+\frac {35 e}{128}\right )-\frac {2 a^{3} A \,c^{5} \left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )}{7}+2 a^{3} A \,c^{5} \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 {6 a^{3} A \,c^{5} \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}+\frac {a^{3} B \,c^{5} \left (\frac {128}{35}+\sin \left (f x +e \right )^{8}+\frac {8 \sin \left (f x +e \right )^{6}}{7}+\frac {48 \sin \left (f x +e \right )^{4}}{35}+\frac {64 \sin \left (f x +e \right )^{2}}{35}\right ) \cos \left (f x +e \right )}{9}+2 a^{3} B \,c^{5} \left (-\frac {\left (\sin \left (f x +e \right )^{7}+\frac {7 \sin \left (f x +e \right )^{5}}{6}+\frac {35 \sin \left (f x +e \right )^{3}}{24}+\frac {35 \sin \left (f x +e \right )}{16}\right ) \cos \left (f x +e \right )}{8}+\frac {35 f x}{128}+\frac {35 e}{128}\right )-\frac {2 a^{3} B \,c^{5} \left (\frac {16}{5}+\sin \left (f x +e \right )^{6}+\frac {6 \sin \left (f x +e \right )^{4}}{5}+\frac {8 \sin \left (f x +e \right )^{2}}{5}\right ) \cos \left (f x +e \right )}{7}-6 a^{3} B \,c^{5} \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 )-a^{3} B \,c^{5} \cos \left (f x +e \right )}{f}\]

Input:

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

Output:

1/f*(a^3*A*c^5*(f*x+e)-2*a^3*A*c^5*(2+sin(f*x+e)^2)*cos(f*x+e)+6*a^3*B*c^5 
*(-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*a^3*A*c^5 
*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)+2/3*a^3*B*c^5*(2+sin(f*x+e)^2) 
*cos(f*x+e)+2*a^3*A*c^5*cos(f*x+e)-2*a^3*B*c^5*(-1/2*sin(f*x+e)*cos(f*x+e) 
+1/2*f*x+1/2*e)-a^3*A*c^5*(-1/8*(sin(f*x+e)^7+7/6*sin(f*x+e)^5+35/24*sin(f 
*x+e)^3+35/16*sin(f*x+e))*cos(f*x+e)+35/128*f*x+35/128*e)-2/7*a^3*A*c^5*(1 
6/5+sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*cos(f*x+e)+2*a^3*A*c^5 
*(-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)+6/5*a^3*A*c^5*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+1/9* 
a^3*B*c^5*(128/35+sin(f*x+e)^8+8/7*sin(f*x+e)^6+48/35*sin(f*x+e)^4+64/35*s 
in(f*x+e)^2)*cos(f*x+e)+2*a^3*B*c^5*(-1/8*(sin(f*x+e)^7+7/6*sin(f*x+e)^5+3 
5/24*sin(f*x+e)^3+35/16*sin(f*x+e))*cos(f*x+e)+35/128*f*x+35/128*e)-2/7*a^ 
3*B*c^5*(16/5+sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*cos(f*x+e)-6 
*a^3*B*c^5*(-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)-a^3*B*c^5*cos(f*x+e))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 158, normalized size of antiderivative = 0.71 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c-c \sin (e+f x))^5 \, dx=\frac {896 \, B a^{3} c^{5} \cos \left (f x + e\right )^{9} + 2304 \, {\left (A - B\right )} a^{3} c^{5} \cos \left (f x + e\right )^{7} + 315 \, {\left (9 \, A - 2 \, B\right )} a^{3} c^{5} f x - 21 \, {\left (48 \, {\left (A - 2 \, B\right )} a^{3} c^{5} \cos \left (f x + e\right )^{7} - 8 \, {\left (9 \, A - 2 \, B\right )} a^{3} c^{5} \cos \left (f x + e\right )^{5} - 10 \, {\left (9 \, A - 2 \, B\right )} a^{3} c^{5} \cos \left (f x + e\right )^{3} - 15 \, {\left (9 \, A - 2 \, B\right )} a^{3} c^{5} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8064 \, f} \] Input:

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

Output:

1/8064*(896*B*a^3*c^5*cos(f*x + e)^9 + 2304*(A - B)*a^3*c^5*cos(f*x + e)^7 
 + 315*(9*A - 2*B)*a^3*c^5*f*x - 21*(48*(A - 2*B)*a^3*c^5*cos(f*x + e)^7 - 
 8*(9*A - 2*B)*a^3*c^5*cos(f*x + e)^5 - 10*(9*A - 2*B)*a^3*c^5*cos(f*x + e 
)^3 - 15*(9*A - 2*B)*a^3*c^5*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. 1753 vs. \(2 (209) = 418\).

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

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

Output:

Piecewise((-35*A*a**3*c**5*x*sin(e + f*x)**8/128 - 35*A*a**3*c**5*x*sin(e 
+ f*x)**6*cos(e + f*x)**2/32 + 5*A*a**3*c**5*x*sin(e + f*x)**6/8 - 105*A*a 
**3*c**5*x*sin(e + f*x)**4*cos(e + f*x)**4/64 + 15*A*a**3*c**5*x*sin(e + f 
*x)**4*cos(e + f*x)**2/8 - 35*A*a**3*c**5*x*sin(e + f*x)**2*cos(e + f*x)** 
6/32 + 15*A*a**3*c**5*x*sin(e + f*x)**2*cos(e + f*x)**4/8 - A*a**3*c**5*x* 
sin(e + f*x)**2 - 35*A*a**3*c**5*x*cos(e + f*x)**8/128 + 5*A*a**3*c**5*x*c 
os(e + f*x)**6/8 - A*a**3*c**5*x*cos(e + f*x)**2 + A*a**3*c**5*x + 93*A*a* 
*3*c**5*sin(e + f*x)**7*cos(e + f*x)/(128*f) - 2*A*a**3*c**5*sin(e + f*x)* 
*6*cos(e + f*x)/f + 511*A*a**3*c**5*sin(e + f*x)**5*cos(e + f*x)**3/(384*f 
) - 11*A*a**3*c**5*sin(e + f*x)**5*cos(e + f*x)/(8*f) - 4*A*a**3*c**5*sin( 
e + f*x)**4*cos(e + f*x)**3/f + 6*A*a**3*c**5*sin(e + f*x)**4*cos(e + f*x) 
/f + 385*A*a**3*c**5*sin(e + f*x)**3*cos(e + f*x)**5/(384*f) - 5*A*a**3*c* 
*5*sin(e + f*x)**3*cos(e + f*x)**3/(3*f) - 16*A*a**3*c**5*sin(e + f*x)**2* 
cos(e + f*x)**5/(5*f) + 8*A*a**3*c**5*sin(e + f*x)**2*cos(e + f*x)**3/f - 
6*A*a**3*c**5*sin(e + f*x)**2*cos(e + f*x)/f + 35*A*a**3*c**5*sin(e + f*x) 
*cos(e + f*x)**7/(128*f) - 5*A*a**3*c**5*sin(e + f*x)*cos(e + f*x)**5/(8*f 
) + A*a**3*c**5*sin(e + f*x)*cos(e + f*x)/f - 32*A*a**3*c**5*cos(e + f*x)* 
*7/(35*f) + 16*A*a**3*c**5*cos(e + f*x)**5/(5*f) - 4*A*a**3*c**5*cos(e + f 
*x)**3/f + 2*A*a**3*c**5*cos(e + f*x)/f + 35*B*a**3*c**5*x*sin(e + f*x)**8 
/64 + 35*B*a**3*c**5*x*sin(e + f*x)**6*cos(e + f*x)**2/16 - 15*B*a**3*c...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 617 vs. \(2 (210) = 420\).

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

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

Output:

1/322560*(18432*(5*cos(f*x + e)^7 - 21*cos(f*x + e)^5 + 35*cos(f*x + e)^3 
- 35*cos(f*x + e))*A*a^3*c^5 + 129024*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^ 
3 + 15*cos(f*x + e))*A*a^3*c^5 + 645120*(cos(f*x + e)^3 - 3*cos(f*x + e))* 
A*a^3*c^5 - 105*(128*sin(2*f*x + 2*e)^3 + 840*f*x + 840*e + 3*sin(8*f*x + 
8*e) + 168*sin(4*f*x + 4*e) - 768*sin(2*f*x + 2*e))*A*a^3*c^5 + 3360*(4*si 
n(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 
))*A*a^3*c^5 - 161280*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^3*c^5 + 322560* 
(f*x + e)*A*a^3*c^5 + 1024*(35*cos(f*x + e)^9 - 180*cos(f*x + e)^7 + 378*c 
os(f*x + e)^5 - 420*cos(f*x + e)^3 + 315*cos(f*x + e))*B*a^3*c^5 + 18432*( 
5*cos(f*x + e)^7 - 21*cos(f*x + e)^5 + 35*cos(f*x + e)^3 - 35*cos(f*x + e) 
)*B*a^3*c^5 - 215040*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^3*c^5 + 210*(12 
8*sin(2*f*x + 2*e)^3 + 840*f*x + 840*e + 3*sin(8*f*x + 8*e) + 168*sin(4*f* 
x + 4*e) - 768*sin(2*f*x + 2*e))*B*a^3*c^5 - 10080*(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^3*c^5 + 604 
80*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^3*c^5 - 161 
280*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^3*c^5 + 645120*A*a^3*c^5*cos(f*x 
+ e) - 322560*B*a^3*c^5*cos(f*x + e))/f
 

Giac [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 292, normalized size of antiderivative = 1.32 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c-c \sin (e+f x))^5 \, dx=\frac {B a^{3} c^{5} \cos \left (9 \, f x + 9 \, e\right )}{2304 \, f} + \frac {B a^{3} c^{5} \sin \left (6 \, f x + 6 \, e\right )}{96 \, f} + \frac {5}{128} \, {\left (9 \, A a^{3} c^{5} - 2 \, B a^{3} c^{5}\right )} x + \frac {{\left (8 \, A a^{3} c^{5} - B a^{3} c^{5}\right )} \cos \left (7 \, f x + 7 \, e\right )}{1792 \, f} + \frac {{\left (2 \, A a^{3} c^{5} - B a^{3} c^{5}\right )} \cos \left (5 \, f x + 5 \, e\right )}{64 \, f} + \frac {{\left (18 \, A a^{3} c^{5} - 11 \, B a^{3} c^{5}\right )} \cos \left (3 \, f x + 3 \, e\right )}{192 \, f} + \frac {{\left (20 \, A a^{3} c^{5} - 13 \, B a^{3} c^{5}\right )} \cos \left (f x + e\right )}{128 \, f} - \frac {{\left (A a^{3} c^{5} - 2 \, B a^{3} c^{5}\right )} \sin \left (8 \, f x + 8 \, e\right )}{1024 \, f} + \frac {{\left (5 \, A a^{3} c^{5} + 2 \, B a^{3} c^{5}\right )} \sin \left (4 \, f x + 4 \, e\right )}{128 \, f} + \frac {{\left (8 \, A a^{3} c^{5} - B a^{3} c^{5}\right )} \sin \left (2 \, f x + 2 \, e\right )}{32 \, f} \] Input:

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

Output:

1/2304*B*a^3*c^5*cos(9*f*x + 9*e)/f + 1/96*B*a^3*c^5*sin(6*f*x + 6*e)/f + 
5/128*(9*A*a^3*c^5 - 2*B*a^3*c^5)*x + 1/1792*(8*A*a^3*c^5 - B*a^3*c^5)*cos 
(7*f*x + 7*e)/f + 1/64*(2*A*a^3*c^5 - B*a^3*c^5)*cos(5*f*x + 5*e)/f + 1/19 
2*(18*A*a^3*c^5 - 11*B*a^3*c^5)*cos(3*f*x + 3*e)/f + 1/128*(20*A*a^3*c^5 - 
 13*B*a^3*c^5)*cos(f*x + e)/f - 1/1024*(A*a^3*c^5 - 2*B*a^3*c^5)*sin(8*f*x 
 + 8*e)/f + 1/128*(5*A*a^3*c^5 + 2*B*a^3*c^5)*sin(4*f*x + 4*e)/f + 1/32*(8 
*A*a^3*c^5 - B*a^3*c^5)*sin(2*f*x + 2*e)/f
 

Mupad [B] (verification not implemented)

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

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

Output:

(tan(e/2 + (f*x)/2)^16*(4*A*a^3*c^5 - 2*B*a^3*c^5) + tan(e/2 + (f*x)/2)^14 
*(8*A*a^3*c^5 - 8*B*a^3*c^5) + tan(e/2 + (f*x)/2)^2*((8*A*a^3*c^5)/7 - (8* 
B*a^3*c^5)/7) + tan(e/2 + (f*x)/2)^8*(32*A*a^3*c^5 - 4*B*a^3*c^5) + tan(e/ 
2 + (f*x)/2)^6*(24*A*a^3*c^5 - 24*B*a^3*c^5) + tan(e/2 + (f*x)/2)^12*(24*A 
*a^3*c^5 - (16*B*a^3*c^5)/3) + tan(e/2 + (f*x)/2)^10*(40*A*a^3*c^5 - 40*B* 
a^3*c^5) + tan(e/2 + (f*x)/2)^4*((88*A*a^3*c^5)/7 - (32*B*a^3*c^5)/7) - ta 
n(e/2 + (f*x)/2)^17*((83*A*a^3*c^5)/64 + (5*B*a^3*c^5)/32) + tan(e/2 + (f* 
x)/2)^5*((149*A*a^3*c^5)/32 + (83*B*a^3*c^5)/16) - tan(e/2 + (f*x)/2)^13*( 
(149*A*a^3*c^5)/32 + (83*B*a^3*c^5)/16) + tan(e/2 + (f*x)/2)^3*((189*A*a^3 
*c^5)/32 - (191*B*a^3*c^5)/48) - tan(e/2 + (f*x)/2)^15*((189*A*a^3*c^5)/32 
 - (191*B*a^3*c^5)/48) + tan(e/2 + (f*x)/2)^7*((409*A*a^3*c^5)/32 - (145*B 
*a^3*c^5)/16) - tan(e/2 + (f*x)/2)^11*((409*A*a^3*c^5)/32 - (145*B*a^3*c^5 
)/16) + tan(e/2 + (f*x)/2)*((83*A*a^3*c^5)/64 + (5*B*a^3*c^5)/32) + (4*A*a 
^3*c^5)/7 - (22*B*a^3*c^5)/63)/(f*(9*tan(e/2 + (f*x)/2)^2 + 36*tan(e/2 + ( 
f*x)/2)^4 + 84*tan(e/2 + (f*x)/2)^6 + 126*tan(e/2 + (f*x)/2)^8 + 126*tan(e 
/2 + (f*x)/2)^10 + 84*tan(e/2 + (f*x)/2)^12 + 36*tan(e/2 + (f*x)/2)^14 + 9 
*tan(e/2 + (f*x)/2)^16 + tan(e/2 + (f*x)/2)^18 + 1)) + (5*a^3*c^5*atan((5* 
a^3*c^5*tan(e/2 + (f*x)/2)*(9*A - 2*B))/(64*((45*A*a^3*c^5)/64 - (5*B*a^3* 
c^5)/32)))*(9*A - 2*B))/(64*f)
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 297, normalized size of antiderivative = 1.34 \[ \int (a+a \sin (e+f x))^3 (A+B \sin (e+f x)) (c-c \sin (e+f x))^5 \, dx=\frac {a^{3} c^{5} \left (896 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{8} b +1008 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{7} a -2016 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{7} b -2304 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{6} a -1280 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{6} b -1512 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5} a +5712 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5} b +6912 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} a -1536 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} b -1890 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} a -4956 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} b -6912 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a +3328 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b +5229 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a +630 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b +2304 \cos \left (f x +e \right ) a -1408 \cos \left (f x +e \right ) b +2835 a f x -2304 a -630 b f x +1408 b \right )}{8064 f} \] Input:

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

Output:

(a**3*c**5*(896*cos(e + f*x)*sin(e + f*x)**8*b + 1008*cos(e + f*x)*sin(e + 
 f*x)**7*a - 2016*cos(e + f*x)*sin(e + f*x)**7*b - 2304*cos(e + f*x)*sin(e 
 + f*x)**6*a - 1280*cos(e + f*x)*sin(e + f*x)**6*b - 1512*cos(e + f*x)*sin 
(e + f*x)**5*a + 5712*cos(e + f*x)*sin(e + f*x)**5*b + 6912*cos(e + f*x)*s 
in(e + f*x)**4*a - 1536*cos(e + f*x)*sin(e + f*x)**4*b - 1890*cos(e + f*x) 
*sin(e + f*x)**3*a - 4956*cos(e + f*x)*sin(e + f*x)**3*b - 6912*cos(e + f* 
x)*sin(e + f*x)**2*a + 3328*cos(e + f*x)*sin(e + f*x)**2*b + 5229*cos(e + 
f*x)*sin(e + f*x)*a + 630*cos(e + f*x)*sin(e + f*x)*b + 2304*cos(e + f*x)* 
a - 1408*cos(e + f*x)*b + 2835*a*f*x - 2304*a - 630*b*f*x + 1408*b))/(8064 
*f)