Optimal. Leaf size=61 \[ \frac {1}{5} \left (5-\sqrt {5}\right ) \log \left (-2 \sqrt {x+1}-\sqrt {5}+1\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \log \left (-2 \sqrt {x+1}+\sqrt {5}+1\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {632, 31} \[ \frac {1}{5} \left (5-\sqrt {5}\right ) \log \left (-2 \sqrt {x+1}-\sqrt {5}+1\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \log \left (-2 \sqrt {x+1}+\sqrt {5}+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 632
Rubi steps
\begin {align*} \int \frac {1}{x-\sqrt {1+x}} \, dx &=2 \operatorname {Subst}\left (\int \frac {x}{-1-x+x^2} \, dx,x,\sqrt {1+x}\right )\\ &=\frac {1}{5} \left (5-\sqrt {5}\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}+\frac {\sqrt {5}}{2}+x} \, dx,x,\sqrt {1+x}\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{2}-\frac {\sqrt {5}}{2}+x} \, dx,x,\sqrt {1+x}\right )\\ &=\frac {1}{5} \left (5-\sqrt {5}\right ) \log \left (1-\sqrt {5}-2 \sqrt {1+x}\right )+\frac {1}{5} \left (5+\sqrt {5}\right ) \log \left (1+\sqrt {5}-2 \sqrt {1+x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 58, normalized size = 0.95 \[ \frac {1}{5} \left (\left (5+\sqrt {5}\right ) \log \left (-2 \sqrt {x+1}+\sqrt {5}+1\right )-\left (\sqrt {5}-5\right ) \log \left (-2 \sqrt {x+1}-\sqrt {5}+1\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 64, normalized size = 1.05 \[ \frac {1}{5} \, \sqrt {5} \log \left (\frac {2 \, x^{2} - \sqrt {5} {\left (x + 2\right )} - {\left (\sqrt {5} {\left (2 \, x - 1\right )} - 5\right )} \sqrt {x + 1} + 3 \, x - 2}{x^{2} - x - 1}\right ) + \log \left (x - \sqrt {x + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.36, size = 49, normalized size = 0.80 \[ \frac {1}{5} \, \sqrt {5} \log \left (\frac {{\left | -\sqrt {5} + 2 \, \sqrt {x + 1} - 1 \right |}}{{\left | \sqrt {5} + 2 \, \sqrt {x + 1} - 1 \right |}}\right ) + \log \left ({\left | x - \sqrt {x + 1} \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 91, normalized size = 1.49 \[ -\frac {\sqrt {5}\, \arctanh \left (\frac {\left (2 x -1\right ) \sqrt {5}}{5}\right )}{5}-\frac {\sqrt {5}\, \arctanh \left (\frac {\left (1+2 \sqrt {x +1}\right ) \sqrt {5}}{5}\right )}{5}-\frac {\sqrt {5}\, \arctanh \left (\frac {\left (2 \sqrt {x +1}-1\right ) \sqrt {5}}{5}\right )}{5}+\frac {\ln \left (x -\sqrt {x +1}\right )}{2}-\frac {\ln \left (x +\sqrt {x +1}\right )}{2}+\frac {\ln \left (x^{2}-x -1\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.51, size = 45, normalized size = 0.74 \[ \frac {1}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - 2 \, \sqrt {x + 1} + 1}{\sqrt {5} + 2 \, \sqrt {x + 1} - 1}\right ) + \log \left (x - \sqrt {x + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.12, size = 71, normalized size = 1.16 \[ \ln \left (2\,\sqrt {x+1}-\left (\frac {\sqrt {5}}{5}+1\right )\,\left (2\,\sqrt {x+1}-1\right )\right )\,\left (\frac {\sqrt {5}}{5}+1\right )-\ln \left (2\,\sqrt {x+1}+\left (\frac {\sqrt {5}}{5}-1\right )\,\left (2\,\sqrt {x+1}-1\right )\right )\,\left (\frac {\sqrt {5}}{5}-1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.21, size = 92, normalized size = 1.51 \[ 4 \left (\begin {cases} - \frac {\sqrt {5} \operatorname {acoth}{\left (\frac {2 \sqrt {5} \left (\sqrt {x + 1} - \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {x + 1} - \frac {1}{2}\right )^{2} > \frac {5}{4} \\- \frac {\sqrt {5} \operatorname {atanh}{\left (\frac {2 \sqrt {5} \left (\sqrt {x + 1} - \frac {1}{2}\right )}{5} \right )}}{10} & \text {for}\: \left (\sqrt {x + 1} - \frac {1}{2}\right )^{2} < \frac {5}{4} \end {cases}\right ) + \log {\left (x - \sqrt {x + 1} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________