Optimal. Leaf size=31 \[ \frac {2}{\left (1+\frac {2-x}{\frac {2}{x}-x}\right ) x^2}-\log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 4, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {2099, 652, 632,
212} \begin {gather*} \frac {3-2 x}{-x^2+x+1}+\frac {2}{x^2}-\frac {2}{x}-\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 652
Rule 2099
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {4}{x^3}+\frac {2}{x^2}-\frac {1}{x}+\frac {-7+4 x}{\left (-1-x+x^2\right )^2}-\frac {2}{-1-x+x^2}\right ) \, dx\\ &=\frac {2}{x^2}-\frac {2}{x}-\log (x)-2 \int \frac {1}{-1-x+x^2} \, dx+\int \frac {-7+4 x}{\left (-1-x+x^2\right )^2} \, dx\\ &=\frac {2}{x^2}-\frac {2}{x}+\frac {3-2 x}{1+x-x^2}-\log (x)+2 \int \frac {1}{-1-x+x^2} \, dx+4 \text {Subst}\left (\int \frac {1}{5-x^2} \, dx,x,-1+2 x\right )\\ &=\frac {2}{x^2}-\frac {2}{x}+\frac {3-2 x}{1+x-x^2}-\frac {4 \tanh ^{-1}\left (\frac {1-2 x}{\sqrt {5}}\right )}{\sqrt {5}}-\log (x)-4 \text {Subst}\left (\int \frac {1}{5-x^2} \, dx,x,-1+2 x\right )\\ &=\frac {2}{x^2}-\frac {2}{x}+\frac {3-2 x}{1+x-x^2}-\log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 27, normalized size = 0.87 \begin {gather*} -\frac {2-x^2}{x^2 \left (-1-x+x^2\right )}-\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 33, normalized size = 1.06
method | result | size |
norman | \(\frac {x^{2}-2}{x^{2} \left (x^{2}-x -1\right )}-\ln \left (x \right )\) | \(25\) |
risch | \(\frac {x^{2}-2}{x^{2} \left (x^{2}-x -1\right )}-\ln \left (x \right )\) | \(25\) |
default | \(-\frac {3-2 x}{x^{2}-x -1}+\frac {2}{x^{2}}-\frac {2}{x}-\ln \left (x \right )\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 27, normalized size = 0.87 \begin {gather*} \frac {x^{2} - 2}{x^{4} - x^{3} - x^{2}} - \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 40, normalized size = 1.29 \begin {gather*} \frac {x^{2} - {\left (x^{4} - x^{3} - x^{2}\right )} \log \left (x\right ) - 2}{x^{4} - x^{3} - x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.05, size = 19, normalized size = 0.61 \begin {gather*} - \frac {2 - x^{2}}{x^{4} - x^{3} - x^{2}} - \log {\left (x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 25, normalized size = 0.81 \begin {gather*} \frac {x^{2} - 2}{{\left (x^{2} - x - 1\right )} x^{2}} - \log \left ({\left | x \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 25, normalized size = 0.81 \begin {gather*} -\ln \left (x\right )-\frac {x^2-2}{x^2\,\left (-x^2+x+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________