\(\int (c \cos (e+f x))^m (d \sin (e+f x))^n (a+b \sin ^2(e+f x))^p \, dx\) [523]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 35, antiderivative size = 137 \[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=\frac {c \operatorname {AppellF1}\left (\frac {1+n}{2},\frac {1-m}{2},-p,\frac {3+n}{2},\sin ^2(e+f x),-\frac {b \sin ^2(e+f x)}{a}\right ) (c \cos (e+f x))^{-1+m} \cos ^2(e+f x)^{\frac {1-m}{2}} (d \sin (e+f x))^{1+n} \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p}}{d f (1+n)} \] Output:

c*AppellF1(1/2+1/2*n,1/2-1/2*m,-p,3/2+1/2*n,sin(f*x+e)^2,-b*sin(f*x+e)^2/a 
)*(c*cos(f*x+e))^(-1+m)*(cos(f*x+e)^2)^(1/2-1/2*m)*(d*sin(f*x+e))^(1+n)*(a 
+b*sin(f*x+e)^2)^p/d/f/(1+n)/((1+b*sin(f*x+e)^2/a)^p)
 

Mathematica [A] (verified)

Time = 2.70 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.99 \[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=\frac {\operatorname {AppellF1}\left (\frac {1+n}{2},\frac {1-m}{2},-p,\frac {3+n}{2},\sin ^2(e+f x),-\frac {b \sin ^2(e+f x)}{a}\right ) (c \cos (e+f x))^m \cos ^2(e+f x)^{\frac {1-m}{2}} (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \left (1+\frac {b \sin ^2(e+f x)}{a}\right )^{-p} \tan (e+f x)}{f (1+n)} \] Input:

Integrate[(c*Cos[e + f*x])^m*(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x]^2)^p,x 
]
 

Output:

(AppellF1[(1 + n)/2, (1 - m)/2, -p, (3 + n)/2, Sin[e + f*x]^2, -((b*Sin[e 
+ f*x]^2)/a)]*(c*Cos[e + f*x])^m*(Cos[e + f*x]^2)^((1 - m)/2)*(d*Sin[e + f 
*x])^n*(a + b*Sin[e + f*x]^2)^p*Tan[e + f*x])/(f*(1 + n)*(1 + (b*Sin[e + f 
*x]^2)/a)^p)
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {3042, 3681, 395, 394}

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 (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin (e+f x)^2\right )^pdx\)

\(\Big \downarrow \) 3681

\(\displaystyle \frac {c \cos ^2(e+f x)^{\frac {1-m}{2}} (c \cos (e+f x))^{m-1} \int (d \sin (e+f x))^n \left (1-\sin ^2(e+f x)\right )^{\frac {m-1}{2}} \left (b \sin ^2(e+f x)+a\right )^pd\sin (e+f x)}{f}\)

\(\Big \downarrow \) 395

\(\displaystyle \frac {c \cos ^2(e+f x)^{\frac {1-m}{2}} (c \cos (e+f x))^{m-1} \left (a+b \sin ^2(e+f x)\right )^p \left (\frac {b \sin ^2(e+f x)}{a}+1\right )^{-p} \int (d \sin (e+f x))^n \left (1-\sin ^2(e+f x)\right )^{\frac {m-1}{2}} \left (\frac {b \sin ^2(e+f x)}{a}+1\right )^pd\sin (e+f x)}{f}\)

\(\Big \downarrow \) 394

\(\displaystyle \frac {c \cos ^2(e+f x)^{\frac {1-m}{2}} (c \cos (e+f x))^{m-1} (d \sin (e+f x))^{n+1} \left (a+b \sin ^2(e+f x)\right )^p \left (\frac {b \sin ^2(e+f x)}{a}+1\right )^{-p} \operatorname {AppellF1}\left (\frac {n+1}{2},\frac {1-m}{2},-p,\frac {n+3}{2},\sin ^2(e+f x),-\frac {b \sin ^2(e+f x)}{a}\right )}{d f (n+1)}\)

Input:

Int[(c*Cos[e + f*x])^m*(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x]^2)^p,x]
 

Output:

(c*AppellF1[(1 + n)/2, (1 - m)/2, -p, (3 + n)/2, Sin[e + f*x]^2, -((b*Sin[ 
e + f*x]^2)/a)]*(c*Cos[e + f*x])^(-1 + m)*(Cos[e + f*x]^2)^((1 - m)/2)*(d* 
Sin[e + f*x])^(1 + n)*(a + b*Sin[e + f*x]^2)^p)/(d*f*(1 + n)*(1 + (b*Sin[e 
 + f*x]^2)/a)^p)
 

Defintions of rubi rules used

rule 394
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[a^p*c^q*((e*x)^(m + 1)/(e*(m + 1)))*AppellF1[(m + 1)/2 
, -p, -q, 1 + (m + 1)/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; FreeQ[{a, b, c, 
 d, e, m, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, 1] && (Int 
egerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
 

rule 395
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[a^IntPart[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^ 
FracPart[p])   Int[(e*x)^m*(1 + b*(x^2/a))^p*(c + d*x^2)^q, x], x] /; FreeQ 
[{a, b, c, d, e, m, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && NeQ[m, 
1] &&  !(IntegerQ[p] || GtQ[a, 0])
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3681
Int[(cos[(e_.) + (f_.)*(x_)]*(c_.))^(m_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = 
 FreeFactors[Sin[e + f*x], x]}, Simp[ff*c^(2*IntPart[(m - 1)/2] + 1)*((c*Co 
s[e + f*x])^(2*FracPart[(m - 1)/2])/(f*(Cos[e + f*x]^2)^FracPart[(m - 1)/2] 
))   Subst[Int[(d*ff*x)^n*(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x] 
, x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !In 
tegerQ[m]
 
Maple [F]

\[\int \left (c \cos \left (f x +e \right )\right )^{m} \left (d \sin \left (f x +e \right )\right )^{n} \left (a +b \sin \left (f x +e \right )^{2}\right )^{p}d x\]

Input:

int((c*cos(f*x+e))^m*(d*sin(f*x+e))^n*(a+b*sin(f*x+e)^2)^p,x)
 

Output:

int((c*cos(f*x+e))^m*(d*sin(f*x+e))^n*(a+b*sin(f*x+e)^2)^p,x)
 

Fricas [F]

\[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int { {\left (b \sin \left (f x + e\right )^{2} + a\right )}^{p} \left (c \cos \left (f x + e\right )\right )^{m} \left (d \sin \left (f x + e\right )\right )^{n} \,d x } \] Input:

integrate((c*cos(f*x+e))^m*(d*sin(f*x+e))^n*(a+b*sin(f*x+e)^2)^p,x, algori 
thm="fricas")
 

Output:

integral((-b*cos(f*x + e)^2 + a + b)^p*(c*cos(f*x + e))^m*(d*sin(f*x + e)) 
^n, x)
 

Sympy [F(-1)]

Timed out. \[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=\text {Timed out} \] Input:

integrate((c*cos(f*x+e))**m*(d*sin(f*x+e))**n*(a+b*sin(f*x+e)**2)**p,x)
 

Output:

Timed out
 

Maxima [F]

\[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int { {\left (b \sin \left (f x + e\right )^{2} + a\right )}^{p} \left (c \cos \left (f x + e\right )\right )^{m} \left (d \sin \left (f x + e\right )\right )^{n} \,d x } \] Input:

integrate((c*cos(f*x+e))^m*(d*sin(f*x+e))^n*(a+b*sin(f*x+e)^2)^p,x, algori 
thm="maxima")
 

Output:

integrate((b*sin(f*x + e)^2 + a)^p*(c*cos(f*x + e))^m*(d*sin(f*x + e))^n, 
x)
 

Giac [F]

\[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int { {\left (b \sin \left (f x + e\right )^{2} + a\right )}^{p} \left (c \cos \left (f x + e\right )\right )^{m} \left (d \sin \left (f x + e\right )\right )^{n} \,d x } \] Input:

integrate((c*cos(f*x+e))^m*(d*sin(f*x+e))^n*(a+b*sin(f*x+e)^2)^p,x, algori 
thm="giac")
 

Output:

integrate((b*sin(f*x + e)^2 + a)^p*(c*cos(f*x + e))^m*(d*sin(f*x + e))^n, 
x)
 

Mupad [F(-1)]

Timed out. \[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=\int {\left (c\,\cos \left (e+f\,x\right )\right )}^m\,{\left (d\,\sin \left (e+f\,x\right )\right )}^n\,{\left (b\,{\sin \left (e+f\,x\right )}^2+a\right )}^p \,d x \] Input:

int((c*cos(e + f*x))^m*(d*sin(e + f*x))^n*(a + b*sin(e + f*x)^2)^p,x)
 

Output:

int((c*cos(e + f*x))^m*(d*sin(e + f*x))^n*(a + b*sin(e + f*x)^2)^p, x)
 

Reduce [F]

\[ \int (c \cos (e+f x))^m (d \sin (e+f x))^n \left (a+b \sin ^2(e+f x)\right )^p \, dx=d^{n} c^{m} \left (\int \sin \left (f x +e \right )^{n} \left (\sin \left (f x +e \right )^{2} b +a \right )^{p} \cos \left (f x +e \right )^{m}d x \right ) \] Input:

int((c*cos(f*x+e))^m*(d*sin(f*x+e))^n*(a+b*sin(f*x+e)^2)^p,x)
 

Output:

d**n*c**m*int(sin(e + f*x)**n*(sin(e + f*x)**2*b + a)**p*cos(e + f*x)**m,x 
)