Optimal. Leaf size=50 \[ -\frac {1}{2 \left (1-\sqrt {1+\frac {1}{x}}\right )}-\frac {1}{2} \tanh ^{-1}\left (\sqrt {1+\frac {1}{x}}\right )+x \log \left (-1+\sqrt {\frac {1+x}{x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {2628, 46, 213}
\begin {gather*} -\frac {1}{2 \left (1-\sqrt {\frac {1}{x}+1}\right )}+x \log \left (\sqrt {\frac {x+1}{x}}-1\right )-\frac {1}{2} \tanh ^{-1}\left (\sqrt {\frac {1}{x}+1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 213
Rule 2628
Rubi steps
\begin {align*} \int \log \left (-1+\sqrt {\frac {1+x}{x}}\right ) \, dx &=x \log \left (-1+\sqrt {\frac {1+x}{x}}\right )-\int \frac {1}{-2+\left (-2+2 \sqrt {1+\frac {1}{x}}\right ) x} \, dx\\ &=x \log \left (-1+\sqrt {\frac {1+x}{x}}\right )-\text {Subst}\left (\int \frac {1}{(-1+x)^2 (1+x)} \, dx,x,\sqrt {1+\frac {1}{x}}\right )\\ &=x \log \left (-1+\sqrt {\frac {1+x}{x}}\right )-\text {Subst}\left (\int \left (\frac {1}{2 (-1+x)^2}-\frac {1}{2 \left (-1+x^2\right )}\right ) \, dx,x,\sqrt {1+\frac {1}{x}}\right )\\ &=-\frac {1}{2 \left (1-\sqrt {1+\frac {1}{x}}\right )}+x \log \left (-1+\sqrt {\frac {1+x}{x}}\right )+\frac {1}{2} \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\frac {1}{x}}\right )\\ &=-\frac {1}{2 \left (1-\sqrt {1+\frac {1}{x}}\right )}-\frac {1}{2} \tanh ^{-1}\left (\sqrt {1+\frac {1}{x}}\right )+x \log \left (-1+\sqrt {\frac {1+x}{x}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 53, normalized size = 1.06 \begin {gather*} \frac {1}{2} \left (1+\sqrt {1+\frac {1}{x}}\right ) x+x \log \left (-1+\sqrt {1+\frac {1}{x}}\right )-\frac {1}{4} \log \left (1+\left (2+2 \sqrt {1+\frac {1}{x}}\right ) x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 180.00, size = 0, normalized size = 0.00 \[\int \ln \left (-1+\sqrt {\frac {1+x}{x}}\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 68, normalized size = 1.36 \begin {gather*} \frac {\log \left (\sqrt {\frac {x + 1}{x}} - 1\right )}{\frac {x + 1}{x} - 1} + \frac {1}{2 \, {\left (\sqrt {\frac {x + 1}{x}} - 1\right )}} - \frac {1}{4} \, \log \left (\sqrt {\frac {x + 1}{x}} + 1\right ) + \frac {1}{4} \, \log \left (\sqrt {\frac {x + 1}{x}} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 49, normalized size = 0.98 \begin {gather*} \frac {1}{4} \, {\left (4 \, x + 1\right )} \log \left (\sqrt {\frac {x + 1}{x}} - 1\right ) + \frac {1}{2} \, x \sqrt {\frac {x + 1}{x}} + \frac {1}{2} \, x - \frac {1}{4} \, \log \left (\sqrt {\frac {x + 1}{x}} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 68.15, size = 53, normalized size = 1.06 \begin {gather*} x \log {\left (\sqrt {\frac {x + 1}{x}} - 1 \right )} + \frac {\log {\left (\sqrt {1 + \frac {1}{x}} - 1 \right )}}{4} - \frac {\log {\left (\sqrt {1 + \frac {1}{x}} + 1 \right )}}{4} + \frac {1}{2 \left (\sqrt {1 + \frac {1}{x}} - 1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.96, size = 53, normalized size = 1.06 \begin {gather*} x \log \left (\sqrt {\frac {x + 1}{x}} - 1\right ) + \frac {1}{2} \, x + \frac {\log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + x} - 1 \right |}\right )}{4 \, \mathrm {sgn}\left (x\right )} + \frac {\sqrt {x^{2} + x}}{2 \, \mathrm {sgn}\left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.43, size = 38, normalized size = 0.76 \begin {gather*} \frac {x}{2}-\frac {\mathrm {atanh}\left (\sqrt {\frac {1}{x}+1}\right )}{2}+x\,\ln \left (\sqrt {\frac {x+1}{x}}-1\right )+\frac {x\,\sqrt {\frac {1}{x}+1}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________