Optimal. Leaf size=31 \[ \frac {4}{3} \log \left (2-\sqrt {x+2}\right )+\frac {2}{3} \log \left (\sqrt {x+2}+1\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 31, 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 {4}{3} \log \left (2-\sqrt {x+2}\right )+\frac {2}{3} \log \left (\sqrt {x+2}+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 632
Rubi steps
\begin {align*} \int \frac {1}{x-\sqrt {2+x}} \, dx &=2 \operatorname {Subst}\left (\int \frac {x}{-2-x+x^2} \, dx,x,\sqrt {2+x}\right )\\ &=\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,\sqrt {2+x}\right )+\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{-2+x} \, dx,x,\sqrt {2+x}\right )\\ &=\frac {4}{3} \log \left (2-\sqrt {2+x}\right )+\frac {2}{3} \log \left (1+\sqrt {2+x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 31, normalized size = 1.00 \[ \frac {4}{3} \log \left (2-\sqrt {x+2}\right )+\frac {2}{3} \log \left (\sqrt {x+2}+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 21, normalized size = 0.68 \[ \frac {2}{3} \, \log \left (\sqrt {x + 2} + 1\right ) + \frac {4}{3} \, \log \left (\sqrt {x + 2} - 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.39, size = 22, normalized size = 0.71 \[ \frac {2}{3} \, \log \left (\sqrt {x + 2} + 1\right ) + \frac {4}{3} \, \log \left ({\left | \sqrt {x + 2} - 2 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 54, normalized size = 1.74 \[ \frac {2 \ln \left (x -2\right )}{3}+\frac {2 \ln \left (-2+\sqrt {x +2}\right )}{3}+\frac {\ln \left (x +1\right )}{3}+\frac {\ln \left (1+\sqrt {x +2}\right )}{3}-\frac {\ln \left (\sqrt {x +2}-1\right )}{3}-\frac {2 \ln \left (\sqrt {x +2}+2\right )}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.59, size = 21, normalized size = 0.68 \[ \frac {2}{3} \, \log \left (\sqrt {x + 2} + 1\right ) + \frac {4}{3} \, \log \left (\sqrt {x + 2} - 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.08, size = 25, normalized size = 0.81 \[ \frac {2\,\ln \left (\frac {2\,\sqrt {x+2}}{3}+\frac {2}{3}\right )}{3}+\frac {4\,\ln \left (\frac {4}{3}-\frac {2\,\sqrt {x+2}}{3}\right )}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.43, size = 36, normalized size = 1.16 \[ \log {\left (x - \sqrt {x + 2} \right )} + \frac {\log {\left (2 \sqrt {x + 2} - 4 \right )}}{3} - \frac {\log {\left (2 \sqrt {x + 2} + 2 \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________