3.185 \(\int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx\)

Optimal. Leaf size=55 \[ \frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{f g (m-n)} \]

[Out]

(g*cos(f*x+e))^(-n-m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n/f/g/(m-n)

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.023, Rules used = {2848} \[ \frac {(a \sin (e+f x)+a)^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{f g (m-n)} \]

Antiderivative was successfully verified.

[In]

Int[(g*Cos[e + f*x])^(-1 - m - n)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^n,x]

[Out]

((g*Cos[e + f*x])^(-m - n)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^n)/(f*g*(m - n))

Rule 2848

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*(c + d*Sin[e + f*x])^
n)/(a*f*g*(m - n)), x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] &
& EqQ[m + n + p + 1, 0] && NeQ[m, n]

Rubi steps

\begin {align*} \int (g \cos (e+f x))^{-1-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n \, dx &=\frac {(g \cos (e+f x))^{-m-n} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^n}{f g (m-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.79, size = 55, normalized size = 1.00 \[ \frac {(a (\sin (e+f x)+1))^m (c-c \sin (e+f x))^n (g \cos (e+f x))^{-m-n}}{f g (m-n)} \]

Antiderivative was successfully verified.

[In]

Integrate[(g*Cos[e + f*x])^(-1 - m - n)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^n,x]

[Out]

((g*Cos[e + f*x])^(-m - n)*(a*(1 + Sin[e + f*x]))^m*(c - c*Sin[e + f*x])^n)/(f*g*(m - n))

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 83, normalized size = 1.51 \[ \frac {\left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \cos \left (f x + e\right ) e^{\left (2 \, n \log \left (g \cos \left (f x + e\right )\right ) - n \log \left (a \sin \left (f x + e\right ) + a\right ) + n \log \left (\frac {a c}{g^{2}}\right )\right )}}{f m - f n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x, algorithm="fricas")

[Out]

(g*cos(f*x + e))^(-m - n - 1)*(a*sin(f*x + e) + a)^m*cos(f*x + e)*e^(2*n*log(g*cos(f*x + e)) - n*log(a*sin(f*x
 + e) + a) + n*log(a*c/g^2))/(f*m - f*n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x + e\right )\right )^{-m - n - 1} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} {\left (-c \sin \left (f x + e\right ) + c\right )}^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((g*cos(f*x + e))^(-m - n - 1)*(a*sin(f*x + e) + a)^m*(-c*sin(f*x + e) + c)^n, x)

________________________________________________________________________________________

maple [F]  time = 1.05, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x +e \right )\right )^{-1-m -n} \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c -c \sin \left (f x +e \right )\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x)

[Out]

int((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x)

________________________________________________________________________________________

maxima [B]  time = 0.47, size = 145, normalized size = 2.64 \[ \frac {a^{m} c^{n} g^{-m - n - 1} e^{\left (m \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) - n \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) + 2 \, n \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right ) - m \log \left (-\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right ) - n \log \left (-\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )\right )}}{f {\left (m - n\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))^(-1-m-n)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^n,x, algorithm="maxima")

[Out]

a^m*c^n*g^(-m - n - 1)*e^(m*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1) - n*log(sin(f*x + e)/(cos(f*x + e) + 1) +
 1) + 2*n*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1) - m*log(-sin(f*x + e)/(cos(f*x + e) + 1) + 1) - n*log(-sin(
f*x + e)/(cos(f*x + e) + 1) + 1))/(f*(m - n))

________________________________________________________________________________________

mupad [B]  time = 9.07, size = 53, normalized size = 0.96 \[ \frac {{\left (a\,\left (\sin \left (e+f\,x\right )+1\right )\right )}^m\,{\left (-c\,\left (\sin \left (e+f\,x\right )-1\right )\right )}^n}{f\,g\,{\left (g\,\cos \left (e+f\,x\right )\right )}^{m+n}\,\left (m-n\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a*sin(e + f*x))^m*(c - c*sin(e + f*x))^n)/(g*cos(e + f*x))^(m + n + 1),x)

[Out]

((a*(sin(e + f*x) + 1))^m*(-c*(sin(e + f*x) - 1))^n)/(f*g*(g*cos(e + f*x))^(m + n)*(m - n))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*cos(f*x+e))**(-1-m-n)*(a+a*sin(f*x+e))**m*(c-c*sin(f*x+e))**n,x)

[Out]

Timed out

________________________________________________________________________________________