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

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

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0420477, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333 \[ 2 \tanh ^{-1}\left (\sqrt{\frac{1}{x}+1}\right )-2 \sqrt{\frac{1}{x}+1} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 2.63613, size = 20, normalized size = 0.83 \[ - 2 \sqrt{1 + \frac{1}{x}} + 2 \operatorname{atanh}{\left (\sqrt{1 + \frac{1}{x}} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.011041, size = 30, normalized size = 1.25 \[ \log \left (\left (2 \sqrt{\frac{1}{x}+1}+2\right ) x+1\right )-2 \sqrt{\frac{1}{x}+1} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.708732, size = 51, normalized size = 2.12 \[ -2 \, \sqrt{\frac{x + 1}{x}} + \log \left (\sqrt{\frac{x + 1}{x}} + 1\right ) - \log \left (\sqrt{\frac{x + 1}{x}} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.276383, size = 51, normalized size = 2.12 \[ -2 \, \sqrt{\frac{x + 1}{x}} + \log \left (\sqrt{\frac{x + 1}{x}} + 1\right ) - \log \left (\sqrt{\frac{x + 1}{x}} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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