Optimal. Leaf size=24 \[ 2 \tanh ^{-1}\left (\sqrt {\frac {1}{x}+1}\right )-2 \sqrt {\frac {1}{x}+1} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {1973, 266, 50, 63, 207} \[ 2 \tanh ^{-1}\left (\sqrt {\frac {1}{x}+1}\right )-2 \sqrt {\frac {1}{x}+1} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 50
Rule 63
Rule 207
Rule 266
Rule 1973
Rubi steps
\begin {align*} \int \frac {\sqrt {\frac {1+x}{x}}}{x} \, dx &=\int \frac {\sqrt {1+\frac {1}{x}}}{x} \, dx\\ &=-\operatorname {Subst}\left (\int \frac {\sqrt {1+x}}{x} \, dx,x,\frac {1}{x}\right )\\ &=-2 \sqrt {1+\frac {1}{x}}-\operatorname {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,\frac {1}{x}\right )\\ &=-2 \sqrt {1+\frac {1}{x}}-2 \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\frac {1}{x}}\right )\\ &=-2 \sqrt {1+\frac {1}{x}}+2 \tanh ^{-1}\left (\sqrt {1+\frac {1}{x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 24, normalized size = 1.00 \[ 2 \tanh ^{-1}\left (\sqrt {\frac {1}{x}+1}\right )-2 \sqrt {\frac {1}{x}+1} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 38, normalized size = 1.58 \[ -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]
[Out]
________________________________________________________________________________________
giac [A] time = 0.38, size = 38, normalized size = 1.58 \[ -\log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + x} - 1 \right |}\right ) \mathrm {sgn}\relax (x) + \frac {2 \, \mathrm {sgn}\relax (x)}{x - \sqrt {x^{2} + x}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.01, size = 60, normalized size = 2.50 \[ -\frac {\sqrt {\frac {x +1}{x}}\, \left (-x^{2} \ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )-2 \sqrt {x^{2}+x}\, x^{2}+2 \left (x^{2}+x \right )^{\frac {3}{2}}\right )}{\sqrt {\left (x +1\right ) x}\, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 38, normalized size = 1.58 \[ -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]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.04, size = 20, normalized size = 0.83 \[ 2\,\mathrm {atanh}\left (\sqrt {\frac {1}{x}+1}\right )-2\,\sqrt {\frac {1}{x}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.23, size = 32, normalized size = 1.33 \[ - 2 \sqrt {1 + \frac {1}{x}} - \log {\left (\sqrt {1 + \frac {1}{x}} - 1 \right )} + \log {\left (\sqrt {1 + \frac {1}{x}} + 1 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________