3.397 \(\int \sqrt{\tan (x)} \, dx\)

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

[Out]

-(ArcTan[1 - Sqrt[2]*Sqrt[Tan[x]]]/Sqrt[2]) + ArcTan[1 + Sqrt[2]*Sqrt[Tan[x]]]/S
qrt[2] + Log[1 - Sqrt[2]*Sqrt[Tan[x]] + Tan[x]]/(2*Sqrt[2]) - Log[1 + Sqrt[2]*Sq
rt[Tan[x]] + Tan[x]]/(2*Sqrt[2])

_______________________________________________________________________________________

Rubi [A]  time = 0.128825, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 8, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 1.333 \[ -\frac{\tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (x)}\right )}{\sqrt{2}}+\frac{\tan ^{-1}\left (\sqrt{2} \sqrt{\tan (x)}+1\right )}{\sqrt{2}}+\frac{\log \left (\tan (x)-\sqrt{2} \sqrt{\tan (x)}+1\right )}{2 \sqrt{2}}-\frac{\log \left (\tan (x)+\sqrt{2} \sqrt{\tan (x)}+1\right )}{2 \sqrt{2}} \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[Tan[x]],x]

[Out]

-(ArcTan[1 - Sqrt[2]*Sqrt[Tan[x]]]/Sqrt[2]) + ArcTan[1 + Sqrt[2]*Sqrt[Tan[x]]]/S
qrt[2] + Log[1 - Sqrt[2]*Sqrt[Tan[x]] + Tan[x]]/(2*Sqrt[2]) - Log[1 + Sqrt[2]*Sq
rt[Tan[x]] + Tan[x]]/(2*Sqrt[2])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 7.93392, size = 94, normalized size = 0.96 \[ \frac{\sqrt{2} \log{\left (- \sqrt{2} \sqrt{\tan{\left (x \right )}} + \tan{\left (x \right )} + 1 \right )}}{4} - \frac{\sqrt{2} \log{\left (\sqrt{2} \sqrt{\tan{\left (x \right )}} + \tan{\left (x \right )} + 1 \right )}}{4} + \frac{\sqrt{2} \operatorname{atan}{\left (\sqrt{2} \sqrt{\tan{\left (x \right )}} - 1 \right )}}{2} + \frac{\sqrt{2} \operatorname{atan}{\left (\sqrt{2} \sqrt{\tan{\left (x \right )}} + 1 \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(tan(x)**(1/2),x)

[Out]

sqrt(2)*log(-sqrt(2)*sqrt(tan(x)) + tan(x) + 1)/4 - sqrt(2)*log(sqrt(2)*sqrt(tan
(x)) + tan(x) + 1)/4 + sqrt(2)*atan(sqrt(2)*sqrt(tan(x)) - 1)/2 + sqrt(2)*atan(s
qrt(2)*sqrt(tan(x)) + 1)/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.0997435, size = 82, normalized size = 0.84 \[ \frac{-2 \tan ^{-1}\left (1-\sqrt{2} \sqrt{\tan (x)}\right )+2 \tan ^{-1}\left (\sqrt{2} \sqrt{\tan (x)}+1\right )+\log \left (\tan (x)-\sqrt{2} \sqrt{\tan (x)}+1\right )-\log \left (\tan (x)+\sqrt{2} \sqrt{\tan (x)}+1\right )}{2 \sqrt{2}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[Tan[x]],x]

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 49, normalized size = 0.5 \[{\frac{\cos \left ( x \right ) \sqrt{2}\arccos \left ( \cos \left ( x \right ) -\sin \left ( x \right ) \right ) }{2}\sqrt{\tan \left ( x \right ) }{\frac{1}{\sqrt{\cos \left ( x \right ) \sin \left ( x \right ) }}}}-{\frac{\sqrt{2}}{2}\ln \left ( \cos \left ( x \right ) +\sqrt{2}\sqrt{\tan \left ( x \right ) }\cos \left ( x \right ) +\sin \left ( x \right ) \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(tan(x)^(1/2),x)

[Out]

1/2*tan(x)^(1/2)/(cos(x)*sin(x))^(1/2)*cos(x)*2^(1/2)*arccos(cos(x)-sin(x))-1/2*
2^(1/2)*ln(cos(x)+2^(1/2)*tan(x)^(1/2)*cos(x)+sin(x))

_______________________________________________________________________________________

Maxima [A]  time = 1.56905, size = 108, normalized size = 1.1 \[ \frac{1}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} + 2 \, \sqrt{\tan \left (x\right )}\right )}\right ) + \frac{1}{2} \, \sqrt{2} \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} - 2 \, \sqrt{\tan \left (x\right )}\right )}\right ) - \frac{1}{4} \, \sqrt{2} \log \left (\sqrt{2} \sqrt{\tan \left (x\right )} + \tan \left (x\right ) + 1\right ) + \frac{1}{4} \, \sqrt{2} \log \left (-\sqrt{2} \sqrt{\tan \left (x\right )} + \tan \left (x\right ) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(tan(x)),x, algorithm="maxima")

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.251358, size = 246, normalized size = 2.51 \[ -\sqrt{2} \arctan \left (\frac{1}{\sqrt{2} \sqrt{\frac{\sqrt{2} \sqrt{\frac{\sin \left (x\right )}{\cos \left (x\right )}} \cos \left (x\right ) + \cos \left (x\right ) + \sin \left (x\right )}{\cos \left (x\right )}} + \sqrt{2} \sqrt{\frac{\sin \left (x\right )}{\cos \left (x\right )}} + 1}\right ) - \sqrt{2} \arctan \left (\frac{1}{\sqrt{2} \sqrt{-\frac{\sqrt{2} \sqrt{\frac{\sin \left (x\right )}{\cos \left (x\right )}} \cos \left (x\right ) - \cos \left (x\right ) - \sin \left (x\right )}{\cos \left (x\right )}} + \sqrt{2} \sqrt{\frac{\sin \left (x\right )}{\cos \left (x\right )}} - 1}\right ) - \frac{1}{4} \, \sqrt{2} \log \left (\frac{2 \,{\left (\sqrt{2} \sqrt{\frac{\sin \left (x\right )}{\cos \left (x\right )}} \cos \left (x\right ) + \cos \left (x\right ) + \sin \left (x\right )\right )}}{\cos \left (x\right )}\right ) + \frac{1}{4} \, \sqrt{2} \log \left (-\frac{2 \,{\left (\sqrt{2} \sqrt{\frac{\sin \left (x\right )}{\cos \left (x\right )}} \cos \left (x\right ) - \cos \left (x\right ) - \sin \left (x\right )\right )}}{\cos \left (x\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(tan(x)),x, algorithm="fricas")

[Out]

-sqrt(2)*arctan(1/(sqrt(2)*sqrt((sqrt(2)*sqrt(sin(x)/cos(x))*cos(x) + cos(x) + s
in(x))/cos(x)) + sqrt(2)*sqrt(sin(x)/cos(x)) + 1)) - sqrt(2)*arctan(1/(sqrt(2)*s
qrt(-(sqrt(2)*sqrt(sin(x)/cos(x))*cos(x) - cos(x) - sin(x))/cos(x)) + sqrt(2)*sq
rt(sin(x)/cos(x)) - 1)) - 1/4*sqrt(2)*log(2*(sqrt(2)*sqrt(sin(x)/cos(x))*cos(x)
+ cos(x) + sin(x))/cos(x)) + 1/4*sqrt(2)*log(-2*(sqrt(2)*sqrt(sin(x)/cos(x))*cos
(x) - cos(x) - sin(x))/cos(x))

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{\tan{\left (x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(tan(x)**(1/2),x)

[Out]

Integral(sqrt(tan(x)), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.205685, size = 108, normalized size = 1.1 \[ \frac{1}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} + 2 \, \sqrt{\tan \left (x\right )}\right )}\right ) + \frac{1}{2} \, \sqrt{2} \arctan \left (-\frac{1}{2} \, \sqrt{2}{\left (\sqrt{2} - 2 \, \sqrt{\tan \left (x\right )}\right )}\right ) - \frac{1}{4} \, \sqrt{2}{\rm ln}\left (\sqrt{2} \sqrt{\tan \left (x\right )} + \tan \left (x\right ) + 1\right ) + \frac{1}{4} \, \sqrt{2}{\rm ln}\left (-\sqrt{2} \sqrt{\tan \left (x\right )} + \tan \left (x\right ) + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(tan(x)),x, algorithm="giac")

[Out]

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