\(\int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx\) [628]

Optimal result
Mathematica [C] (warning: unable to verify)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 27, antiderivative size = 64 \[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=-\frac {\left (\frac {7}{2}\right )^{-1-m} \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+m,\frac {3}{2},\frac {1-\sin (e+f x)}{7 (1+\sin (e+f x))}\right )}{f (1+\sin (e+f x))} \] Output:

-(7/2)^(-1-m)*cos(f*x+e)*hypergeom([1/2, 1+m],[3/2],(1-sin(f*x+e))/(7+7*si 
n(f*x+e)))/f/(1+sin(f*x+e))
 

Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 8.81 (sec) , antiderivative size = 272, normalized size of antiderivative = 4.25 \[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=\frac {\operatorname {Hypergeometric2F1}\left (1+m,1+2 m,2 (1+m),\frac {8 \sqrt {7} (\cos (e+f x)+i (1+\sin (e+f x)))}{\left (i+\sqrt {7}\right ) \left (3 i+\sqrt {7}+4 \cos (e+f x)+4 i \sin (e+f x)\right )}\right ) (-i \cos (e+f x)-\sin (e+f x)) \left (-3 i+\sqrt {7}-4 \cos (e+f x)-4 i \sin (e+f x)\right ) \left (\frac {\left (-i+\sqrt {7}\right ) \left (-3 i+\sqrt {7}-4 \cos (e+f x)-4 i \sin (e+f x)\right )}{\left (i+\sqrt {7}\right ) \left (3 i+\sqrt {7}+4 \cos (e+f x)+4 i \sin (e+f x)\right )}\right )^m (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} (\cos (e+f x)+i (1+\sin (e+f x)))}{\left (i+\sqrt {7}\right ) f (1+2 m)} \] Input:

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

Output:

(Hypergeometric2F1[1 + m, 1 + 2*m, 2*(1 + m), (8*Sqrt[7]*(Cos[e + f*x] + I 
*(1 + Sin[e + f*x])))/((I + Sqrt[7])*(3*I + Sqrt[7] + 4*Cos[e + f*x] + (4* 
I)*Sin[e + f*x]))]*((-I)*Cos[e + f*x] - Sin[e + f*x])*(-3*I + Sqrt[7] - 4* 
Cos[e + f*x] - (4*I)*Sin[e + f*x])*(((-I + Sqrt[7])*(-3*I + Sqrt[7] - 4*Co 
s[e + f*x] - (4*I)*Sin[e + f*x]))/((I + Sqrt[7])*(3*I + Sqrt[7] + 4*Cos[e 
+ f*x] + (4*I)*Sin[e + f*x])))^m*(1 + Sin[e + f*x])^m*(3 + 4*Sin[e + f*x]) 
^(-1 - m)*(Cos[e + f*x] + I*(1 + Sin[e + f*x])))/((I + Sqrt[7])*f*(1 + 2*m 
))
 

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.91, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 3267, 142}

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 (\sin (e+f x)+1)^m (4 \sin (e+f x)+3)^{-m-1} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (\sin (e+f x)+1)^m (4 \sin (e+f x)+3)^{-m-1}dx\)

\(\Big \downarrow \) 3267

\(\displaystyle \frac {\cos (e+f x) \int \frac {(\sin (e+f x)+1)^{m-\frac {1}{2}} (4 \sin (e+f x)+3)^{-m-1}}{\sqrt {1-\sin (e+f x)}}d\sin (e+f x)}{f \sqrt {1-\sin (e+f x)} \sqrt {\sin (e+f x)+1}}\)

\(\Big \downarrow \) 142

\(\displaystyle -\frac {2^{m+\frac {1}{2}} 7^{-m-\frac {1}{2}} \cos (e+f x) (\sin (e+f x)+1)^{m-1} \left (\frac {\sin (e+f x)+1}{4 \sin (e+f x)+3}\right )^{\frac {1}{2}-m} (4 \sin (e+f x)+3)^{-m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},-\frac {1-\sin (e+f x)}{2 (4 \sin (e+f x)+3)}\right )}{f}\)

Input:

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

Output:

-((2^(1/2 + m)*7^(-1/2 - m)*Cos[e + f*x]*Hypergeometric2F1[1/2, 1/2 - m, 3 
/2, -1/2*(1 - Sin[e + f*x])/(3 + 4*Sin[e + f*x])]*(1 + Sin[e + f*x])^(-1 + 
 m)*((1 + Sin[e + f*x])/(3 + 4*Sin[e + f*x]))^(1/2 - m))/(f*(3 + 4*Sin[e + 
 f*x])^m))
 

Defintions of rubi rules used

rule 142
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n*((e + f*x)^(p + 1)/((b*e 
 - a*f)*(m + 1)))*Hypergeometric2F1[m + 1, -n, m + 2, (-(d*e - c*f))*((a + 
b*x)/((b*c - a*d)*(e + f*x)))])/((b*e - a*f)*((c + d*x)/((b*c - a*d)*(e + f 
*x))))^n, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[m + n + p + 2, 
 0] &&  !IntegerQ[n]
 

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

rule 3267
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + ( 
f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^2*(Cos[e + f*x]/(f*Sqrt[a + b*Sin[e 
+ f*x]]*Sqrt[a - b*Sin[e + f*x]]))   Subst[Int[(a + b*x)^(m - 1/2)*((c + d* 
x)^n/Sqrt[a - b*x]), x], x, Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m 
, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && 
 !IntegerQ[m]
 
Maple [F]

\[\int \left (1+\sin \left (f x +e \right )\right )^{m} \left (3+4 \sin \left (f x +e \right )\right )^{-1-m}d x\]

Input:

int((1+sin(f*x+e))^m*(3+4*sin(f*x+e))^(-1-m),x)
 

Output:

int((1+sin(f*x+e))^m*(3+4*sin(f*x+e))^(-1-m),x)
 

Fricas [F]

\[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=\int { {\left (4 \, \sin \left (f x + e\right ) + 3\right )}^{-m - 1} {\left (\sin \left (f x + e\right ) + 1\right )}^{m} \,d x } \] Input:

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

Output:

integral((4*sin(f*x + e) + 3)^(-m - 1)*(sin(f*x + e) + 1)^m, x)
 

Sympy [F]

\[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=\int \left (\sin {\left (e + f x \right )} + 1\right )^{m} \left (4 \sin {\left (e + f x \right )} + 3\right )^{- m - 1}\, dx \] Input:

integrate((1+sin(f*x+e))**m*(3+4*sin(f*x+e))**(-1-m),x)
 

Output:

Integral((sin(e + f*x) + 1)**m*(4*sin(e + f*x) + 3)**(-m - 1), x)
 

Maxima [F]

\[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=\int { {\left (4 \, \sin \left (f x + e\right ) + 3\right )}^{-m - 1} {\left (\sin \left (f x + e\right ) + 1\right )}^{m} \,d x } \] Input:

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

Output:

integrate((4*sin(f*x + e) + 3)^(-m - 1)*(sin(f*x + e) + 1)^m, x)
 

Giac [F]

\[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=\int { {\left (4 \, \sin \left (f x + e\right ) + 3\right )}^{-m - 1} {\left (\sin \left (f x + e\right ) + 1\right )}^{m} \,d x } \] Input:

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

Output:

integrate((4*sin(f*x + e) + 3)^(-m - 1)*(sin(f*x + e) + 1)^m, x)
 

Mupad [F(-1)]

Timed out. \[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=\int \frac {{\left (\sin \left (e+f\,x\right )+1\right )}^m}{{\left (4\,\sin \left (e+f\,x\right )+3\right )}^{m+1}} \,d x \] Input:

int((sin(e + f*x) + 1)^m/(4*sin(e + f*x) + 3)^(m + 1),x)
 

Output:

int((sin(e + f*x) + 1)^m/(4*sin(e + f*x) + 3)^(m + 1), x)
 

Reduce [F]

\[ \int (1+\sin (e+f x))^m (3+4 \sin (e+f x))^{-1-m} \, dx=\int \frac {\left (\sin \left (f x +e \right )+1\right )^{m}}{4 \left (4 \sin \left (f x +e \right )+3\right )^{m} \sin \left (f x +e \right )+3 \left (4 \sin \left (f x +e \right )+3\right )^{m}}d x \] Input:

int((1+sin(f*x+e))^m*(3+4*sin(f*x+e))^(-1-m),x)
 

Output:

int((sin(e + f*x) + 1)**m/(4*(4*sin(e + f*x) + 3)**m*sin(e + f*x) + 3*(4*s 
in(e + f*x) + 3)**m),x)