Optimal. Leaf size=22 \[ \sqrt {1+\frac {1}{x}} x+\tanh ^{-1}\left (\sqrt {1+\frac {1}{x}}\right ) \]
[Out]
________________________________________________________________________________________
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 = {1997, 248, 43,
65, 213} \begin {gather*} \sqrt {\frac {1}{x}+1} x+\tanh ^{-1}\left (\sqrt {\frac {1}{x}+1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 65
Rule 213
Rule 248
Rule 1997
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 {1+\frac {1}{x}} x-\frac {1}{2} \text {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,\frac {1}{x}\right )\\ &=\sqrt {1+\frac {1}{x}} x-\text {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.02, size = 22, normalized size = 1.00 \begin {gather*} \sqrt {1+\frac {1}{x}} x+\tanh ^{-1}\left (\sqrt {1+\frac {1}{x}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(40\) vs.
\(2(18)=36\).
time = 0.06, size = 41, normalized size = 1.86
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 )}}\) | \(41\) |
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 x +2}\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 50 vs.
\(2 (18) = 36\).
time = 0.28, size = 50, normalized size = 2.27 \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]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 40 vs.
\(2 (18) = 36\).
time = 0.33, size = 40, normalized size = 1.82 \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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.31, size = 31, normalized size = 1.41 \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]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.39, size = 18, normalized size = 0.82 \begin {gather*} \mathrm {atanh}\left (\sqrt {\frac {1}{x}+1}\right )+x\,\sqrt {\frac {1}{x}+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________