\(\int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx\) [322]

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

Optimal result

Integrand size = 23, antiderivative size = 246 \[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\frac {\sqrt {a+b} \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}-\frac {\cot (c+d x) \sqrt {a+b \sec (c+d x)}}{d}+\frac {2 \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a}{a+b},\arcsin \left (\frac {\sqrt {a+b}}{\sqrt {a+b \sec (c+d x)}}\right ),\frac {a-b}{a+b}\right ) \sqrt {-\frac {b (1-\sec (c+d x))}{a+b \sec (c+d x)}} \sqrt {\frac {b (1+\sec (c+d x))}{a+b \sec (c+d x)}} (a+b \sec (c+d x))}{\sqrt {a+b} d} \] Output:

(a+b)^(1/2)*cot(d*x+c)*EllipticF((a+b*sec(d*x+c))^(1/2)/(a+b)^(1/2),((a+b) 
/(a-b))^(1/2))*(b*(1-sec(d*x+c))/(a+b))^(1/2)*(-b*(1+sec(d*x+c))/(a-b))^(1 
/2)/d-cot(d*x+c)*(a+b*sec(d*x+c))^(1/2)/d+2*cot(d*x+c)*EllipticPi((a+b)^(1 
/2)/(a+b*sec(d*x+c))^(1/2),a/(a+b),((a-b)/(a+b))^(1/2))*(-b*(1-sec(d*x+c)) 
/(a+b*sec(d*x+c)))^(1/2)*(b*(1+sec(d*x+c))/(a+b*sec(d*x+c)))^(1/2)*(a+b*se 
c(d*x+c))/(a+b)^(1/2)/d
 

Mathematica [A] (verified)

Time = 2.78 (sec) , antiderivative size = 154, normalized size of antiderivative = 0.63 \[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\frac {\sqrt {a+b \sec (c+d x)} \left (-\cot (c+d x)-\frac {2 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \left ((-2 a+b) \operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right )+4 a \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right )\right ) \sqrt {\frac {1}{1+\sec (c+d x)}} \sqrt {\frac {a+b \sec (c+d x)}{(a+b) (1+\sec (c+d x))}}}{b+a \cos (c+d x)}\right )}{d} \] Input:

Integrate[Cot[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]],x]
 

Output:

(Sqrt[a + b*Sec[c + d*x]]*(-Cot[c + d*x] - (2*Cos[(c + d*x)/2]^2*((-2*a + 
b)*EllipticF[ArcSin[Tan[(c + d*x)/2]], (a - b)/(a + b)] + 4*a*EllipticPi[- 
1, ArcSin[Tan[(c + d*x)/2]], (a - b)/(a + b)])*Sqrt[(1 + Sec[c + d*x])^(-1 
)]*Sqrt[(a + b*Sec[c + d*x])/((a + b)*(1 + Sec[c + d*x]))])/(b + a*Cos[c + 
 d*x])))/d
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 4384, 2009}

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(c+d x) \sqrt {a+b \sec (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {a+b \csc \left (c+d x+\frac {\pi }{2}\right )}}{\cot \left (c+d x+\frac {\pi }{2}\right )^2}dx\)

\(\Big \downarrow \) 4384

\(\displaystyle \int \left (\csc ^2(c+d x) \sqrt {a+b \sec (c+d x)}-\sqrt {a+b \sec (c+d x)}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{d}+\frac {2 \cot (c+d x) \sqrt {-\frac {b (1-\sec (c+d x))}{a+b \sec (c+d x)}} \sqrt {\frac {b (\sec (c+d x)+1)}{a+b \sec (c+d x)}} (a+b \sec (c+d x)) \operatorname {EllipticPi}\left (\frac {a}{a+b},\arcsin \left (\frac {\sqrt {a+b}}{\sqrt {a+b \sec (c+d x)}}\right ),\frac {a-b}{a+b}\right )}{d \sqrt {a+b}}-\frac {\cot (c+d x) \sqrt {a+b \sec (c+d x)}}{d}\)

Input:

Int[Cot[c + d*x]^2*Sqrt[a + b*Sec[c + d*x]],x]
 

Output:

(Sqrt[a + b]*Cot[c + d*x]*EllipticF[ArcSin[Sqrt[a + b*Sec[c + d*x]]/Sqrt[a 
 + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[-((b*(1 
 + Sec[c + d*x]))/(a - b))])/d - (Cot[c + d*x]*Sqrt[a + b*Sec[c + d*x]])/d 
 + (2*Cot[c + d*x]*EllipticPi[a/(a + b), ArcSin[Sqrt[a + b]/Sqrt[a + b*Sec 
[c + d*x]]], (a - b)/(a + b)]*Sqrt[-((b*(1 - Sec[c + d*x]))/(a + b*Sec[c + 
 d*x]))]*Sqrt[(b*(1 + Sec[c + d*x]))/(a + b*Sec[c + d*x])]*(a + b*Sec[c + 
d*x]))/(Sqrt[a + b]*d)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 4384
Int[cot[(c_.) + (d_.)*(x_)]^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_ 
), x_Symbol] :> Int[ExpandIntegrand[(a + b*Csc[c + d*x])^n, (-1 + Sec[c + d 
*x]^2)^(-m/2), x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 - b^2, 0] && 
ILtQ[m/2, 0] && IntegerQ[n - 1/2] && EqQ[m, -2]
 
Maple [A] (verified)

Time = 3.72 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.29

method result size
default \(\frac {\sqrt {a +b \sec \left (d x +c \right )}\, \left (\left (4 \cos \left (d x +c \right )+4\right ) \operatorname {EllipticPi}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), -1, \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (a +b \right ) \left (1+\cos \left (d x +c \right )\right )}}\, a +\left (-2 \cos \left (d x +c \right )-2\right ) a \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (a +b \right ) \left (1+\cos \left (d x +c \right )\right )}}\, \operatorname {EllipticF}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), \sqrt {\frac {a -b}{a +b}}\right )+\left (1+\cos \left (d x +c \right )\right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (a +b \right ) \left (1+\cos \left (d x +c \right )\right )}}\, \operatorname {EllipticF}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), \sqrt {\frac {a -b}{a +b}}\right ) b -\cos \left (d x +c \right ) a \cot \left (d x +c \right )-b \cot \left (d x +c \right )\right )}{d \left (b +a \cos \left (d x +c \right )\right )}\) \(317\)

Input:

int(cot(d*x+c)^2*(a+b*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
 

Output:

1/d*(a+b*sec(d*x+c))^(1/2)/(b+a*cos(d*x+c))*((4*cos(d*x+c)+4)*EllipticPi(- 
csc(d*x+c)+cot(d*x+c),-1,((a-b)/(a+b))^(1/2))*(cos(d*x+c)/(1+cos(d*x+c)))^ 
(1/2)*(1/(a+b)*(b+a*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*a+(-2*cos(d*x+c)-2)* 
a*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(b+a*cos(d*x+c))/(1+cos(d*x+c 
)))^(1/2)*EllipticF(-csc(d*x+c)+cot(d*x+c),((a-b)/(a+b))^(1/2))+(1+cos(d*x 
+c))*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(b+a*cos(d*x+c))/(1+cos(d* 
x+c)))^(1/2)*EllipticF(-csc(d*x+c)+cot(d*x+c),((a-b)/(a+b))^(1/2))*b-cos(d 
*x+c)*a*cot(d*x+c)-b*cot(d*x+c))
 

Fricas [F]

\[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int { \sqrt {b \sec \left (d x + c\right ) + a} \cot \left (d x + c\right )^{2} \,d x } \] Input:

integrate(cot(d*x+c)^2*(a+b*sec(d*x+c))^(1/2),x, algorithm="fricas")
 

Output:

integral(sqrt(b*sec(d*x + c) + a)*cot(d*x + c)^2, x)
 

Sympy [F]

\[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int \sqrt {a + b \sec {\left (c + d x \right )}} \cot ^{2}{\left (c + d x \right )}\, dx \] Input:

integrate(cot(d*x+c)**2*(a+b*sec(d*x+c))**(1/2),x)
 

Output:

Integral(sqrt(a + b*sec(c + d*x))*cot(c + d*x)**2, x)
 

Maxima [F]

\[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int { \sqrt {b \sec \left (d x + c\right ) + a} \cot \left (d x + c\right )^{2} \,d x } \] Input:

integrate(cot(d*x+c)^2*(a+b*sec(d*x+c))^(1/2),x, algorithm="maxima")
 

Output:

integrate(sqrt(b*sec(d*x + c) + a)*cot(d*x + c)^2, x)
 

Giac [F]

\[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int { \sqrt {b \sec \left (d x + c\right ) + a} \cot \left (d x + c\right )^{2} \,d x } \] Input:

integrate(cot(d*x+c)^2*(a+b*sec(d*x+c))^(1/2),x, algorithm="giac")
 

Output:

integrate(sqrt(b*sec(d*x + c) + a)*cot(d*x + c)^2, x)
 

Mupad [F(-1)]

Timed out. \[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int {\mathrm {cot}\left (c+d\,x\right )}^2\,\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}} \,d x \] Input:

int(cot(c + d*x)^2*(a + b/cos(c + d*x))^(1/2),x)
 

Output:

int(cot(c + d*x)^2*(a + b/cos(c + d*x))^(1/2), x)
 

Reduce [F]

\[ \int \cot ^2(c+d x) \sqrt {a+b \sec (c+d x)} \, dx=\int \sqrt {\sec \left (d x +c \right ) b +a}\, \cot \left (d x +c \right )^{2}d x \] Input:

int(cot(d*x+c)^2*(a+b*sec(d*x+c))^(1/2),x)
 

Output:

int(sqrt(sec(c + d*x)*b + a)*cot(c + d*x)**2,x)