Optimal. Leaf size=37 \[ -\frac {1}{3} \log (1-x)+\frac {1}{3} \log (2-x)+\frac {2}{3} \log (1+x)-\frac {2}{3} \log (2+x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 61, normalized size of antiderivative = 1.65, number of steps
used = 12, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {1687, 1175,
630, 31, 1121} \begin {gather*} \frac {1}{6} \log \left (1-x^2\right )-\frac {1}{6} \log \left (4-x^2\right )-\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\frac {1}{2} \log (x+1)-\frac {1}{2} \log (x+2) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 630
Rule 1121
Rule 1175
Rule 1687
Rubi steps
\begin {align*} \int \frac {2-x+x^2}{4-5 x^2+x^4} \, dx &=-\int \frac {x}{4-5 x^2+x^4} \, dx+\int \frac {2+x^2}{4-5 x^2+x^4} \, dx\\ &=\frac {1}{2} \int \frac {1}{2-3 x+x^2} \, dx+\frac {1}{2} \int \frac {1}{2+3 x+x^2} \, dx-\frac {1}{2} \text {Subst}\left (\int \frac {1}{4-5 x+x^2} \, dx,x,x^2\right )\\ &=-\left (\frac {1}{6} \text {Subst}\left (\int \frac {1}{-4+x} \, dx,x,x^2\right )\right )+\frac {1}{6} \text {Subst}\left (\int \frac {1}{-1+x} \, dx,x,x^2\right )+\frac {1}{2} \int \frac {1}{-2+x} \, dx-\frac {1}{2} \int \frac {1}{-1+x} \, dx+\frac {1}{2} \int \frac {1}{1+x} \, dx-\frac {1}{2} \int \frac {1}{2+x} \, dx\\ &=-\frac {1}{2} \log (1-x)+\frac {1}{2} \log (2-x)+\frac {1}{2} \log (1+x)-\frac {1}{2} \log (2+x)+\frac {1}{6} \log \left (1-x^2\right )-\frac {1}{6} \log \left (4-x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 37, normalized size = 1.00 \begin {gather*} -\frac {1}{3} \log (1-x)+\frac {1}{3} \log (2-x)+\frac {2}{3} \log (1+x)-\frac {2}{3} \log (2+x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 26, normalized size = 0.70
method | result | size |
default | \(\frac {\ln \left (-2+x \right )}{3}-\frac {\ln \left (-1+x \right )}{3}-\frac {2 \ln \left (2+x \right )}{3}+\frac {2 \ln \left (1+x \right )}{3}\) | \(26\) |
norman | \(\frac {\ln \left (-2+x \right )}{3}-\frac {\ln \left (-1+x \right )}{3}-\frac {2 \ln \left (2+x \right )}{3}+\frac {2 \ln \left (1+x \right )}{3}\) | \(26\) |
risch | \(\frac {\ln \left (-2+x \right )}{3}-\frac {\ln \left (-1+x \right )}{3}-\frac {2 \ln \left (2+x \right )}{3}+\frac {2 \ln \left (1+x \right )}{3}\) | \(26\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.45, size = 25, normalized size = 0.68 \begin {gather*} -\frac {2}{3} \, \log \left (x + 2\right ) + \frac {2}{3} \, \log \left (x + 1\right ) - \frac {1}{3} \, \log \left (x - 1\right ) + \frac {1}{3} \, \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.79, size = 25, normalized size = 0.68 \begin {gather*} -\frac {2}{3} \, \log \left (x + 2\right ) + \frac {2}{3} \, \log \left (x + 1\right ) - \frac {1}{3} \, \log \left (x - 1\right ) + \frac {1}{3} \, \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 29, normalized size = 0.78 \begin {gather*} \frac {\log {\left (x - 2 \right )}}{3} - \frac {\log {\left (x - 1 \right )}}{3} + \frac {2 \log {\left (x + 1 \right )}}{3} - \frac {2 \log {\left (x + 2 \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.60, size = 29, normalized size = 0.78 \begin {gather*} -\frac {2}{3} \, \log \left ({\left | x + 2 \right |}\right ) + \frac {2}{3} \, \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{3} \, \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{3} \, \log \left ({\left | x - 2 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 29, normalized size = 0.78 \begin {gather*} \frac {2\,\mathrm {atanh}\left (\frac {64}{3\,\left (24\,x-16\right )}-\frac {5}{3}\right )}{3}+\frac {4\,\mathrm {atanh}\left (\frac {128}{3\,\left (48\,x+32\right )}+\frac {5}{3}\right )}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________