3.1.45 \(\int \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \, dx\) [45]

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

[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.58, 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 = {} \begin {gather*} \int \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \, dx \end {gather*}

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 = 1.48, size = 552, normalized size = 1.64 \begin {gather*} \frac {\sqrt [4]{2} \cos (x) \left (\sqrt {-1+\sec (x)}-\sqrt {1+\sec (x)}\right )^2 \left (2 \tan ^{-1}\left (\cot \left (\frac {\pi }{8}\right )-\frac {\csc \left (\frac {\pi }{8}\right ) \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}}}{\sqrt [4]{2}}\right ) \cos \left (\frac {\pi }{8}\right )-2 \tan ^{-1}\left (\cot \left (\frac {\pi }{8}\right )+\frac {\csc \left (\frac {\pi }{8}\right ) \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}}}{\sqrt [4]{2}}\right ) \cos \left (\frac {\pi }{8}\right )+\cos \left (\frac {\pi }{8}\right ) \log \left (2+\sqrt {2} \left (-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}\right )-2\ 2^{3/4} \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \sin \left (\frac {\pi }{8}\right )\right )-\cos \left (\frac {\pi }{8}\right ) \log \left (2+\sqrt {2} \left (-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}\right )+2\ 2^{3/4} \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}} \sin \left (\frac {\pi }{8}\right )\right )+2 \tan ^{-1}\left (\frac {\sec \left (\frac {\pi }{8}\right ) \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}}}{\sqrt [4]{2}}-\tan \left (\frac {\pi }{8}\right )\right ) \sin \left (\frac {\pi }{8}\right )+2 \tan ^{-1}\left (\frac {\sec \left (\frac {\pi }{8}\right ) \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}}}{\sqrt [4]{2}}+\tan \left (\frac {\pi }{8}\right )\right ) \sin \left (\frac {\pi }{8}\right )-\log \left (2-2\ 2^{3/4} \cos \left (\frac {\pi }{8}\right ) \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}}+\sqrt {2} \left (-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}\right )\right ) \sin \left (\frac {\pi }{8}\right )+\log \left (2+\sqrt [4]{2} \csc \left (\frac {\pi }{8}\right ) \sqrt {-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}}+\sqrt {2} \left (-\sqrt {-1+\sec (x)}+\sqrt {1+\sec (x)}\right )\right ) \sin \left (\frac {\pi }{8}\right )\right ) \sin (x)}{-1+\cos (2 x)+2 \cos (x) \sqrt {-1+\sec (x)} \sqrt {1+\sec (x)}} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Sqrt[-Sqrt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[x]*Sqrt[-1 + Sec[x]]*Sqrt[1 + Sec[x]])

________________________________________________________________________________________

Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \sqrt {-\sqrt {-1+\sec \left (x \right )}+\sqrt {1+\sec \left (x \right )}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

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)

________________________________________________________________________________________

Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

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

________________________________________________________________________________________

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

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)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

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)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \sqrt {\sqrt {\frac {1}{\cos \left (x\right )}+1}-\sqrt {\frac {1}{\cos \left (x\right )}-1}} \,d x \end {gather*}

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)

________________________________________________________________________________________