3.45 \(\int \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \, dx\)

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

[Out]

cot(x)*2^(1/2)*(-1+sec(x))^(1/2)*(1+sec(x))^(1/2)*(arctan(1/2*(-2^(1/2)-(-1+sec(x))^(1/2)+(1+sec(x))^(1/2))*(-
2+2*2^(1/2))^(1/2)/(-(-1+sec(x))^(1/2)+(1+sec(x))^(1/2))^(1/2))*(2^(1/2)-1)^(1/2)+arctanh((2+2*2^(1/2))^(1/2)*
(-(-1+sec(x))^(1/2)+(1+sec(x))^(1/2))^(1/2)/(2^(1/2)-(-1+sec(x))^(1/2)+(1+sec(x))^(1/2)))*(2^(1/2)-1)^(1/2)-ar
ctan(1/2*(-2^(1/2)-(-1+sec(x))^(1/2)+(1+sec(x))^(1/2))*(2+2*2^(1/2))^(1/2)/(-(-1+sec(x))^(1/2)+(1+sec(x))^(1/2
))^(1/2))*(1+2^(1/2))^(1/2)-arctanh((-2+2*2^(1/2))^(1/2)*(-(-1+sec(x))^(1/2)+(1+sec(x))^(1/2))^(1/2)/(2^(1/2)-
(-1+sec(x))^(1/2)+(1+sec(x))^(1/2)))*(1+2^(1/2))^(1/2))

________________________________________________________________________________________

Rubi [F]  time = 0.79, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \[ \int \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \, dx \]

Verification is Not applicable to the result.

[In]

Int[Sqrt[-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]],x]

[Out]

Defer[Int][Sqrt[-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]], x]

Rubi steps

\begin {align*} \int \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \, dx &=\int \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.18, size = 552, normalized size = 1.64 \[ \frac {\sqrt [4]{2} \sin (x) \cos (x) \left (\sqrt {\sec (x)-1}-\sqrt {\sec (x)+1}\right )^2 \left (2 \sin \left (\frac {\pi }{8}\right ) \tan ^{-1}\left (\frac {\sec \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}}{\sqrt [4]{2}}-\tan \left (\frac {\pi }{8}\right )\right )+2 \sin \left (\frac {\pi }{8}\right ) \tan ^{-1}\left (\frac {\sec \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}}{\sqrt [4]{2}}+\tan \left (\frac {\pi }{8}\right )\right )+\cos \left (\frac {\pi }{8}\right ) \log \left (\sqrt {2} \left (\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}\right )-2\ 2^{3/4} \sin \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}+2\right )-\cos \left (\frac {\pi }{8}\right ) \log \left (\sqrt {2} \left (\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}\right )+2\ 2^{3/4} \sin \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}+2\right )-\sin \left (\frac {\pi }{8}\right ) \log \left (\sqrt {2} \left (\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}\right )-2\ 2^{3/4} \cos \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}+2\right )+\sin \left (\frac {\pi }{8}\right ) \log \left (\sqrt {2} \left (\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}\right )+\sqrt [4]{2} \csc \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}+2\right )+2 \cos \left (\frac {\pi }{8}\right ) \tan ^{-1}\left (\cot \left (\frac {\pi }{8}\right )-\frac {\csc \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}}{\sqrt [4]{2}}\right )-2 \cos \left (\frac {\pi }{8}\right ) \tan ^{-1}\left (\frac {\csc \left (\frac {\pi }{8}\right ) \sqrt {\sqrt {\sec (x)+1}-\sqrt {\sec (x)-1}}}{\sqrt [4]{2}}+\cot \left (\frac {\pi }{8}\right )\right )\right )}{\cos (2 x)+2 \cos (x) \sqrt {\sec (x)-1} \sqrt {\sec (x)+1}-1} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Sqrt[-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]],x]

[Out]

(2^(1/4)*Cos[x]*(Sqrt[-1 + Sec[x]] - Sqrt[1 + Sec[x]])^2*(2*ArcTan[Cot[Pi/8] - (Csc[Pi/8]*Sqrt[-Sqrt[-1 + Sec[
x]] + Sqrt[1 + Sec[x]]])/2^(1/4)]*Cos[Pi/8] - 2*ArcTan[Cot[Pi/8] + (Csc[Pi/8]*Sqrt[-Sqrt[-1 + Sec[x]] + Sqrt[1
 + Sec[x]]])/2^(1/4)]*Cos[Pi/8] + Cos[Pi/8]*Log[2 + Sqrt[2]*(-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]) - 2*2^(3/4
)*Sqrt[-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]]*Sin[Pi/8]] - Cos[Pi/8]*Log[2 + Sqrt[2]*(-Sqrt[-1 + Sec[x]] + Sqr
t[1 + Sec[x]]) + 2*2^(3/4)*Sqrt[-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]]*Sin[Pi/8]] + 2*ArcTan[(Sec[Pi/8]*Sqrt[-
Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]])/2^(1/4) - Tan[Pi/8]]*Sin[Pi/8] + 2*ArcTan[(Sec[Pi/8]*Sqrt[-Sqrt[-1 + Se
c[x]] + Sqrt[1 + Sec[x]]])/2^(1/4) + Tan[Pi/8]]*Sin[Pi/8] - Log[2 - 2*2^(3/4)*Cos[Pi/8]*Sqrt[-Sqrt[-1 + Sec[x]
] + Sqrt[1 + Sec[x]]] + Sqrt[2]*(-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]])]*Sin[Pi/8] + Log[2 + 2^(1/4)*Csc[Pi/8]
*Sqrt[-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]]] + Sqrt[2]*(-Sqrt[-1 + Sec[x]] + Sqrt[1 + Sec[x]])]*Sin[Pi/8])*Sin
[x])/(-1 + Cos[2*x] + 2*Cos[x]*Sqrt[-1 + Sec[x]]*Sqrt[1 + Sec[x]])

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\sqrt {\sec \relax (x) + 1} - \sqrt {\sec \relax (x) - 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(sqrt(sec(x) + 1) - sqrt(sec(x) - 1)), x)

________________________________________________________________________________________

maple [F]  time = 0.26, size = 0, normalized size = 0.00 \[ \int \sqrt {-\sqrt {\sec \relax (x )-1}+\sqrt {\sec \relax (x )+1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-(sec(x)-1)^(1/2)+(1+sec(x))^(1/2))^(1/2),x)

[Out]

int((-(sec(x)-1)^(1/2)+(1+sec(x))^(1/2))^(1/2),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\sqrt {\sec \relax (x) + 1} - \sqrt {\sec \relax (x) - 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(sqrt(sec(x) + 1) - sqrt(sec(x) - 1)), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \sqrt {\sqrt {\frac {1}{\cos \relax (x)}+1}-\sqrt {\frac {1}{\cos \relax (x)}-1}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((1/cos(x) + 1)^(1/2) - (1/cos(x) - 1)^(1/2))^(1/2),x)

[Out]

int(((1/cos(x) + 1)^(1/2) - (1/cos(x) - 1)^(1/2))^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {- \sqrt {\sec {\relax (x )} - 1} + \sqrt {\sec {\relax (x )} + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(-sqrt(sec(x) - 1) + sqrt(sec(x) + 1)), x)

________________________________________________________________________________________