Optimal. Leaf size=31 \[ \frac {4}{3} \log \left (2-\sqrt {2+x}\right )+\frac {2}{3} \log \left (1+\sqrt {2+x}\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 = {646, 31}
\begin {gather*} \frac {4}{3} \log \left (2-\sqrt {x+2}\right )+\frac {2}{3} \log \left (\sqrt {x+2}+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 646
Rubi steps
\begin {align*} \int \frac {1}{x-\sqrt {2+x}} \, dx &=2 \text {Subst}\left (\int \frac {x}{-2-x+x^2} \, dx,x,\sqrt {2+x}\right )\\ &=\frac {2}{3} \text {Subst}\left (\int \frac {1}{1+x} \, dx,x,\sqrt {2+x}\right )+\frac {4}{3} \text {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 = 29, normalized size = 0.94 \begin {gather*} \frac {4}{3} \log \left (-2+\sqrt {2+x}\right )+\frac {2}{3} \log \left (1+\sqrt {2+x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(53\) vs.
\(2(23)=46\).
time = 0.08, size = 54, normalized size = 1.74
method | result | size |
derivativedivides | \(\frac {2 \ln \left (1+\sqrt {x +2}\right )}{3}+\frac {4 \ln \left (\sqrt {x +2}-2\right )}{3}\) | \(22\) |
trager | \(\frac {\ln \left (6 \sqrt {x +2}\, x^{2}-x^{3}+16 \sqrt {x +2}\, x -15 x^{2}+8 \sqrt {x +2}-24 x -12\right )}{3}\) | \(44\) |
default | \(\frac {\ln \left (1+x \right )}{3}+\frac {2 \ln \left (x -2\right )}{3}+\frac {\ln \left (1+\sqrt {x +2}\right )}{3}-\frac {2 \ln \left (\sqrt {x +2}+2\right )}{3}+\frac {2 \ln \left (\sqrt {x +2}-2\right )}{3}-\frac {\ln \left (-1+\sqrt {x +2}\right )}{3}\) | \(54\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 21, normalized size = 0.68 \begin {gather*} \frac {2}{3} \, \log \left (\sqrt {x + 2} + 1\right ) + \frac {4}{3} \, \log \left (\sqrt {x + 2} - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 21, normalized size = 0.68 \begin {gather*} \frac {2}{3} \, \log \left (\sqrt {x + 2} + 1\right ) + \frac {4}{3} \, \log \left (\sqrt {x + 2} - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.07, size = 36, normalized size = 1.16 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.56, size = 22, normalized size = 0.71 \begin {gather*} \frac {2}{3} \, \log \left (\sqrt {x + 2} + 1\right ) + \frac {4}{3} \, \log \left ({\left | \sqrt {x + 2} - 2 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.08, size = 25, normalized size = 0.81 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________