3.291 \(\int \frac{-\sqrt{-1+x}+\sqrt{1+x}}{\sqrt{-1+x}+\sqrt{1+x}} \, dx\)

Optimal. Leaf size=33 \[ \frac{x^2}{2}-\frac{1}{2} \sqrt{x-1} \sqrt{x+1} x+\frac{1}{2} \cosh ^{-1}(x) \]

[Out]

x^2/2 - (Sqrt[-1 + x]*x*Sqrt[1 + x])/2 + ArcCosh[x]/2

_______________________________________________________________________________________

Rubi [A]  time = 0.25071, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 4, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.114 \[ \frac{x^2}{2}-\frac{1}{2} \sqrt{x-1} \sqrt{x+1} x+\frac{1}{2} \cosh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]  Int[(-Sqrt[-1 + x] + Sqrt[1 + x])/(Sqrt[-1 + x] + Sqrt[1 + x]),x]

[Out]

x^2/2 - (Sqrt[-1 + x]*x*Sqrt[1 + x])/2 + ArcCosh[x]/2

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ - \frac{\log{\left (\left (- \sqrt{x - 1} + \sqrt{x + 1}\right )^{2} \right )}}{2} + \frac{\int ^{\left (- \sqrt{x - 1} + \sqrt{x + 1}\right )^{2}} x\, dx}{8} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-log((-sqrt(x - 1) + sqrt(x + 1))**2)/2 + Integral(x, (x, (-sqrt(x - 1) + sqrt(x
 + 1))**2))/8

_______________________________________________________________________________________

Mathematica [A]  time = 0.0285646, size = 42, normalized size = 1.27 \[ \frac{1}{2} \left (x^2-\sqrt{x-1} \sqrt{x+1} x+2 \sinh ^{-1}\left (\frac{\sqrt{x-1}}{\sqrt{2}}\right )+1\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(-Sqrt[-1 + x] + Sqrt[1 + x])/(Sqrt[-1 + x] + Sqrt[1 + x]),x]

[Out]

(1 + x^2 - Sqrt[-1 + x]*x*Sqrt[1 + x] + 2*ArcSinh[Sqrt[-1 + x]/Sqrt[2]])/2

_______________________________________________________________________________________

Maple [B]  time = 0.008, size = 62, normalized size = 1.9 \[ -{\frac{1}{2}\sqrt{-1+x} \left ( 1+x \right ) ^{{\frac{3}{2}}}}+{\frac{1}{2}\sqrt{-1+x}\sqrt{1+x}}+{\frac{1}{2}\sqrt{ \left ( -1+x \right ) \left ( 1+x \right ) }\ln \left ( x+\sqrt{{x}^{2}-1} \right ){\frac{1}{\sqrt{-1+x}}}{\frac{1}{\sqrt{1+x}}}}+{\frac{{x}^{2}}{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-1/2*(-1+x)^(1/2)*(1+x)^(3/2)+1/2*(-1+x)^(1/2)*(1+x)^(1/2)+1/2*((-1+x)*(1+x))^(1
/2)/(1+x)^(1/2)/(-1+x)^(1/2)*ln(x+(x^2-1)^(1/2))+1/2*x^2

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{\sqrt{x + 1} - \sqrt{x - 1}}{\sqrt{x + 1} + \sqrt{x - 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((sqrt(x + 1) - sqrt(x - 1))/(sqrt(x + 1) + sqrt(x - 1)),x, algorithm="maxima")

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.308273, size = 126, normalized size = 3.82 \[ -\frac{4 \, x^{4} -{\left (4 \, x^{3} - x\right )} \sqrt{x + 1} \sqrt{x - 1} - 3 \, x^{2} +{\left (2 \, \sqrt{x + 1} \sqrt{x - 1} x - 2 \, x^{2} + 1\right )} \log \left (\sqrt{x + 1} \sqrt{x - 1} - x\right )}{2 \,{\left (2 \, \sqrt{x + 1} \sqrt{x - 1} x - 2 \, x^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((sqrt(x + 1) - sqrt(x - 1))/(sqrt(x + 1) + sqrt(x - 1)),x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 48.7695, size = 226, normalized size = 6.85 \[ - \frac{\left (x - 1\right )^{\frac{5}{2}}}{4 \sqrt{x + 1}} - \frac{3 \left (x - 1\right )^{\frac{3}{2}}}{4 \sqrt{x + 1}} - \frac{\sqrt{x - 1}}{2 \sqrt{x + 1}} + \frac{\left (x - 1\right )^{2}}{4} + 2 \left (\begin{cases} \frac{\left (x + 1\right )^{2}}{8} + \frac{\operatorname{acosh}{\left (\frac{\sqrt{2} \sqrt{x + 1}}{2} \right )}}{4} - \frac{\left (x + 1\right )^{\frac{5}{2}}}{8 \sqrt{x - 1}} + \frac{3 \left (x + 1\right )^{\frac{3}{2}}}{8 \sqrt{x - 1}} - \frac{\sqrt{x + 1}}{4 \sqrt{x - 1}} & \text{for}\: \frac{\left |{x + 1}\right |}{2} > 1 \\\frac{\left (x + 1\right )^{2}}{8} - \frac{i \operatorname{asin}{\left (\frac{\sqrt{2} \sqrt{x + 1}}{2} \right )}}{4} + \frac{i \left (x + 1\right )^{\frac{5}{2}}}{8 \sqrt{- x + 1}} - \frac{3 i \left (x + 1\right )^{\frac{3}{2}}}{8 \sqrt{- x + 1}} + \frac{i \sqrt{x + 1}}{4 \sqrt{- x + 1}} & \text{otherwise} \end{cases}\right ) + \frac{\operatorname{asinh}{\left (\frac{\sqrt{2} \sqrt{x - 1}}{2} \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-(x - 1)**(5/2)/(4*sqrt(x + 1)) - 3*(x - 1)**(3/2)/(4*sqrt(x + 1)) - sqrt(x - 1)
/(2*sqrt(x + 1)) + (x - 1)**2/4 + 2*Piecewise(((x + 1)**2/8 + acosh(sqrt(2)*sqrt
(x + 1)/2)/4 - (x + 1)**(5/2)/(8*sqrt(x - 1)) + 3*(x + 1)**(3/2)/(8*sqrt(x - 1))
 - sqrt(x + 1)/(4*sqrt(x - 1)), Abs(x + 1)/2 > 1), ((x + 1)**2/8 - I*asin(sqrt(2
)*sqrt(x + 1)/2)/4 + I*(x + 1)**(5/2)/(8*sqrt(-x + 1)) - 3*I*(x + 1)**(3/2)/(8*s
qrt(-x + 1)) + I*sqrt(x + 1)/(4*sqrt(-x + 1)), True)) + asinh(sqrt(2)*sqrt(x - 1
)/2)/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.311212, size = 57, normalized size = 1.73 \[ \frac{1}{2} \,{\left (x + 1\right )}^{2} - \frac{1}{2} \, \sqrt{x + 1} \sqrt{x - 1} x - x -{\rm ln}\left ({\left | -\sqrt{x + 1} + \sqrt{x - 1} \right |}\right ) - 1 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((sqrt(x + 1) - sqrt(x - 1))/(sqrt(x + 1) + sqrt(x - 1)),x, algorithm="giac")

[Out]

1/2*(x + 1)^2 - 1/2*sqrt(x + 1)*sqrt(x - 1)*x - x - ln(abs(-sqrt(x + 1) + sqrt(x
 - 1))) - 1