Optimal. Leaf size=44 \[ -\frac {1}{18 (-2+x)^2}+\frac {2}{27 (-2+x)}+\frac {1}{27 (1+x)}+\frac {1}{27} \log (-2+x)-\frac {1}{27} \log (1+x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 50, normalized size of antiderivative = 1.14, number of steps
used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {46}
\begin {gather*} -\frac {2}{27 (2-x)}+\frac {1}{27 (x+1)}-\frac {1}{18 (2-x)^2}+\frac {1}{27} \log (2-x)-\frac {1}{27} \log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rubi steps
\begin {align*} \int \frac {1}{(-2+x)^3 (1+x)^2} \, dx &=\int \left (\frac {1}{9 (-2+x)^3}-\frac {2}{27 (-2+x)^2}+\frac {1}{27 (-2+x)}-\frac {1}{27 (1+x)^2}-\frac {1}{27 (1+x)}\right ) \, dx\\ &=-\frac {1}{18 (2-x)^2}-\frac {2}{27 (2-x)}+\frac {1}{27 (1+x)}+\frac {1}{27} \log (2-x)-\frac {1}{27} \log (1+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 39, normalized size = 0.89 \begin {gather*} \frac {1}{54} \left (\frac {3 \left (-1-5 x+2 x^2\right )}{(-2+x)^2 (1+x)}+2 \log (-2+x)-2 \log (1+x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 35, normalized size = 0.80
method | result | size |
default | \(-\frac {1}{18 \left (-2+x \right )^{2}}+\frac {2}{27 \left (-2+x \right )}+\frac {1}{27+27 x}+\frac {\ln \left (-2+x \right )}{27}-\frac {\ln \left (1+x \right )}{27}\) | \(35\) |
norman | \(\frac {\frac {1}{9} x^{2}-\frac {5}{18} x -\frac {1}{18}}{\left (-2+x \right )^{2} \left (1+x \right )}+\frac {\ln \left (-2+x \right )}{27}-\frac {\ln \left (1+x \right )}{27}\) | \(35\) |
risch | \(\frac {\frac {1}{9} x^{2}-\frac {5}{18} x -\frac {1}{18}}{\left (-2+x \right )^{2} \left (1+x \right )}+\frac {\ln \left (-2+x \right )}{27}-\frac {\ln \left (1+x \right )}{27}\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.46, size = 37, normalized size = 0.84 \begin {gather*} \frac {2 \, x^{2} - 5 \, x - 1}{18 \, {\left (x^{3} - 3 \, x^{2} + 4\right )}} - \frac {1}{27} \, \log \left (x + 1\right ) + \frac {1}{27} \, \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 56, normalized size = 1.27 \begin {gather*} \frac {6 \, x^{2} - 2 \, {\left (x^{3} - 3 \, x^{2} + 4\right )} \log \left (x + 1\right ) + 2 \, {\left (x^{3} - 3 \, x^{2} + 4\right )} \log \left (x - 2\right ) - 15 \, x - 3}{54 \, {\left (x^{3} - 3 \, x^{2} + 4\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.05, size = 34, normalized size = 0.77 \begin {gather*} \frac {2 x^{2} - 5 x - 1}{18 x^{3} - 54 x^{2} + 72} + \frac {\log {\left (x - 2 \right )}}{27} - \frac {\log {\left (x + 1 \right )}}{27} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.99, size = 43, normalized size = 0.98 \begin {gather*} \frac {1}{27 \, {\left (x + 1\right )}} - \frac {\frac {18}{x + 1} - 5}{162 \, {\left (\frac {3}{x + 1} - 1\right )}^{2}} + \frac {1}{27} \, \log \left ({\left | -\frac {3}{x + 1} + 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.05, size = 33, normalized size = 0.75 \begin {gather*} -\frac {2\,\mathrm {atanh}\left (\frac {2\,x}{3}-\frac {1}{3}\right )}{27}-\frac {-\frac {x^2}{9}+\frac {5\,x}{18}+\frac {1}{18}}{x^3-3\,x^2+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________