Optimal. Leaf size=50 \[ -\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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0487017, antiderivative size = 50, normalized size of antiderivative = 1., 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 = {2548, 44, 207} \[ -\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 ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2548
Rule 44
Rule 207
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 )-\operatorname{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 )-\operatorname{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} \operatorname{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.0362554, size = 53, normalized size = 1.06 \[ \frac{1}{2} \left (\sqrt{\frac{1}{x}+1}+1\right ) x+x \log \left (\sqrt{\frac{1}{x}+1}-1\right )-\frac{1}{4} \log \left (\left (2 \sqrt{\frac{1}{x}+1}+2\right ) x+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 180., size = 0, normalized size = 0. \begin{align*} \int \ln \left ( -1+\sqrt{{\frac{1+x}{x}}} \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.993873, size = 92, normalized size = 1.84 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.08568, size = 139, normalized size = 2.78 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 154.442, size = 53, normalized size = 1.06 \begin{align*} 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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \mathit{undef} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]