3.712 \(\int \sqrt{1-\cot ^2(x)} \sec ^2(x) \, dx\)

Optimal. Leaf size=19 \[ \tan (x) \sqrt{1-\cot ^2(x)}+\sin ^{-1}(\cot (x)) \]

[Out]

ArcSin[Cot[x]] + Sqrt[1 - Cot[x]^2]*Tan[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0494782, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {3663, 277, 216} \[ \tan (x) \sqrt{1-\cot ^2(x)}+\sin ^{-1}(\cot (x)) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 - Cot[x]^2]*Sec[x]^2,x]

[Out]

ArcSin[Cot[x]] + Sqrt[1 - Cot[x]^2]*Tan[x]

Rule 3663

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff^(m + 1))/f, Subst[Int[(x^m*(a + b*(ff*x)^n)^p)/(c^2 + ff^2*x^2
)^(m/2 + 1), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2]

Rule 277

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^p)/(c*(m +
1)), x] - Dist[(b*n*p)/(c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] &&
IGtQ[n, 0] && GtQ[p, 0] && LtQ[m, -1] &&  !ILtQ[(m + n*p + n + 1)/n, 0] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rubi steps

\begin{align*} \int \sqrt{1-\cot ^2(x)} \sec ^2(x) \, dx &=-\operatorname{Subst}\left (\int \frac{\sqrt{1-x^2}}{x^2} \, dx,x,\cot (x)\right )\\ &=\sqrt{1-\cot ^2(x)} \tan (x)+\operatorname{Subst}\left (\int \frac{1}{\sqrt{1-x^2}} \, dx,x,\cot (x)\right )\\ &=\sin ^{-1}(\cot (x))+\sqrt{1-\cot ^2(x)} \tan (x)\\ \end{align*}

Mathematica [B]  time = 0.528552, size = 52, normalized size = 2.74 \[ \tan (x) \sqrt{1-\cot ^2(x)} \sec (2 x) \left (\cos (2 x)-\cos (x) \sqrt{-\cos (2 x)} \tan ^{-1}\left (\frac{\cos (x)}{\sqrt{-\cos (2 x)}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[1 - Cot[x]^2]*Sec[x]^2,x]

[Out]

(-(ArcTan[Cos[x]/Sqrt[-Cos[2*x]]]*Cos[x]*Sqrt[-Cos[2*x]]) + Cos[2*x])*Sqrt[1 - Cot[x]^2]*Sec[2*x]*Tan[x]

________________________________________________________________________________________

Maple [C]  time = 0.318, size = 223, normalized size = 11.7 \begin{align*} -{\frac{-1+\cos \left ( x \right ) }{2\,\cos \left ( x \right ) \sin \left ( x \right ) } \left ( 4\,i\cos \left ( x \right ) \ln \left ( 4\,{\frac{-1+\cos \left ( x \right ) }{ \left ( \sin \left ( x \right ) \right ) ^{2}} \left ( 2\,i\cos \left ( x \right ) -\cos \left ( x \right ) \sqrt{-{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{ \left ( 1+\cos \left ( x \right ) \right ) ^{2}}}}+i-\sqrt{-{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{ \left ( 1+\cos \left ( x \right ) \right ) ^{2}}}} \right ) } \right ) -\cos \left ( x \right ) \arctan \left ({\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-3\,\cos \left ( x \right ) +1}{ \left ( \sin \left ( x \right ) \right ) ^{2}}{\frac{1}{\sqrt{-{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{ \left ( 1+\cos \left ( x \right ) \right ) ^{2}}}}}}} \right ) -3\,\cos \left ( x \right ) \arcsin \left ( 1/2\,{\frac{\sqrt{2} \left ( 1+2\,\cos \left ( x \right ) \right ) }{1+\cos \left ( x \right ) }} \right ) +2\,\cos \left ( x \right ) \sqrt{-{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{ \left ( 1+\cos \left ( x \right ) \right ) ^{2}}}}+2\,\sqrt{-{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{ \left ( 1+\cos \left ( x \right ) \right ) ^{2}}}} \right ) \sqrt{{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{-1+ \left ( \cos \left ( x \right ) \right ) ^{2}}}}{\frac{1}{\sqrt{-{\frac{2\, \left ( \cos \left ( x \right ) \right ) ^{2}-1}{ \left ( 1+\cos \left ( x \right ) \right ) ^{2}}}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(x)^2*(1-cot(x)^2)^(1/2),x)

[Out]

-1/2*(-1+cos(x))*(4*I*cos(x)*ln(4*(-1+cos(x))*(2*I*cos(x)-cos(x)*(-(2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)+I-(-(2*c
os(x)^2-1)/(1+cos(x))^2)^(1/2))/sin(x)^2)-cos(x)*arctan((2*cos(x)^2-3*cos(x)+1)/(-(2*cos(x)^2-1)/(1+cos(x))^2)
^(1/2)/sin(x)^2)-3*cos(x)*arcsin(1/2*2^(1/2)*(1+2*cos(x))/(1+cos(x)))+2*cos(x)*(-(2*cos(x)^2-1)/(1+cos(x))^2)^
(1/2)+2*(-(2*cos(x)^2-1)/(1+cos(x))^2)^(1/2))*((2*cos(x)^2-1)/(-1+cos(x)^2))^(1/2)/cos(x)/sin(x)/(-(2*cos(x)^2
-1)/(1+cos(x))^2)^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.45095, size = 41, normalized size = 2.16 \begin{align*} \sqrt{-\frac{1}{\tan \left (x\right )^{2}} + 1} \tan \left (x\right ) - \arctan \left (\sqrt{-\frac{1}{\tan \left (x\right )^{2}} + 1} \tan \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2*(1-cot(x)^2)^(1/2),x, algorithm="maxima")

[Out]

sqrt(-1/tan(x)^2 + 1)*tan(x) - arctan(sqrt(-1/tan(x)^2 + 1)*tan(x))

________________________________________________________________________________________

Fricas [B]  time = 2.26284, size = 225, normalized size = 11.84 \begin{align*} -\frac{\arctan \left (\frac{{\left (3 \, \cos \left (x\right )^{2} - 1\right )} \sqrt{\frac{2 \, \cos \left (x\right )^{2} - 1}{\cos \left (x\right )^{2} - 1}} \sin \left (x\right )}{2 \,{\left (2 \, \cos \left (x\right )^{3} - \cos \left (x\right )\right )}}\right ) \cos \left (x\right ) - 2 \, \sqrt{\frac{2 \, \cos \left (x\right )^{2} - 1}{\cos \left (x\right )^{2} - 1}} \sin \left (x\right )}{2 \, \cos \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2*(1-cot(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/2*(arctan(1/2*(3*cos(x)^2 - 1)*sqrt((2*cos(x)^2 - 1)/(cos(x)^2 - 1))*sin(x)/(2*cos(x)^3 - cos(x)))*cos(x) -
 2*sqrt((2*cos(x)^2 - 1)/(cos(x)^2 - 1))*sin(x))/cos(x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{- \left (\cot{\left (x \right )} - 1\right ) \left (\cot{\left (x \right )} + 1\right )} \sec ^{2}{\left (x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)**2*(1-cot(x)**2)**(1/2),x)

[Out]

Integral(sqrt(-(cot(x) - 1)*(cot(x) + 1))*sec(x)**2, x)

________________________________________________________________________________________

Giac [C]  time = 1.20651, size = 192, normalized size = 10.11 \begin{align*} -\frac{1}{2} \,{\left (\pi + 2 \, \arctan \left (-i\right ) + 2 i\right )} \mathrm{sgn}\left (\sin \left (x\right )\right ) + \frac{1}{4} \,{\left (2 \, \pi \mathrm{sgn}\left (\cos \left (x\right )\right ) + \sqrt{2}{\left (\frac{\sqrt{2} \sqrt{-2 \, \cos \left (x\right )^{2} + 1} - \sqrt{2}}{\cos \left (x\right )} - \frac{4 \, \cos \left (x\right )}{\sqrt{2} \sqrt{-2 \, \cos \left (x\right )^{2} + 1} - \sqrt{2}}\right )} + 4 \, \arctan \left (-\frac{\sqrt{2}{\left (\frac{{\left (\sqrt{2} \sqrt{-2 \, \cos \left (x\right )^{2} + 1} - \sqrt{2}\right )}^{2}}{\cos \left (x\right )^{2}} - 4\right )} \cos \left (x\right )}{4 \,{\left (\sqrt{2} \sqrt{-2 \, \cos \left (x\right )^{2} + 1} - \sqrt{2}\right )}}\right )\right )} \mathrm{sgn}\left (\sin \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(x)^2*(1-cot(x)^2)^(1/2),x, algorithm="giac")

[Out]

-1/2*(pi + 2*arctan(-I) + 2*I)*sgn(sin(x)) + 1/4*(2*pi*sgn(cos(x)) + sqrt(2)*((sqrt(2)*sqrt(-2*cos(x)^2 + 1) -
 sqrt(2))/cos(x) - 4*cos(x)/(sqrt(2)*sqrt(-2*cos(x)^2 + 1) - sqrt(2))) + 4*arctan(-1/4*sqrt(2)*((sqrt(2)*sqrt(
-2*cos(x)^2 + 1) - sqrt(2))^2/cos(x)^2 - 4)*cos(x)/(sqrt(2)*sqrt(-2*cos(x)^2 + 1) - sqrt(2))))*sgn(sin(x))