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.0170135, antiderivative size = 24, normalized size of antiderivative = 1., 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 1973
Rule 266
Rule 50
Rule 63
Rule 207
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.0055733, size = 24, normalized size = 1. \[ 2 \tanh ^{-1}\left (\sqrt{\frac{1}{x}+1}\right )-2 \sqrt{\frac{1}{x}+1} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.004, size = 60, normalized size = 2.5 \begin{align*} -{\frac{1}{x}\sqrt{{\frac{1+x}{x}}} \left ( 2\, \left ({x}^{2}+x \right ) ^{3/2}-2\,{x}^{2}\sqrt{{x}^{2}+x}-\ln \left ({\frac{1}{2}}+x+\sqrt{{x}^{2}+x} \right ){x}^{2} \right ){\frac{1}{\sqrt{x \left ( 1+x \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.14745, size = 51, normalized size = 2.12 \begin{align*} -2 \, \sqrt{\frac{x + 1}{x}} + \log \left (\sqrt{\frac{x + 1}{x}} + 1\right ) - \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 = 1.47816, size = 100, normalized size = 4.17 \begin{align*} -2 \, \sqrt{\frac{x + 1}{x}} + \log \left (\sqrt{\frac{x + 1}{x}} + 1\right ) - \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 = 3.05388, size = 32, normalized size = 1.33 \begin{align*} - 2 \sqrt{1 + \frac{1}{x}} - \log{\left (\sqrt{1 + \frac{1}{x}} - 1 \right )} + \log{\left (\sqrt{1 + \frac{1}{x}} + 1 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.32662, size = 51, normalized size = 2.12 \begin{align*} -\log \left ({\left | -2 \, x + 2 \, \sqrt{x^{2} + x} - 1 \right |}\right ) \mathrm{sgn}\left (x\right ) + \frac{2 \, \mathrm{sgn}\left (x\right )}{x - \sqrt{x^{2} + x}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]