\(\int \cot ^2(e+f x) (a+a \sin (e+f x))^m \, dx\) [138]

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

Optimal result

Integrand size = 21, antiderivative size = 105 \[ \int \cot ^2(e+f x) (a+a \sin (e+f x))^m \, dx=-\frac {2^{\frac {3}{2}+m} \operatorname {AppellF1}\left (\frac {3}{2},2,-\frac {1}{2}-m,\frac {5}{2},1-\sin (e+f x),\frac {1}{2} (1-\sin (e+f x))\right ) \sec (e+f x) (1+\sin (e+f x))^{-\frac {1}{2}-m} (a-a \sin (e+f x))^2 (a+a \sin (e+f x))^{1+m}}{3 a^3 f} \] Output:

-1/3*2^(3/2+m)*AppellF1(3/2,2,-1/2-m,5/2,1-sin(f*x+e),1/2-1/2*sin(f*x+e))* 
sec(f*x+e)*(1+sin(f*x+e))^(-1/2-m)*(a-a*sin(f*x+e))^2*(a+a*sin(f*x+e))^(1+ 
m)/a^3/f
 

Mathematica [F]

\[ \int \cot ^2(e+f x) (a+a \sin (e+f x))^m \, dx=\int \cot ^2(e+f x) (a+a \sin (e+f x))^m \, dx \] Input:

Integrate[Cot[e + f*x]^2*(a + a*Sin[e + f*x])^m,x]
 

Output:

Integrate[Cot[e + f*x]^2*(a + a*Sin[e + f*x])^m, x]
 

Rubi [A] (warning: unable to verify)

Time = 0.30 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.10, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 3198, 154, 27, 153}

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 \cot ^2(e+f x) (a \sin (e+f x)+a)^m \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a \sin (e+f x)+a)^m}{\tan (e+f x)^2}dx\)

\(\Big \downarrow \) 3198

\(\displaystyle \frac {\sec (e+f x) \sqrt {a-a \sin (e+f x)} \sqrt {a \sin (e+f x)+a} \int \frac {\csc ^2(e+f x) \sqrt {a-a \sin (e+f x)} (\sin (e+f x) a+a)^{m+\frac {1}{2}}}{a^2}d(a \sin (e+f x))}{a f}\)

\(\Big \downarrow \) 154

\(\displaystyle \frac {\sqrt {2} \sec (e+f x) (a-a \sin (e+f x)) \sqrt {a \sin (e+f x)+a} \int \frac {\csc ^2(e+f x) \sqrt {1-\sin (e+f x)} (\sin (e+f x) a+a)^{m+\frac {1}{2}}}{\sqrt {2} a^2}d(a \sin (e+f x))}{a f \sqrt {\frac {a-a \sin (e+f x)}{a}}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\sec (e+f x) (a-a \sin (e+f x)) \sqrt {a \sin (e+f x)+a} \int \frac {\csc ^2(e+f x) \sqrt {1-\sin (e+f x)} (\sin (e+f x) a+a)^{m+\frac {1}{2}}}{a^2}d(a \sin (e+f x))}{a f \sqrt {\frac {a-a \sin (e+f x)}{a}}}\)

\(\Big \downarrow \) 153

\(\displaystyle \frac {2 \sqrt {2} \sec (e+f x) (a-a \sin (e+f x)) (a \sin (e+f x)+a)^{m+2} \operatorname {AppellF1}\left (m+\frac {3}{2},-\frac {1}{2},2,m+\frac {5}{2},\frac {\sin (e+f x) a+a}{2 a},\frac {\sin (e+f x) a+a}{a}\right )}{a^3 f (2 m+3) \sqrt {\frac {a-a \sin (e+f x)}{a}}}\)

Input:

Int[Cot[e + f*x]^2*(a + a*Sin[e + f*x])^m,x]
 

Output:

(2*Sqrt[2]*AppellF1[3/2 + m, -1/2, 2, 5/2 + m, (a + a*Sin[e + f*x])/(2*a), 
 (a + a*Sin[e + f*x])/a]*Sec[e + f*x]*(a - a*Sin[e + f*x])*(a + a*Sin[e + 
f*x])^(2 + m))/(a^3*f*(3 + 2*m)*Sqrt[(a - a*Sin[e + f*x])/a])
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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

rule 154
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[(c + d*x)^FracPart[n]/(Simplify[b/(b*c - a*d)]^IntPart[n 
]*(b*((c + d*x)/(b*c - a*d)))^FracPart[n])   Int[(a + b*x)^m*Simp[b*(c/(b*c 
 - a*d)) + b*d*(x/(b*c - a*d)), x]^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, 
 d, e, f, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] && IntegerQ[p] &&  !G 
tQ[Simplify[b/(b*c - a*d)], 0] &&  !SimplerQ[c + d*x, a + b*x]
 

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

rule 3198
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^(p_ 
), x_Symbol] :> Simp[Sqrt[a + b*Sin[e + f*x]]*(Sqrt[a - b*Sin[e + f*x]]/(b* 
f*Cos[e + f*x]))   Subst[Int[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/ 
2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && EqQ[a^2 - b 
^2, 0] &&  !IntegerQ[m] && IntegerQ[p/2]
 
Maple [F]

\[\int \cot \left (f x +e \right )^{2} \left (a +\sin \left (f x +e \right ) a \right )^{m}d x\]

Input:

int(cot(f*x+e)^2*(a+sin(f*x+e)*a)^m,x)
 

Output:

int(cot(f*x+e)^2*(a+sin(f*x+e)*a)^m,x)
 

Fricas [F]

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

integrate(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x, algorithm="fricas")
 

Output:

integral((a*sin(f*x + e) + a)^m*cot(f*x + e)^2, x)
 

Sympy [F]

\[ \int \cot ^2(e+f x) (a+a \sin (e+f x))^m \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \cot ^{2}{\left (e + f x \right )}\, dx \] Input:

integrate(cot(f*x+e)**2*(a+a*sin(f*x+e))**m,x)
 

Output:

Integral((a*(sin(e + f*x) + 1))**m*cot(e + f*x)**2, x)
 

Maxima [F]

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

integrate(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x, algorithm="maxima")
 

Output:

integrate((a*sin(f*x + e) + a)^m*cot(f*x + e)^2, x)
 

Giac [F]

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

integrate(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x, algorithm="giac")
 

Output:

integrate((a*sin(f*x + e) + a)^m*cot(f*x + e)^2, x)
 

Mupad [F(-1)]

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

int(cot(e + f*x)^2*(a + a*sin(e + f*x))^m,x)
 

Output:

int(cot(e + f*x)^2*(a + a*sin(e + f*x))^m, x)
 

Reduce [F]

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

int(cot(f*x+e)^2*(a+a*sin(f*x+e))^m,x)
 

Output:

int((sin(e + f*x)*a + a)**m*cot(e + f*x)**2,x)