Optimal. Leaf size=50 \[ -\frac{1}{2 \left (\sqrt{\frac{1}{x}+1}+1\right )}+x \log \left (\sqrt{\frac{x+1}{x}}+1\right )+\frac{1}{2} \tanh ^{-1}\left (\sqrt{\frac{x+1}{x}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.056997, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {2548, 12, 44, 207} \[ -\frac{1}{2 \left (\sqrt{\frac{1}{x}+1}+1\right )}+x \log \left (\sqrt{\frac{x+1}{x}}+1\right )+\frac{1}{2} \tanh ^{-1}\left (\sqrt{\frac{x+1}{x}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2548
Rule 12
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 (-1-x-x \sqrt{\frac{1+x}{x}}\right )} \, dx\\ &=x \log \left (1+\sqrt{\frac{1+x}{x}}\right )-\frac{1}{2} \int \frac{1}{-1-x-x \sqrt{\frac{1+x}{x}}} \, dx\\ &=x \log \left (1+\sqrt{\frac{1+x}{x}}\right )-\operatorname{Subst}\left (\int \frac{1}{(-1+x) (1+x)^2} \, dx,x,\sqrt{\frac{1+x}{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{\frac{1+x}{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{\frac{1+x}{x}}\right )\\ &=-\frac{1}{2 \left (1+\sqrt{1+\frac{1}{x}}\right )}+\frac{1}{2} \tanh ^{-1}\left (\sqrt{\frac{1+x}{x}}\right )+x \log \left (1+\sqrt{\frac{1+x}{x}}\right )\\ \end{align*}
Mathematica [A] time = 0.0373296, size = 53, normalized size = 1.06 \[ \frac{1}{4} \left (-2 \sqrt{\frac{1}{x}+1} x+2 x+4 x \log \left (\sqrt{\frac{1}{x}+1}+1\right )+\log \left (\left (2 \sqrt{\frac{1}{x}+1}+2\right ) x+1\right )\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 = 1.03464, 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.18177, 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 = 160.093, 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]