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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, 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 = {1972, 242, 47, 63, 207} \[ \sqrt {\frac {1}{x}+1} x+\tanh ^{-1}\left (\sqrt {\frac {1}{x}+1}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 47

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},
x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && LtQ[m, -1] &&  !(IntegerQ[n] &&  !IntegerQ[m]) &&  !(ILeQ[m + n + 2, 0
] && (FractionQ[m] || GeQ[2*n + m + 1, 0])) && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

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 207

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

Rule 242

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 1972

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\\ &=-\operatorname {Subst}\left (\int \frac {\sqrt {1+x}}{x^2} \, dx,x,\frac {1}{x}\right )\\ &=\sqrt {1+\frac {1}{x}} x-\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,\frac {1}{x}\right )\\ &=\sqrt {1+\frac {1}{x}} x-\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\frac {1}{x}}\right )\\ &=\sqrt {1+\frac {1}{x}} x+\tanh ^{-1}\left (\sqrt {1+\frac {1}{x}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 22, normalized size = 1.00 \[ \sqrt {\frac {1}{x}+1} x+\tanh ^{-1}\left (\sqrt {\frac {1}{x}+1}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.89, size = 40, normalized size = 1.82 \[ 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 ) \]

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)

________________________________________________________________________________________

giac [A]  time = 0.39, size = 31, normalized size = 1.41 \[ -\frac {1}{2} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + x} - 1 \right |}\right ) \mathrm {sgn}\relax (x) + \sqrt {x^{2} + x} \mathrm {sgn}\relax (x) \]

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)

________________________________________________________________________________________

maple [B]  time = 0.00, size = 41, normalized size = 1.86 \[ \frac {\sqrt {\frac {x +1}{x}}\, \left (\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )+2 \sqrt {x^{2}+x}\right ) x}{2 \sqrt {\left (x +1\right ) x}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*((x+1)/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]  time = 0.44, size = 50, normalized size = 2.27 \[ \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 ) \]

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)

________________________________________________________________________________________

mupad [B]  time = 3.39, size = 18, normalized size = 0.82 \[ \mathrm {atanh}\left (\sqrt {\frac {1}{x}+1}\right )+x\,\sqrt {\frac {1}{x}+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\frac {x + 1}{x}}\, dx \]

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)

________________________________________________________________________________________