Integrand size = 40, antiderivative size = 203 \[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx=-\frac {8 a^3 (g \cos (e+f x))^{6-2 m} (a+a \sin (e+f x))^{-3+m} (c-c \sin (e+f x))^n}{f g (3-m+n) (4-m+n) (5-m+n)}-\frac {4 a^2 (g \cos (e+f x))^{6-2 m} (a+a \sin (e+f x))^{-2+m} (c-c \sin (e+f x))^n}{f g (4-m+n) (5-m+n)}-\frac {a (g \cos (e+f x))^{6-2 m} (a+a \sin (e+f x))^{-1+m} (c-c \sin (e+f x))^n}{f g (5-m+n)} \] Output:
-8*a^3*(g*cos(f*x+e))^(6-2*m)*(a+a*sin(f*x+e))^(-3+m)*(c-c*sin(f*x+e))^n/f /g/(3-m+n)/(4-m+n)/(5-m+n)-4*a^2*(g*cos(f*x+e))^(6-2*m)*(a+a*sin(f*x+e))^( -2+m)*(c-c*sin(f*x+e))^n/f/g/(4-m+n)/(5-m+n)-a*(g*cos(f*x+e))^(6-2*m)*(a+a *sin(f*x+e))^(-1+m)*(c-c*sin(f*x+e))^n/f/g/(5-m+n)
Time = 7.02 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.03 \[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx=\frac {e^{n (-2 \log (\cos (e+f x))+\log (a (1+\sin (e+f x)))+\log (c-c \sin (e+f x)))} g^5 \cos ^{2 n}(e+f x) (g \cos (e+f x))^{-2 m} \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^6 (a (1+\sin (e+f x)))^{m-n} \left (-76+29 m-3 m^2-29 n+6 m n-3 n^2+\left (12+m^2+7 n+n^2-m (7+2 n)\right ) \cos (2 (e+f x))-4 \left (18-9 m+m^2+9 n-2 m n+n^2\right ) \sin (e+f x)\right )}{2 f (3-m+n) (4-m+n) (5-m+n)} \] Input:
Integrate[(g*Cos[e + f*x])^(5 - 2*m)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^n,x]
Output:
(E^(n*(-2*Log[Cos[e + f*x]] + Log[a*(1 + Sin[e + f*x])] + Log[c - c*Sin[e + f*x]]))*g^5*Cos[e + f*x]^(2*n)*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^6*( a*(1 + Sin[e + f*x]))^(m - n)*(-76 + 29*m - 3*m^2 - 29*n + 6*m*n - 3*n^2 + (12 + m^2 + 7*n + n^2 - m*(7 + 2*n))*Cos[2*(e + f*x)] - 4*(18 - 9*m + m^2 + 9*n - 2*m*n + n^2)*Sin[e + f*x]))/(2*f*(3 - m + n)*(4 - m + n)*(5 - m + n)*(g*Cos[e + f*x])^(2*m))
Time = 1.10 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 3325, 3042, 3325, 3042, 3323}
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)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{5-2 m} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{5-2 m}dx\) |
\(\Big \downarrow \) 3325 |
\(\displaystyle \frac {4 a \int (g \cos (e+f x))^{5-2 m} (\sin (e+f x) a+a)^{m-1} (c-c \sin (e+f x))^ndx}{-m+n+5}-\frac {a (a \sin (e+f x)+a)^{m-1} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {4 a \int (g \cos (e+f x))^{5-2 m} (\sin (e+f x) a+a)^{m-1} (c-c \sin (e+f x))^ndx}{-m+n+5}-\frac {a (a \sin (e+f x)+a)^{m-1} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+5)}\) |
\(\Big \downarrow \) 3325 |
\(\displaystyle \frac {4 a \left (\frac {2 a \int (g \cos (e+f x))^{5-2 m} (\sin (e+f x) a+a)^{m-2} (c-c \sin (e+f x))^ndx}{-m+n+4}-\frac {a (a \sin (e+f x)+a)^{m-2} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+4)}\right )}{-m+n+5}-\frac {a (a \sin (e+f x)+a)^{m-1} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+5)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {4 a \left (\frac {2 a \int (g \cos (e+f x))^{5-2 m} (\sin (e+f x) a+a)^{m-2} (c-c \sin (e+f x))^ndx}{-m+n+4}-\frac {a (a \sin (e+f x)+a)^{m-2} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+4)}\right )}{-m+n+5}-\frac {a (a \sin (e+f x)+a)^{m-1} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+5)}\) |
\(\Big \downarrow \) 3323 |
\(\displaystyle \frac {4 a \left (-\frac {2 a^2 (a \sin (e+f x)+a)^{m-3} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+3) (-m+n+4)}-\frac {a (a \sin (e+f x)+a)^{m-2} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+4)}\right )}{-m+n+5}-\frac {a (a \sin (e+f x)+a)^{m-1} (c-c \sin (e+f x))^n (g \cos (e+f x))^{6-2 m}}{f g (-m+n+5)}\) |
Input:
Int[(g*Cos[e + f*x])^(5 - 2*m)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x]) ^n,x]
Output:
-((a*(g*Cos[e + f*x])^(6 - 2*m)*(a + a*Sin[e + f*x])^(-1 + m)*(c - c*Sin[e + f*x])^n)/(f*g*(5 - m + n))) + (4*a*((-2*a^2*(g*Cos[e + f*x])^(6 - 2*m)* (a + a*Sin[e + f*x])^(-3 + m)*(c - c*Sin[e + f*x])^n)/(f*g*(3 - m + n)*(4 - m + n)) - (a*(g*Cos[e + f*x])^(6 - 2*m)*(a + a*Sin[e + f*x])^(-2 + m)*(c - c*Sin[e + f*x])^n)/(f*g*(4 - m + n))))/(5 - m + n)
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b* (g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m - 1)*((c + d*Sin[e + f*x]) ^n/(f*g*(m - n - 1))), x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && Eq Q[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && EqQ[2*m + p - 1, 0] && NeQ[m - n - 1, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(- b)*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^(m - 1)*((c + d*Sin[e + f* x])^n/(f*g*(m + n + p))), x] + Simp[a*((2*m + p - 1)/(m + n + p)) Int[(g* Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IGtQ[Simplify[m + p/2 - 1/2], 0] && !LtQ[n, -1] && !(IGtQ[Sim plify[n + p/2 - 1/2], 0] && GtQ[m - n, 0]) && !(ILtQ[Simplify[m + n + p], 0] && GtQ[Simplify[2*m + n + 3*(p/2) + 1], 0])
\[\int \left (g \cos \left (f x +e \right )\right )^{5-2 m} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{n}d x\]
Input:
int((g*cos(f*x+e))^(5-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x)
Output:
int((g*cos(f*x+e))^(5-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x)
Leaf count of result is larger than twice the leaf count of optimal. 651 vs. \(2 (202) = 404\).
Time = 0.14 (sec) , antiderivative size = 651, normalized size of antiderivative = 3.21 \[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx =\text {Too large to display} \] Input:
integrate((g*cos(f*x+e))^(5-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x, algorithm="fricas")
Output:
-((m^2 - (2*m - 7)*n + n^2 - 7*m + 12)*cos(f*x + e)^3 - (m^2 - (2*m - 11)* n + n^2 - 11*m + 24)*cos(f*x + e)^2 - 2*(m^2 - (2*m - 9)*n + n^2 - 9*m + 2 2)*cos(f*x + e) - ((m^2 - (2*m - 7)*n + n^2 - 7*m + 12)*cos(f*x + e)^2 + 2 *(m^2 - (2*m - 9)*n + n^2 - 9*m + 18)*cos(f*x + e) - 8)*sin(f*x + e) - 8)* (g*cos(f*x + e))^(-2*m + 5)*(a*sin(f*x + e) + a)^m*e^(2*n*log(g*cos(f*x + e)) - n*log(a*sin(f*x + e) + a) + n*log(a*c/g^2))/(4*f*m^3 - 4*f*n^3 - (f* m^3 - f*n^3 - 12*f*m^2 + 3*(f*m - 4*f)*n^2 + 47*f*m - (3*f*m^2 - 24*f*m + 47*f)*n - 60*f)*cos(f*x + e)^3 - 48*f*m^2 + 12*(f*m - 4*f)*n^2 - 3*(f*m^3 - f*n^3 - 12*f*m^2 + 3*(f*m - 4*f)*n^2 + 47*f*m - (3*f*m^2 - 24*f*m + 47*f )*n - 60*f)*cos(f*x + e)^2 + 188*f*m - 4*(3*f*m^2 - 24*f*m + 47*f)*n + 2*( f*m^3 - f*n^3 - 12*f*m^2 + 3*(f*m - 4*f)*n^2 + 47*f*m - (3*f*m^2 - 24*f*m + 47*f)*n - 60*f)*cos(f*x + e) + (4*f*m^3 - 4*f*n^3 - 48*f*m^2 + 12*(f*m - 4*f)*n^2 - (f*m^3 - f*n^3 - 12*f*m^2 + 3*(f*m - 4*f)*n^2 + 47*f*m - (3*f* m^2 - 24*f*m + 47*f)*n - 60*f)*cos(f*x + e)^2 + 188*f*m - 4*(3*f*m^2 - 24* f*m + 47*f)*n + 2*(f*m^3 - f*n^3 - 12*f*m^2 + 3*(f*m - 4*f)*n^2 + 47*f*m - (3*f*m^2 - 24*f*m + 47*f)*n - 60*f)*cos(f*x + e) - 240*f)*sin(f*x + e) - 240*f)
Timed out. \[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx=\text {Timed out} \] Input:
integrate((g*cos(f*x+e))**(5-2*m)*(a+a*sin(f*x+e))**m*(c-c*sin(f*x+e))**n, x)
Output:
Timed out
Leaf count of result is larger than twice the leaf count of optimal. 978 vs. \(2 (202) = 404\).
Time = 0.32 (sec) , antiderivative size = 978, normalized size of antiderivative = 4.82 \[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx=\text {Too large to display} \] Input:
integrate((g*cos(f*x+e))^(5-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x, algorithm="maxima")
Output:
((m^2 - m*(2*n + 11) + n^2 + 11*n + 32)*a^m*c^n*g^5 - 2*(m^2 - m*(2*n + 15 ) + n^2 + 15*n + 60)*a^m*c^n*g^5*sin(f*x + e)/(cos(f*x + e) + 1) - (3*m^2 - m*(6*n + 1) + 3*n^2 + n - 160)*a^m*c^n*g^5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 8*(m^2 - m*(2*n + 7) + n^2 + 7*n - 20)*a^m*c^n*g^5*sin(f*x + e)^3 /(cos(f*x + e) + 1)^3 + 2*(m^2 - m*(2*n - 5) + n^2 - 5*n + 160)*a^m*c^n*g^ 5*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 - 4*(3*m^2 - m*(6*n + 13) + 3*n^2 + 13*n + 116)*a^m*c^n*g^5*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 2*(m^2 - m*( 2*n - 5) + n^2 - 5*n + 160)*a^m*c^n*g^5*sin(f*x + e)^6/(cos(f*x + e) + 1)^ 6 + 8*(m^2 - m*(2*n + 7) + n^2 + 7*n - 20)*a^m*c^n*g^5*sin(f*x + e)^7/(cos (f*x + e) + 1)^7 - (3*m^2 - m*(6*n + 1) + 3*n^2 + n - 160)*a^m*c^n*g^5*sin (f*x + e)^8/(cos(f*x + e) + 1)^8 - 2*(m^2 - m*(2*n + 15) + n^2 + 15*n + 60 )*a^m*c^n*g^5*sin(f*x + e)^9/(cos(f*x + e) + 1)^9 + (m^2 - m*(2*n + 11) + n^2 + 11*n + 32)*a^m*c^n*g^5*sin(f*x + e)^10/(cos(f*x + e) + 1)^10)*e^(2*n *log(sin(f*x + e)/(cos(f*x + e) + 1) - 1) - 2*m*log(-sin(f*x + e)/(cos(f*x + e) + 1) + 1) + m*log(sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1) - n*log(s in(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1))/(((m^3 - 3*m^2*(n + 4) - n^3 + (3 *n^2 + 24*n + 47)*m - 12*n^2 - 47*n - 60)*g^(2*m) + 5*(m^3 - 3*m^2*(n + 4) - n^3 + (3*n^2 + 24*n + 47)*m - 12*n^2 - 47*n - 60)*g^(2*m)*sin(f*x + e)^ 2/(cos(f*x + e) + 1)^2 + 10*(m^3 - 3*m^2*(n + 4) - n^3 + (3*n^2 + 24*n + 4 7)*m - 12*n^2 - 47*n - 60)*g^(2*m)*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 ...
Leaf count of result is larger than twice the leaf count of optimal. 86180 vs. \(2 (202) = 404\).
Time = 28.94 (sec) , antiderivative size = 86180, normalized size of antiderivative = 424.53 \[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx=\text {Too large to display} \] Input:
integrate((g*cos(f*x+e))^(5-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x, algorithm="giac")
Output:
4*(m^2*e^(m*log(2) - n*log(2) - 2*m*log(4*abs(tan(1/8*pi - 1/4*f*x - 1/4*e ))/(tan(1/8*pi - 1/4*f*x - 1/4*e)^2 + 1)) + 2*n*log(4*abs(tan(1/8*pi - 1/4 *f*x - 1/4*e))/(tan(1/8*pi - 1/4*f*x - 1/4*e)^2 + 1)) + m*log(abs(a)) + n* log(abs(c)) - 2*m*log(abs(g)) - 5*log(2) + 5*log(4*abs(tan(1/8*pi - 1/4*f* x - 1/4*e))/(tan(1/8*pi - 1/4*f*x - 1/4*e)^2 + 1)) + 5*log(abs(g)))*tan(-5 /8*pi + pi*m*floor(1/2*f*x/pi + 1/2*e/pi - floor(1/2*f*x/pi + 1/2*e/pi + 1 /2) + 1/4) - pi*n*floor(1/2*f*x/pi + 1/2*e/pi - floor(1/2*f*x/pi + 1/2*e/p i + 1/2) + 1/4) + pi*m*floor(1/2*f*x/pi + 1/2*e/pi + 1/2) - pi*n*floor(1/2 *f*x/pi + 1/2*e/pi + 1/2) - pi*m*floor(-1/4*sgn(a) + 1/2) - pi*n*floor(-1/ 4*sgn(c) + 1) + 1/2*pi*m*sgn(tan(1/2*f*x + 1/2*e)^2 - 1) - 1/2*pi*n*sgn(ta n(1/2*f*x + 1/2*e)^2 - 1) - 1/4*pi*m*sgn(a) - 1/4*pi*n*sgn(c) + 1/2*pi*m*s gn(g) + 1/4*pi*m - 1/4*pi*n - 5/4*f*x - 5/2*pi*floor(1/2*f*x/pi + 1/2*e/pi - floor(1/2*f*x/pi + 1/2*e/pi + 1/2) + 1/4) - 5/2*pi*floor(1/2*f*x/pi + 1 /2*e/pi + 1/2) - 5/4*pi*sgn(tan(1/2*f*x + 1/2*e)^2 - 1) - 5/4*pi*sgn(g) - 5/4*e)^2*tan(1/2*f*x + 1/2*e)^10 - 2*m*n*e^(m*log(2) - n*log(2) - 2*m*log( 4*abs(tan(1/8*pi - 1/4*f*x - 1/4*e))/(tan(1/8*pi - 1/4*f*x - 1/4*e)^2 + 1) ) + 2*n*log(4*abs(tan(1/8*pi - 1/4*f*x - 1/4*e))/(tan(1/8*pi - 1/4*f*x - 1 /4*e)^2 + 1)) + m*log(abs(a)) + n*log(abs(c)) - 2*m*log(abs(g)) - 5*log(2) + 5*log(4*abs(tan(1/8*pi - 1/4*f*x - 1/4*e))/(tan(1/8*pi - 1/4*f*x - 1/4* e)^2 + 1)) + 5*log(abs(g)))*tan(-5/8*pi + pi*m*floor(1/2*f*x/pi + 1/2*e...
Time = 23.70 (sec) , antiderivative size = 1149, normalized size of antiderivative = 5.66 \[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx=\text {Too large to display} \] Input:
int((g*cos(e + f*x))^(5 - 2*m)*(a + a*sin(e + f*x))^m*(c - c*sin(e + f*x)) ^n,x)
Output:
((c - c*sin(e + f*x))^n*((exp(e*2i + f*x*2i)*(g*(exp(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2))^(5 - 2*m)*(a + a*sin(e + f*x))^m*(22*n - 22*m - 4*m *n + 2*m^2 + 2*n^2 + 80))/(f*(47*n - 47*m - 24*m*n - 3*m*n^2 + 3*m^2*n + 1 2*m^2 - m^3 + 12*n^2 + n^3 + 60)) - (exp(e*5i + f*x*5i)*(g*(exp(- e*1i - f *x*1i)/2 + exp(e*1i + f*x*1i)/2))^(5 - 2*m)*(a + a*sin(e + f*x))^m*(n*7i - m*7i - m*n*2i + m^2*1i + n^2*1i + 12i))/(f*(47*n - 47*m - 24*m*n - 3*m*n^ 2 + 3*m^2*n + 12*m^2 - m^3 + 12*n^2 + n^3 + 60)) - ((g*(exp(- e*1i - f*x*1 i)/2 + exp(e*1i + f*x*1i)/2))^(5 - 2*m)*(a + a*sin(e + f*x))^m*(7*n - 7*m - 2*m*n + m^2 + n^2 + 12))/(f*(47*n - 47*m - 24*m*n - 3*m*n^2 + 3*m^2*n + 12*m^2 - m^3 + 12*n^2 + n^3 + 60)) + (exp(e*4i + f*x*4i)*(g*(exp(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2))^(5 - 2*m)*(a + a*sin(e + f*x))^m*(29*n - 29*m - 6*m*n + 3*m^2 + 3*n^2 + 60))/(f*(47*n - 47*m - 24*m*n - 3*m*n^2 + 3*m^2*n + 12*m^2 - m^3 + 12*n^2 + n^3 + 60)) + (exp(e*1i + f*x*1i)*(g*(ex p(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2))^(5 - 2*m)*(a + a*sin(e + f*x ))^m*(n*29i - m*29i - m*n*6i + m^2*3i + n^2*3i + 60i))/(f*(47*n - 47*m - 2 4*m*n - 3*m*n^2 + 3*m^2*n + 12*m^2 - m^3 + 12*n^2 + n^3 + 60)) + (exp(e*3i + f*x*3i)*(g*(exp(- e*1i - f*x*1i)/2 + exp(e*1i + f*x*1i)/2))^(5 - 2*m)*( a + a*sin(e + f*x))^m*(n*22i - m*22i - m*n*4i + m^2*2i + n^2*2i + 80i))/(f *(47*n - 47*m - 24*m*n - 3*m*n^2 + 3*m^2*n + 12*m^2 - m^3 + 12*n^2 + n^3 + 60))))/(5*exp(e*1i + f*x*1i) - 10*exp(e*3i + f*x*3i) + exp(e*5i + f*x*...
\[ \int (g \cos (e+f x))^{5-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx=\frac {\left (\int \frac {\left (a +a \sin \left (f x +e \right )\right )^{m} \left (-\sin \left (f x +e \right ) c +c \right )^{n} \cos \left (f x +e \right )^{5}}{\cos \left (f x +e \right )^{2 m}}d x \right ) g^{5}}{g^{2 m}} \] Input:
int((g*cos(f*x+e))^(5-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x)
Output:
(int(((sin(e + f*x)*a + a)**m*( - sin(e + f*x)*c + c)**n*cos(e + f*x)**5)/ cos(e + f*x)**(2*m),x)*g**5)/g**(2*m)