Optimal. Leaf size=33 \[ -\frac {3}{x^2+1}+\frac {1}{x^2+x+2}+\log \left (x^2+1\right )-\log \left (x^2+x+2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {6742, 261, 260, 629, 628} \[ -\frac {3}{x^2+1}+\frac {1}{x^2+x+2}+\log \left (x^2+1\right )-\log \left (x^2+x+2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 260
Rule 261
Rule 628
Rule 629
Rule 6742
Rubi steps
\begin {align*} \int \frac {-3+25 x+23 x^2+32 x^3+15 x^4+7 x^5+x^6}{\left (1+x^2\right )^2 \left (2+x+x^2\right )^2} \, dx &=\int \left (\frac {6 x}{\left (1+x^2\right )^2}+\frac {2 x}{1+x^2}+\frac {-1-2 x}{\left (2+x+x^2\right )^2}+\frac {-1-2 x}{2+x+x^2}\right ) \, dx\\ &=2 \int \frac {x}{1+x^2} \, dx+6 \int \frac {x}{\left (1+x^2\right )^2} \, dx+\int \frac {-1-2 x}{\left (2+x+x^2\right )^2} \, dx+\int \frac {-1-2 x}{2+x+x^2} \, dx\\ &=-\frac {3}{1+x^2}+\frac {1}{2+x+x^2}+\log \left (1+x^2\right )-\log \left (2+x+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 33, normalized size = 1.00 \[ -\frac {3}{x^2+1}+\frac {1}{x^2+x+2}+\log \left (x^2+1\right )-\log \left (x^2+x+2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.85, size = 72, normalized size = 2.18 \[ -\frac {2 \, x^{2} + {\left (x^{4} + x^{3} + 3 \, x^{2} + x + 2\right )} \log \left (x^{2} + x + 2\right ) - {\left (x^{4} + x^{3} + 3 \, x^{2} + x + 2\right )} \log \left (x^{2} + 1\right ) + 3 \, x + 5}{x^{4} + x^{3} + 3 \, x^{2} + x + 2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.30, size = 44, normalized size = 1.33 \[ -\frac {2 \, x^{2} + 3 \, x + 5}{x^{4} + x^{3} + 3 \, x^{2} + x + 2} - \log \left (x^{2} + x + 2\right ) + \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 34, normalized size = 1.03 \[ \ln \left (x^{2}+1\right )-\ln \left (x^{2}+x +2\right )-\frac {3}{x^{2}+1}+\frac {1}{x^{2}+x +2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.16, size = 44, normalized size = 1.33 \[ -\frac {2 \, x^{2} + 3 \, x + 5}{x^{4} + x^{3} + 3 \, x^{2} + x + 2} - \log \left (x^{2} + x + 2\right ) + \log \left (x^{2} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.16, size = 56, normalized size = 1.70 \[ -\frac {2\,x^2+3\,x+5}{x^4+x^3+3\,x^2+x+2}+\mathrm {atan}\left (\frac {\frac {x\,224{}\mathrm {i}}{11}+\frac {224}{11}{}\mathrm {i}}{44\,x^2+16\,x+60}-\frac {3}{11}{}\mathrm {i}\right )\,2{}\mathrm {i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.19, size = 41, normalized size = 1.24 \[ \frac {- 2 x^{2} - 3 x - 5}{x^{4} + x^{3} + 3 x^{2} + x + 2} + \log {\left (x^{2} + 1 \right )} - \log {\left (x^{2} + x + 2 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________