3.10.76 \(\int \sqrt {\frac {-1+x}{x}} \, dx\) [976]

Optimal. Leaf size=24 \[ \sqrt {-1+x} \sqrt {x}-\sinh ^{-1}\left (\sqrt {-1+x}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.17, number of steps used = 5, number of rules used = 5, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.454, Rules used = {1997, 248, 43, 65, 212} \begin {gather*} \sqrt {\frac {x-1}{x}} x-\tanh ^{-1}\left (\sqrt {\frac {x-1}{x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + 1))), x] - Dist[d*(n/(b*(m + 1))), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d, n
}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, -1] &&  !IntegerQ[n] && GtQ[n, 0]

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 212

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

Rule 248

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p/x^2, x], x, 1/x] /; FreeQ[{a, b, p},
x] && ILtQ[n, 0]

Rule 1997

Int[(u_)^(p_), x_Symbol] :> Int[ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && BinomialQ[u, x] &&  !BinomialMatchQ[
u, x]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(44\) vs. \(2(18)=36\).
time = 0.06, size = 45, normalized size = 1.88

method result size
trager \(\sqrt {-\frac {1-x}{x}}\, x -\frac {\ln \left (2 \sqrt {-\frac {1-x}{x}}\, x +2 x -1\right )}{2}\) \(39\)
default \(-\frac {\sqrt {\frac {-1+x}{x}}\, x \left (-2 \sqrt {x^{2}-x}+\ln \left (x -\frac {1}{2}+\sqrt {x^{2}-x}\right )\right )}{2 \sqrt {x \left (-1+x \right )}}\) \(45\)
risch \(x \sqrt {\frac {-1+x}{x}}-\frac {\ln \left (x -\frac {1}{2}+\sqrt {x^{2}-x}\right ) \sqrt {\frac {-1+x}{x}}\, \sqrt {x \left (-1+x \right )}}{2 \left (-1+x \right )}\) \(49\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (18) = 36\).
time = 0.28, size = 51, normalized size = 2.12 \begin {gather*} -\frac {\sqrt {\frac {x - 1}{x}}}{\frac {x - 1}{x} - 1} - \frac {1}{2} \, \log \left (\sqrt {\frac {x - 1}{x}} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {\frac {x - 1}{x}} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (18) = 36\).
time = 0.38, size = 40, normalized size = 1.67 \begin {gather*} x \sqrt {\frac {x - 1}{x}} - \frac {1}{2} \, \log \left (\sqrt {\frac {x - 1}{x}} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {\frac {x - 1}{x}} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt((x - 1)/x), x)

________________________________________________________________________________________

Giac [A]
time = 5.63, size = 35, normalized size = 1.46 \begin {gather*} \frac {1}{2} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} - x} + 1 \right |}\right ) \mathrm {sgn}\left (x\right ) + \sqrt {x^{2} - x} \mathrm {sgn}\left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 24, normalized size = 1.00 \begin {gather*} x\,\sqrt {1-\frac {1}{x}}-\mathrm {atanh}\left (\sqrt {1-\frac {1}{x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________