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

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 18, normalized size of antiderivative = 1.06, number of steps used = 3, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4397, 3774, 207} \[ -\tanh ^{-1}\left (\frac {\tan (2 x)}{\sqrt {\sec (2 x)-1}}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-ArcTanh[Tan[2*x]/Sqrt[-1 + Sec[2*x]]]

Rule 207

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

Rule 3774

Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(a + x^2), x], x, (b*C
ot[c + d*x])/Sqrt[a + b*Csc[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.07, size = 45, normalized size = 2.65 \[ -\frac {\sqrt {\cos (2 x)} \sqrt {\tan (x) \tan (2 x)} \csc (x) \tanh ^{-1}\left (\frac {\sqrt {2} \cos (x)}{\sqrt {\cos (2 x)}}\right )}{\sqrt {2}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-((ArcTanh[(Sqrt[2]*Cos[x])/Sqrt[Cos[2*x]]]*Sqrt[Cos[2*x]]*Csc[x]*Sqrt[Tan[x]*Tan[2*x]])/Sqrt[2])

________________________________________________________________________________________

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

Verification is Not applicable to the result.

[In]

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

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 1.41, size = 50, normalized size = 2.94 \[ \frac {1}{2} \, \log \left (-\frac {\tan \relax (x)^{3} - 2 \, \sqrt {2} {\left (\tan \relax (x)^{2} - 1\right )} \sqrt {-\frac {\tan \relax (x)^{2}}{\tan \relax (x)^{2} - 1}} - 3 \, \tan \relax (x)}{\tan \relax (x)^{3} + \tan \relax (x)}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.77, size = 85, normalized size = 5.00 \[ \frac {1}{4} \, \sqrt {2} {\left ({\left (\sqrt {2} \log \left (\sqrt {2} + \sqrt {-\tan \relax (x)^{2} + 1}\right ) - \sqrt {2} \log \left (\sqrt {2} - \sqrt {-\tan \relax (x)^{2} + 1}\right )\right )} \mathrm {sgn}\left (\tan \relax (x)^{2} - 1\right ) \mathrm {sgn}\left (\tan \relax (x)\right ) + {\left (\sqrt {2} \log \left (\sqrt {2} + 1\right ) - \sqrt {2} \log \left (\sqrt {2} - 1\right )\right )} \mathrm {sgn}\left (\tan \relax (x)\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.43, size = 88, normalized size = 5.18




method result size



default \(-\frac {\sqrt {4}\, \sqrt {\frac {1-\left (\cos ^{2}\relax (x )\right )}{2 \left (\cos ^{2}\relax (x )\right )-1}}\, \sin \relax (x ) \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}\, \arctanh \left (\frac {\sqrt {2}\, \cos \relax (x ) \sqrt {4}\, \left (-1+\cos \relax (x )\right )}{2 \sqrt {\frac {2 \left (\cos ^{2}\relax (x )\right )-1}{\left (1+\cos \relax (x )\right )^{2}}}\, \sin \relax (x )^{2}}\right )}{2 \left (-1+\cos \relax (x )\right )}\) \(88\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*4^(1/2)*((1-cos(x)^2)/(2*cos(x)^2-1))^(1/2)*sin(x)*((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)*arctanh(1/2*2^(1/2
)*cos(x)*4^(1/2)*(-1+cos(x))/((2*cos(x)^2-1)/(1+cos(x))^2)^(1/2)/sin(x)^2)/(-1+cos(x))

________________________________________________________________________________________

maxima [B]  time = 1.06, size = 259, normalized size = 15.24 \[ \frac {1}{4} \, \log \left (4 \, \sqrt {\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (4 \, x\right ), \cos \left (4 \, x\right ) + 1\right )\right )^{2} + 4 \, \sqrt {\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (4 \, x\right ), \cos \left (4 \, x\right ) + 1\right )\right )^{2} + 8 \, {\left (\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (4 \, x\right ), \cos \left (4 \, x\right ) + 1\right )\right ) + 4\right ) - \frac {1}{4} \, \log \left (\cos \left (2 \, x\right )^{2} + \sin \left (2 \, x\right )^{2} + \sqrt {\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (4 \, x\right ), \cos \left (4 \, x\right ) + 1\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (4 \, x\right ), \cos \left (4 \, x\right ) + 1\right )\right )^{2}\right )} + 2 \, {\left (\cos \left (4 \, x\right )^{2} + \sin \left (4 \, x\right )^{2} + 2 \, \cos \left (4 \, x\right ) + 1\right )}^{\frac {1}{4}} {\left (\cos \left (2 \, x\right ) \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (4 \, x\right ), \cos \left (4 \, x\right ) + 1\right )\right ) + \sin \left (2 \, x\right ) \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (4 \, x\right ), \cos \left (4 \, x\right ) + 1\right )\right )\right )}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*log(4*sqrt(cos(4*x)^2 + sin(4*x)^2 + 2*cos(4*x) + 1)*cos(1/2*arctan2(sin(4*x), cos(4*x) + 1))^2 + 4*sqrt(c
os(4*x)^2 + sin(4*x)^2 + 2*cos(4*x) + 1)*sin(1/2*arctan2(sin(4*x), cos(4*x) + 1))^2 + 8*(cos(4*x)^2 + sin(4*x)
^2 + 2*cos(4*x) + 1)^(1/4)*cos(1/2*arctan2(sin(4*x), cos(4*x) + 1)) + 4) - 1/4*log(cos(2*x)^2 + sin(2*x)^2 + s
qrt(cos(4*x)^2 + sin(4*x)^2 + 2*cos(4*x) + 1)*(cos(1/2*arctan2(sin(4*x), cos(4*x) + 1))^2 + sin(1/2*arctan2(si
n(4*x), cos(4*x) + 1))^2) + 2*(cos(4*x)^2 + sin(4*x)^2 + 2*cos(4*x) + 1)^(1/4)*(cos(2*x)*cos(1/2*arctan2(sin(4
*x), cos(4*x) + 1)) + sin(2*x)*sin(1/2*arctan2(sin(4*x), cos(4*x) + 1))))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(tan(x)*tan(2*x)), x)

________________________________________________________________________________________