3.457 \(\int \sqrt {\cot (2 x) \tan (x)} \, dx\)

Optimal. Leaf size=32 \[ \tan ^{-1}\left (\frac {\sqrt {2} \tan (x)}{\sqrt {1-\tan ^2(x)}}\right )-\frac {\sin ^{-1}(\tan (x))}{\sqrt {2}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.454, Rules used = {12, 402, 216, 377, 203} \[ \tan ^{-1}\left (\frac {\sqrt {2} \tan (x)}{\sqrt {1-\tan ^2(x)}}\right )-\frac {\sin ^{-1}(\tan (x))}{\sqrt {2}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[Cot[2*x]*Tan[x]],x]

[Out]

-(ArcSin[Tan[x]]/Sqrt[2]) + ArcTan[(Sqrt[2]*Tan[x])/Sqrt[1 - Tan[x]^2]]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 203

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

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]

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 402

Int[((a_) + (b_.)*(x_)^2)^(p_.)/((c_) + (d_.)*(x_)^2), x_Symbol] :> Dist[b/d, Int[(a + b*x^2)^(p - 1), x], x]
- Dist[(b*c - a*d)/d, Int[(a + b*x^2)^(p - 1)/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d,
0] && GtQ[p, 0] && (EqQ[p, 1/2] || EqQ[Denominator[p], 4])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 52, normalized size = 1.62 \[ \frac {\cos (x) \sqrt {\tan (x) \cot (2 x)} \left (\sqrt {2} \sin ^{-1}\left (\sqrt {2} \sin (x)\right )-\tan ^{-1}\left (\frac {\sin (x)}{\sqrt {\cos (2 x)}}\right )\right )}{\sqrt {\cos (2 x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Cot[2*x]*Tan[x]],x]

[Out]

((Sqrt[2]*ArcSin[Sqrt[2]*Sin[x]] - ArcTan[Sin[x]/Sqrt[Cos[2*x]]])*Cos[x]*Sqrt[Cot[2*x]*Tan[x]])/Sqrt[Cos[2*x]]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\cot (2 x) \tan (x)} \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[Sqrt[Cot[2*x]*Tan[x]],x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 1.25, size = 115, normalized size = 3.59 \[ \frac {1}{4} \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (3 \, \cos \left (2 \, x\right )^{2} + 2 \, \cos \left (2 \, x\right ) - 1\right )} \sqrt {\frac {\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) + 1}}}{4 \, \cos \left (2 \, x\right ) \sin \left (2 \, x\right )}\right ) - \frac {1}{2} \, \arctan \left (\frac {\sqrt {2} {\left (2 \, \sqrt {2} \cos \left (2 \, x\right )^{2} + \sqrt {2} \cos \left (2 \, x\right ) - \sqrt {2}\right )} \sqrt {\frac {\cos \left (2 \, x\right )}{\cos \left (2 \, x\right ) + 1}}}{4 \, \cos \left (2 \, x\right ) \sin \left (2 \, x\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [C]  time = 0.83, size = 138, normalized size = 4.31 \[ \frac {1}{2} \, {\left (\pi - \sqrt {2} \arctan \left (-i\right ) - \sqrt {2} \arctan \left (\sqrt {2}\right ) - i \, \log \left (2 \, \sqrt {2} + 3\right )\right )} \mathrm {sgn}\left (\sin \left (2 \, x\right )\right ) - \frac {\sqrt {2} {\left (-i \, \sqrt {2} \log \left (2 i \, \sqrt {2} + 3 i\right ) - 2 \, \arctan \left (-i\right )\right )} \mathrm {sgn}\left (\cos \relax (x)\right ) + 2 \, {\left (\sqrt {2} \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (\frac {3 \, {\left (2 \, \sqrt {2} \sqrt {-2 \, \cos \relax (x)^{4} + 3 \, \cos \relax (x)^{2} - 1} - 1\right )}}{4 \, \cos \relax (x)^{2} - 3} - 1\right )}\right ) + \arcsin \left (4 \, \cos \relax (x)^{2} - 3\right )\right )} \mathrm {sgn}\left (\cos \relax (x)\right )}{4 \, \mathrm {sgn}\left (\cos \relax (x)\right ) \mathrm {sgn}\left (\sin \left (2 \, x\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(pi - sqrt(2)*arctan(-I) - sqrt(2)*arctan(sqrt(2)) - I*log(2*sqrt(2) + 3))*sgn(sin(2*x)) - 1/4*(sqrt(2)*(-
I*sqrt(2)*log(2*I*sqrt(2) + 3*I) - 2*arctan(-I))*sgn(cos(x)) + 2*(sqrt(2)*arctan(1/4*sqrt(2)*(3*(2*sqrt(2)*sqr
t(-2*cos(x)^4 + 3*cos(x)^2 - 1) - 1)/(4*cos(x)^2 - 3) - 1)) + arcsin(4*cos(x)^2 - 3))*sgn(cos(x)))/(sgn(cos(x)
)*sgn(sin(2*x)))

________________________________________________________________________________________

maple [C]  time = 0.76, size = 242, normalized size = 7.56




method result size



default \(\frac {\sqrt {2}\, \left (4 \EllipticPi \left (\frac {\sqrt {3+2 \sqrt {2}}\, \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, -\frac {1}{3+2 \sqrt {2}}, \frac {\sqrt {3-2 \sqrt {2}}}{\sqrt {3+2 \sqrt {2}}}\right )-2 \EllipticPi \left (\frac {\sqrt {3+2 \sqrt {2}}\, \left (-1+\cos \relax (x )\right )}{\sin \relax (x )}, \frac {1}{3+2 \sqrt {2}}, \frac {\sqrt {3-2 \sqrt {2}}}{\sqrt {3+2 \sqrt {2}}}\right )-\EllipticF \left (\frac {\left (-1+\cos \relax (x )\right ) \left (1+\sqrt {2}\right )}{\sin \relax (x )}, 3-2 \sqrt {2}\right )\right ) \left (2+\sqrt {2}\right ) \cos \relax (x ) \left (\sin ^{2}\relax (x )\right ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\cos \relax (x )^{2}}}\, \sqrt {-\frac {2 \left (\cos \relax (x ) \sqrt {2}-\sqrt {2}-2 \cos \relax (x )+1\right )}{1+\cos \relax (x )}}\, \sqrt {\frac {\cos \relax (x ) \sqrt {2}-\sqrt {2}+2 \cos \relax (x )-1}{1+\cos \relax (x )}}}{2 \sqrt {3+2 \sqrt {2}}\, \left (1+\sqrt {2}\right ) \left (-1+\cos \relax (x )\right ) \left (2 \left (\cos ^{2}\relax (x )\right )-1\right )}\) \(242\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cot(2*x)/cot(x))^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*2^(1/2)/(3+2*2^(1/2))^(1/2)/(1+2^(1/2))*(4*EllipticPi((3+2*2^(1/2))^(1/2)*(-1+cos(x))/sin(x),-1/(3+2*2^(1/
2)),(3-2*2^(1/2))^(1/2)/(3+2*2^(1/2))^(1/2))-2*EllipticPi((3+2*2^(1/2))^(1/2)*(-1+cos(x))/sin(x),1/(3+2*2^(1/2
)),(3-2*2^(1/2))^(1/2)/(3+2*2^(1/2))^(1/2))-EllipticF((-1+cos(x))*(1+2^(1/2))/sin(x),3-2*2^(1/2)))*(2+2^(1/2))
*cos(x)*sin(x)^2*((2*cos(x)^2-1)/cos(x)^2)^(1/2)*(-2*(cos(x)*2^(1/2)-2^(1/2)-2*cos(x)+1)/(1+cos(x)))^(1/2)*((c
os(x)*2^(1/2)-2^(1/2)+2*cos(x)-1)/(1+cos(x)))^(1/2)/(-1+cos(x))/(2*cos(x)^2-1)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: sign: argument cannot be imaginary
; found %i

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.03 \[ \int \sqrt {\frac {\mathrm {cot}\left (2\,x\right )}{\mathrm {cot}\relax (x)}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\frac {\cot {\left (2 x \right )}}{\cot {\relax (x )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(cot(2*x)/cot(x)), x)

________________________________________________________________________________________