Integrand size = 23, antiderivative size = 361 \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {\cot (c+d x) E\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}}}{\sqrt {a+b} d}-\frac {\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}}}{\sqrt {a+b} d}+\frac {2 \sqrt {a+b} \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\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}}}{a d}-\frac {\cot (c+d x)}{d \sqrt {a+b \sec (c+d x)}}+\frac {b^2 \tan (c+d x)}{\left (a^2-b^2\right ) d \sqrt {a+b \sec (c+d x)}} \] Output:
cot(d*x+c)*EllipticE((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)/(a+b)^(1 /2)/d-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)/(a +b)^(1/2)/d+2*(a+b)^(1/2)*cot(d*x+c)*EllipticPi((a+b*sec(d*x+c))^(1/2)/(a+ b)^(1/2),(a+b)/a,((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)/a/d-cot(d*x+c)/d/(a+b*sec(d*x+c))^(1/2)+b^2*tan (d*x+c)/(a^2-b^2)/d/(a+b*sec(d*x+c))^(1/2)
Time = 11.70 (sec) , antiderivative size = 366, normalized size of antiderivative = 1.01 \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\frac {\left (-8 b (a+b) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \cot \left (\frac {1}{2} (c+d x)\right ) E\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right )-8 \left (2 a^2-a b-3 b^2\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \cot \left (\frac {1}{2} (c+d x)\right ) \operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right )+4 (a-b) \csc ^2(c+d x) \left (2 \cos (c+d x) (b+a \cos (c+d x))+32 (a+b) \cos ^3\left (\frac {1}{2} (c+d x)\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\frac {b+a \cos (c+d x)}{(a+b) (1+\cos (c+d x))}} \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right ),\frac {a-b}{a+b}\right ) \sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \tan (c+d x)}{8 \left (-a^2+b^2\right ) d \sqrt {a+b \sec (c+d x)}} \] Input:
Integrate[Cot[c + d*x]^2/Sqrt[a + b*Sec[c + d*x]],x]
Output:
((-8*b*(a + b)*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sqrt[(b + a*Cos[c + d *x])/((a + b)*(1 + Cos[c + d*x]))]*Cot[(c + d*x)/2]*EllipticE[ArcSin[Tan[( c + d*x)/2]], (a - b)/(a + b)] - 8*(2*a^2 - a*b - 3*b^2)*Sqrt[Cos[c + d*x] /(1 + Cos[c + d*x])]*Sqrt[(b + a*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]) )]*Cot[(c + d*x)/2]*EllipticF[ArcSin[Tan[(c + d*x)/2]], (a - b)/(a + b)] + 4*(a - b)*Csc[c + d*x]^2*(2*Cos[c + d*x]*(b + a*Cos[c + d*x]) + 32*(a + b )*Cos[(c + d*x)/2]^3*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sqrt[(b + a*Cos [c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*EllipticPi[-1, ArcSin[Tan[(c + d* x)/2]], (a - b)/(a + b)]*Sin[(c + d*x)/2]))*Tan[c + d*x])/(8*(-a^2 + b^2)* d*Sqrt[a + b*Sec[c + d*x]])
Time = 0.79 (sec) , antiderivative size = 361, 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 \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right )^2 \sqrt {a+b \csc \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4384 |
\(\displaystyle \int \left (\frac {\csc ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}}-\frac {1}{\sqrt {a+b \sec (c+d x)}}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b^2 \tan (c+d x)}{d \left (a^2-b^2\right ) \sqrt {a+b \sec (c+d x)}}-\frac {\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 \sqrt {a+b}}+\frac {\cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d \sqrt {a+b}}+\frac {2 \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 {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{a d}-\frac {\cot (c+d x)}{d \sqrt {a+b \sec (c+d x)}}\) |
Input:
Int[Cot[c + d*x]^2/Sqrt[a + b*Sec[c + d*x]],x]
Output:
(Cot[c + d*x]*EllipticE[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))])/(Sqrt[a + b]*d) - (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))])/(Sqrt[a + b]*d) + (2*S qrt[a + b]*Cot[c + d*x]*EllipticPi[(a + b)/a, ArcSin[Sqrt[a + b*Sec[c + d* x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[c + d*x]))/(a + b)]*Sq rt[-((b*(1 + Sec[c + d*x]))/(a - b))])/(a*d) - Cot[c + d*x]/(d*Sqrt[a + b* Sec[c + d*x]]) + (b^2*Tan[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Sec[c + d*x] ])
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]
Leaf count of result is larger than twice the leaf count of optimal. \(713\) vs. \(2(330)=660\).
Time = 4.80 (sec) , antiderivative size = 714, normalized size of antiderivative = 1.98
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^{2}+\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 )}}\, b^{2}+\left (-1-\cos \left (d x +c \right )\right ) \operatorname {EllipticE}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), \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 b +\left (-1-\cos \left (d x +c \right )\right ) \operatorname {EllipticE}\left (-\csc \left (d x +c \right )+\cot \left (d x +c \right ), \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 )}}\, b^{2}+\left (-2 \cos \left (d x +c \right )-2\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 ) a^{2}+\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 ) a b +\left (3 \cos \left (d x +c \right )+3\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^{2}-a^{2} \cos \left (d x +c \right ) \cot \left (d x +c \right )+\left (-1+\cos \left (d x +c \right )\right ) a b \cot \left (d x +c \right )+b^{2} \cot \left (d x +c \right )\right )}{d \left (a -b \right ) \left (a +b \right ) \left (b +a \cos \left (d x +c \right )\right )}\) | \(714\) |
Input:
int(cot(d*x+c)^2/(a+b*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
1/d/(a-b)/(a+b)*(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+c os(d*x+c)))^(1/2)*(1/(a+b)*(b+a*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*a^2+(-4* cos(d*x+c)-4)*EllipticPi(-csc(d*x+c)+cot(d*x+c),-1,((a-b)/(a+b))^(1/2))*(c os(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)*b^2+(-1-cos(d*x+c))*EllipticE(-csc(d*x+c)+cot(d*x+c),((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*b+(-1-cos(d*x+c))*EllipticE(-csc(d*x+c)+cot(d*x+c),((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)*b^2+(-2*cos(d*x+c)-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)*EllipticF(-csc(d*x+c)+ cot(d*x+c),((a-b)/(a+b))^(1/2))*a^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))*a*b+(3*cos(d*x+c)+3)*(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)*Ellipt icF(-csc(d*x+c)+cot(d*x+c),((a-b)/(a+b))^(1/2))*b^2-a^2*cos(d*x+c)*cot(d*x +c)+(-1+cos(d*x+c))*a*b*cot(d*x+c)+b^2*cot(d*x+c))
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}} \,d x } \] Input:
integrate(cot(d*x+c)^2/(a+b*sec(d*x+c))^(1/2),x, algorithm="fricas")
Output:
integral(cot(d*x + c)^2/sqrt(b*sec(d*x + c) + a), x)
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sqrt {a + b \sec {\left (c + d x \right )}}}\, dx \] Input:
integrate(cot(d*x+c)**2/(a+b*sec(d*x+c))**(1/2),x)
Output:
Integral(cot(c + d*x)**2/sqrt(a + b*sec(c + d*x)), x)
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}} \,d x } \] Input:
integrate(cot(d*x+c)^2/(a+b*sec(d*x+c))^(1/2),x, algorithm="maxima")
Output:
integrate(cot(d*x + c)^2/sqrt(b*sec(d*x + c) + a), x)
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}} \,d x } \] Input:
integrate(cot(d*x+c)^2/(a+b*sec(d*x+c))^(1/2),x, algorithm="giac")
Output:
integrate(cot(d*x + c)^2/sqrt(b*sec(d*x + c) + a), x)
Timed out. \[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int \frac {{\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)
\[ \int \frac {\cot ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx=\int \frac {\sqrt {\sec \left (d x +c \right ) b +a}\, \cot \left (d x +c \right )^{2}}{\sec \left (d x +c \right ) b +a}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)/(sec(c + d*x)*b + a),x)