3.10.83 \(\int \frac {\sqrt {1+\frac {1}{x}}}{1-x^2} \, dx\) [983]

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

[Out]

arctanh(1/2*(1+1/x)^(1/2)*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {1460, 1483, 641, 65, 213} \begin {gather*} \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {\frac {1}{x}+1}}{\sqrt {2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 213

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

Rule 641

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c/e)*x)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 1460

Int[((a_.) + (c_.)*(x_)^(mn2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_.))^(q_.), x_Symbol] :> Int[((d + e*x^n)^q*(c + a
*x^(2*n))^p)/x^(2*n*p), x] /; FreeQ[{a, c, d, e, n, q}, x] && EqQ[mn2, -2*n] && IntegerQ[p]

Rule 1483

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[I
nt[(d + e*x)^q*(a + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, c, d, e, m, n, p, q}, x] && EqQ[n2, 2*n] && EqQ[Sim
plify[m - n + 1], 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 24, normalized size = 1.09 \begin {gather*} \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {\frac {1+x}{x}}}{\sqrt {2}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

Sqrt[2]*ArcTanh[Sqrt[(1 + x)/x]/Sqrt[2]]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(40\) vs. \(2(17)=34\).
time = 0.23, size = 41, normalized size = 1.86

method result size
default \(\frac {\sqrt {\frac {1+x}{x}}\, x \sqrt {2}\, \arctanh \left (\frac {\left (1+3 x \right ) \sqrt {2}}{4 \sqrt {x^{2}+x}}\right )}{2 \sqrt {x \left (1+x \right )}}\) \(41\)
trager \(-\frac {\RootOf \left (\textit {\_Z}^{2}-2\right ) \ln \left (\frac {4 \sqrt {-\frac {-1-x}{x}}\, x -3 \RootOf \left (\textit {\_Z}^{2}-2\right ) x -\RootOf \left (\textit {\_Z}^{2}-2\right )}{-1+x}\right )}{2}\) \(49\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+1/x)^(1/2)/(-x^2+1),x,method=_RETURNVERBOSE)

[Out]

1/2*((1+x)/x)^(1/2)*x/(x*(1+x))^(1/2)*2^(1/2)*arctanh(1/4*(1+3*x)*2^(1/2)/(x^2+x)^(1/2))

________________________________________________________________________________________

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+1/x)^(1/2)/(-x^2+1),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 33, normalized size = 1.50 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} x \sqrt {\frac {x + 1}{x}} + 3 \, x + 1}{x - 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {\sqrt {1 + \frac {1}{x}}}{x^{2} - 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (17) = 34\).
time = 4.63, size = 73, normalized size = 3.32 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (\frac {\sqrt {2} - 1}{\sqrt {2} + 1}\right ) \mathrm {sgn}\left (x\right ) - \frac {1}{2} \, \sqrt {2} \log \left (\frac {{\left | -2 \, x - 2 \, \sqrt {2} + 2 \, \sqrt {x^{2} + x} + 2 \right |}}{{\left | -2 \, x + 2 \, \sqrt {2} + 2 \, \sqrt {x^{2} + x} + 2 \right |}}\right ) \mathrm {sgn}\left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.58, size = 17, normalized size = 0.77 \begin {gather*} \sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {\frac {1}{x}+1}}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2^(1/2)*atanh((2^(1/2)*(1/x + 1)^(1/2))/2)

________________________________________________________________________________________