3.877 \(\int \frac {1}{x-\sqrt {1+x^2}} \, dx\)

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

[Out]

-1/2*x^2-1/2*arcsinh(x)-1/2*x*(x^2+1)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2106, 30, 195, 215} \[ -\frac {x^2}{2}-\frac {1}{2} \sqrt {x^2+1} x-\frac {1}{2} \sinh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[(x - Sqrt[1 + x^2])^(-1),x]

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 215

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[(Rt[b, 2]*x)/Sqrt[a]]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 2106

Int[(u_.)/((d_.)*(x_)^(n_.) + (c_.)*Sqrt[(a_.) + (b_.)*(x_)^(p_.)]), x_Symbol] :> -Dist[b/(a*d), Int[u*x^n, x]
, x] + Dist[1/(a*c), Int[u*Sqrt[a + b*x^(2*n)], x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[p, 2*n] && EqQ[b*c^
2 - d^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{x-\sqrt {1+x^2}} \, dx &=-\int x \, dx-\int \sqrt {1+x^2} \, dx\\ &=-\frac {x^2}{2}-\frac {1}{2} x \sqrt {1+x^2}-\frac {1}{2} \int \frac {1}{\sqrt {1+x^2}} \, dx\\ &=-\frac {x^2}{2}-\frac {1}{2} x \sqrt {1+x^2}-\frac {1}{2} \sinh ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 38, normalized size = 1.36 \[ \frac {1}{2} \log \left (x-\sqrt {x^2+1}\right )-\frac {1}{4 \left (x-\sqrt {x^2+1}\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x - Sqrt[1 + x^2])^(-1),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 30, normalized size = 1.07 \[ -\frac {1}{2} \, x^{2} - \frac {1}{2} \, \sqrt {x^{2} + 1} x + \frac {1}{2} \, \log \left (-x + \sqrt {x^{2} + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.34, size = 30, normalized size = 1.07 \[ -\frac {1}{2} \, x^{2} - \frac {1}{2} \, \sqrt {x^{2} + 1} x + \frac {1}{2} \, \log \left (-x + \sqrt {x^{2} + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 21, normalized size = 0.75 \[ -\frac {x^{2}}{2}-\frac {\sqrt {x^{2}+1}\, x}{2}-\frac {\arcsinh \relax (x )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*x^2-1/2*arcsinh(x)-1/2*(x^2+1)^(1/2)*x

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{x - \sqrt {x^{2} + 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 20, normalized size = 0.71 \[ -\frac {\mathrm {asinh}\relax (x)}{2}-\frac {x\,\sqrt {x^2+1}}{2}-\frac {x^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

- asinh(x)/2 - (x*(x^2 + 1)^(1/2))/2 - x^2/2

________________________________________________________________________________________

sympy [B]  time = 0.35, size = 58, normalized size = 2.07 \[ - \frac {x \operatorname {asinh}{\relax (x )}}{2 x - 2 \sqrt {x^{2} + 1}} + \frac {x}{2 x - 2 \sqrt {x^{2} + 1}} + \frac {\sqrt {x^{2} + 1} \operatorname {asinh}{\relax (x )}}{2 x - 2 \sqrt {x^{2} + 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*asinh(x)/(2*x - 2*sqrt(x**2 + 1)) + x/(2*x - 2*sqrt(x**2 + 1)) + sqrt(x**2 + 1)*asinh(x)/(2*x - 2*sqrt(x**2
 + 1))

________________________________________________________________________________________