\(\int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx\) [257]

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 = 26, antiderivative size = 112 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx=\frac {5}{16} a^3 c^4 x+\frac {a^3 c^4 \cos ^7(e+f x)}{7 f}+\frac {5 a^3 c^4 \cos (e+f x) \sin (e+f x)}{16 f}+\frac {5 a^3 c^4 \cos ^3(e+f x) \sin (e+f x)}{24 f}+\frac {a^3 c^4 \cos ^5(e+f x) \sin (e+f x)}{6 f} \] Output:

5/16*a^3*c^4*x+1/7*a^3*c^4*cos(f*x+e)^7/f+5/16*a^3*c^4*cos(f*x+e)*sin(f*x+ 
e)/f+5/24*a^3*c^4*cos(f*x+e)^3*sin(f*x+e)/f+1/6*a^3*c^4*cos(f*x+e)^5*sin(f 
*x+e)/f
 

Mathematica [A] (verified)

Time = 8.31 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.79 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx=\frac {a^3 c^4 (420 e+420 f x+105 \cos (e+f x)+63 \cos (3 (e+f x))+21 \cos (5 (e+f x))+3 \cos (7 (e+f x))+315 \sin (2 (e+f x))+63 \sin (4 (e+f x))+7 \sin (6 (e+f x)))}{1344 f} \] Input:

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

Output:

(a^3*c^4*(420*e + 420*f*x + 105*Cos[e + f*x] + 63*Cos[3*(e + f*x)] + 21*Co 
s[5*(e + f*x)] + 3*Cos[7*(e + f*x)] + 315*Sin[2*(e + f*x)] + 63*Sin[4*(e + 
 f*x)] + 7*Sin[6*(e + f*x)]))/(1344*f)
 

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.92, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.423, Rules used = {3042, 3215, 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))^4 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3215

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3148

\(\displaystyle a^3 c^3 \left (c \int \cos ^6(e+f x)dx+\frac {c \cos ^7(e+f x)}{7 f}\right )\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3115

\(\displaystyle a^3 c^3 \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 )\)

\(\Big \downarrow \) 3042

\(\displaystyle a^3 c^3 \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 )\)

\(\Big \downarrow \) 3115

\(\displaystyle a^3 c^3 \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 )\)

\(\Big \downarrow \) 3042

\(\displaystyle a^3 c^3 \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 )\)

\(\Big \downarrow \) 3115

\(\displaystyle a^3 c^3 \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 )\)

\(\Big \downarrow \) 24

\(\displaystyle a^3 c^3 \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 )\)

Input:

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

Output:

a^3*c^3*((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))
 

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 3215
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + 
(f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m   Int[Cos[e + f*x]^(2*m)*(c + 
 d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ 
b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] &&  !(IntegerQ[n] && ((Lt 
Q[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. \(254\) vs. \(2(102)=204\).

Time = 1.13 (sec) , antiderivative size = 255, normalized size of antiderivative = 2.28

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

Input:

int((a+sin(f*x+e)*a)^3*(c-c*sin(f*x+e))^4,x)
 

Output:

1/f*(-1/7*c^4*a^3*(16/5+sin(f*x+e)^6+6/5*sin(f*x+e)^4+8/5*sin(f*x+e)^2)*co 
s(f*x+e)-c^4*a^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)+3/5*c^4*a^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*c 
os(f*x+e)+3*c^4*a^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)-c^4*a^3*(2+sin(f*x+e)^2)*cos(f*x+e)-3*c^4*a^3*(-1/2*cos(f*x+e)*sin 
(f*x+e)+1/2*f*x+1/2*e)+a^3*c^4*cos(f*x+e)+c^4*a^3*(f*x+e))
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.78 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx=\frac {48 \, a^{3} c^{4} \cos \left (f x + e\right )^{7} + 105 \, a^{3} c^{4} f x + 7 \, {\left (8 \, a^{3} c^{4} \cos \left (f x + e\right )^{5} + 10 \, a^{3} c^{4} \cos \left (f x + e\right )^{3} + 15 \, a^{3} c^{4} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{336 \, f} \] Input:

integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^4,x, algorithm="fricas")
 

Output:

1/336*(48*a^3*c^4*cos(f*x + e)^7 + 105*a^3*c^4*f*x + 7*(8*a^3*c^4*cos(f*x 
+ e)^5 + 10*a^3*c^4*cos(f*x + e)^3 + 15*a^3*c^4*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. 631 vs. \(2 (107) = 214\).

Time = 0.54 (sec) , antiderivative size = 631, normalized size of antiderivative = 5.63 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx =\text {Too large to display} \] Input:

integrate((a+a*sin(f*x+e))**3*(c-c*sin(f*x+e))**4,x)
 

Output:

Piecewise((-5*a**3*c**4*x*sin(e + f*x)**6/16 - 15*a**3*c**4*x*sin(e + f*x) 
**4*cos(e + f*x)**2/16 + 9*a**3*c**4*x*sin(e + f*x)**4/8 - 15*a**3*c**4*x* 
sin(e + f*x)**2*cos(e + f*x)**4/16 + 9*a**3*c**4*x*sin(e + f*x)**2*cos(e + 
 f*x)**2/4 - 3*a**3*c**4*x*sin(e + f*x)**2/2 - 5*a**3*c**4*x*cos(e + f*x)* 
*6/16 + 9*a**3*c**4*x*cos(e + f*x)**4/8 - 3*a**3*c**4*x*cos(e + f*x)**2/2 
+ a**3*c**4*x - a**3*c**4*sin(e + f*x)**6*cos(e + f*x)/f + 11*a**3*c**4*si 
n(e + f*x)**5*cos(e + f*x)/(16*f) - 2*a**3*c**4*sin(e + f*x)**4*cos(e + f* 
x)**3/f + 3*a**3*c**4*sin(e + f*x)**4*cos(e + f*x)/f + 5*a**3*c**4*sin(e + 
 f*x)**3*cos(e + f*x)**3/(6*f) - 15*a**3*c**4*sin(e + f*x)**3*cos(e + f*x) 
/(8*f) - 8*a**3*c**4*sin(e + f*x)**2*cos(e + f*x)**5/(5*f) + 4*a**3*c**4*s 
in(e + f*x)**2*cos(e + f*x)**3/f - 3*a**3*c**4*sin(e + f*x)**2*cos(e + f*x 
)/f + 5*a**3*c**4*sin(e + f*x)*cos(e + f*x)**5/(16*f) - 9*a**3*c**4*sin(e 
+ f*x)*cos(e + f*x)**3/(8*f) + 3*a**3*c**4*sin(e + f*x)*cos(e + f*x)/(2*f) 
 - 16*a**3*c**4*cos(e + f*x)**7/(35*f) + 8*a**3*c**4*cos(e + f*x)**5/(5*f) 
 - 2*a**3*c**4*cos(e + f*x)**3/f + a**3*c**4*cos(e + f*x)/f, Ne(f, 0)), (x 
*(a*sin(e) + a)**3*(-c*sin(e) + c)**4, True))
 

Maxima [B] (verification not implemented)

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

Time = 0.04 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.29 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx=\frac {192 \, {\left (5 \, \cos \left (f x + e\right )^{7} - 21 \, \cos \left (f x + e\right )^{5} + 35 \, \cos \left (f x + e\right )^{3} - 35 \, \cos \left (f x + e\right )\right )} a^{3} c^{4} + 1344 \, {\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^{3} c^{4} + 6720 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c^{4} - 35 \, {\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 )} a^{3} c^{4} + 630 \, {\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^{3} c^{4} - 5040 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c^{4} + 6720 \, {\left (f x + e\right )} a^{3} c^{4} + 6720 \, a^{3} c^{4} \cos \left (f x + e\right )}{6720 \, f} \] Input:

integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^4,x, algorithm="maxima")
 

Output:

1/6720*(192*(5*cos(f*x + e)^7 - 21*cos(f*x + e)^5 + 35*cos(f*x + e)^3 - 35 
*cos(f*x + e))*a^3*c^4 + 1344*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*c 
os(f*x + e))*a^3*c^4 + 6720*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*c^4 - 35 
*(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))*a^3*c^4 + 630*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2 
*e))*a^3*c^4 - 5040*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^3*c^4 + 6720*(f*x + 
 e)*a^3*c^4 + 6720*a^3*c^4*cos(f*x + e))/f
 

Giac [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.31 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx=\frac {5}{16} \, a^{3} c^{4} x + \frac {a^{3} c^{4} \cos \left (7 \, f x + 7 \, e\right )}{448 \, f} + \frac {a^{3} c^{4} \cos \left (5 \, f x + 5 \, e\right )}{64 \, f} + \frac {3 \, a^{3} c^{4} \cos \left (3 \, f x + 3 \, e\right )}{64 \, f} + \frac {5 \, a^{3} c^{4} \cos \left (f x + e\right )}{64 \, f} + \frac {a^{3} c^{4} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {3 \, a^{3} c^{4} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} + \frac {15 \, a^{3} c^{4} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \] Input:

integrate((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^4,x, algorithm="giac")
 

Output:

5/16*a^3*c^4*x + 1/448*a^3*c^4*cos(7*f*x + 7*e)/f + 1/64*a^3*c^4*cos(5*f*x 
 + 5*e)/f + 3/64*a^3*c^4*cos(3*f*x + 3*e)/f + 5/64*a^3*c^4*cos(f*x + e)/f 
+ 1/192*a^3*c^4*sin(6*f*x + 6*e)/f + 3/64*a^3*c^4*sin(4*f*x + 4*e)/f + 15/ 
64*a^3*c^4*sin(2*f*x + 2*e)/f
 

Mupad [B] (verification not implemented)

Time = 20.74 (sec) , antiderivative size = 301, normalized size of antiderivative = 2.69 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx=\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}\,\left (\frac {a^3\,c^4\,\left (735\,e+735\,f\,x+672\right )}{336}-\frac {35\,a^3\,c^4\,\left (e+f\,x\right )}{16}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {a^3\,c^4\,\left (2205\,e+2205\,f\,x+2016\right )}{336}-\frac {105\,a^3\,c^4\,\left (e+f\,x\right )}{16}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (\frac {a^3\,c^4\,\left (3675\,e+3675\,f\,x+3360\right )}{336}-\frac {175\,a^3\,c^4\,\left (e+f\,x\right )}{16}\right )+\frac {7\,a^3\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{6}+\frac {85\,a^3\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{24}-\frac {85\,a^3\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9}{24}-\frac {7\,a^3\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}}{6}-\frac {11\,a^3\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{13}}{8}+\frac {a^3\,c^4\,\left (105\,e+105\,f\,x+96\right )}{336}+\frac {11\,a^3\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{8}-\frac {5\,a^3\,c^4\,\left (e+f\,x\right )}{16}}{f\,{\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}^7}+\frac {5\,a^3\,c^4\,x}{16} \] Input:

int((a + a*sin(e + f*x))^3*(c - c*sin(e + f*x))^4,x)
 

Output:

(tan(e/2 + (f*x)/2)^12*((a^3*c^4*(735*e + 735*f*x + 672))/336 - (35*a^3*c^ 
4*(e + f*x))/16) + tan(e/2 + (f*x)/2)^4*((a^3*c^4*(2205*e + 2205*f*x + 201 
6))/336 - (105*a^3*c^4*(e + f*x))/16) + tan(e/2 + (f*x)/2)^8*((a^3*c^4*(36 
75*e + 3675*f*x + 3360))/336 - (175*a^3*c^4*(e + f*x))/16) + (7*a^3*c^4*ta 
n(e/2 + (f*x)/2)^3)/6 + (85*a^3*c^4*tan(e/2 + (f*x)/2)^5)/24 - (85*a^3*c^4 
*tan(e/2 + (f*x)/2)^9)/24 - (7*a^3*c^4*tan(e/2 + (f*x)/2)^11)/6 - (11*a^3* 
c^4*tan(e/2 + (f*x)/2)^13)/8 + (a^3*c^4*(105*e + 105*f*x + 96))/336 + (11* 
a^3*c^4*tan(e/2 + (f*x)/2))/8 - (5*a^3*c^4*(e + f*x))/16)/(f*(tan(e/2 + (f 
*x)/2)^2 + 1)^7) + (5*a^3*c^4*x)/16
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.06 \[ \int (a+a \sin (e+f x))^3 (c-c \sin (e+f x))^4 \, dx=\frac {a^{3} c^{4} \left (-48 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{6}+56 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5}+144 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4}-182 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3}-144 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2}+231 \cos \left (f x +e \right ) \sin \left (f x +e \right )+48 \cos \left (f x +e \right )+105 f x -48\right )}{336 f} \] Input:

int((a+a*sin(f*x+e))^3*(c-c*sin(f*x+e))^4,x)
 

Output:

(a**3*c**4*( - 48*cos(e + f*x)*sin(e + f*x)**6 + 56*cos(e + f*x)*sin(e + f 
*x)**5 + 144*cos(e + f*x)*sin(e + f*x)**4 - 182*cos(e + f*x)*sin(e + f*x)* 
*3 - 144*cos(e + f*x)*sin(e + f*x)**2 + 231*cos(e + f*x)*sin(e + f*x) + 48 
*cos(e + f*x) + 105*f*x - 48))/(336*f)