Optimal. Leaf size=38 \[ \frac{1-x}{x^2-4 x+5}+\frac{5}{2} \log \left (x^2-4 x+5\right )-2 \tan ^{-1}(2-x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0258385, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192, Rules used = {1660, 634, 618, 204, 628} \[ \frac{1-x}{x^2-4 x+5}+\frac{5}{2} \log \left (x^2-4 x+5\right )-2 \tan ^{-1}(2-x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1660
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{-41+55 x-27 x^2+5 x^3}{\left (5-4 x+x^2\right )^2} \, dx &=\frac{1-x}{5-4 x+x^2}+\frac{1}{4} \int \frac{-32+20 x}{5-4 x+x^2} \, dx\\ &=\frac{1-x}{5-4 x+x^2}+2 \int \frac{1}{5-4 x+x^2} \, dx+\frac{5}{2} \int \frac{-4+2 x}{5-4 x+x^2} \, dx\\ &=\frac{1-x}{5-4 x+x^2}+\frac{5}{2} \log \left (5-4 x+x^2\right )-4 \operatorname{Subst}\left (\int \frac{1}{-4-x^2} \, dx,x,-4+2 x\right )\\ &=\frac{1-x}{5-4 x+x^2}-2 \tan ^{-1}(2-x)+\frac{5}{2} \log \left (5-4 x+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0131029, size = 38, normalized size = 1. \[ \frac{1-x}{x^2-4 x+5}+\frac{5}{2} \log \left (x^2-4 x+5\right )-2 \tan ^{-1}(2-x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 35, normalized size = 0.9 \begin{align*}{\frac{1-x}{{x}^{2}-4\,x+5}}+2\,\arctan \left ( -2+x \right ) +{\frac{5\,\ln \left ({x}^{2}-4\,x+5 \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.39753, size = 45, normalized size = 1.18 \begin{align*} -\frac{x - 1}{x^{2} - 4 \, x + 5} + 2 \, \arctan \left (x - 2\right ) + \frac{5}{2} \, \log \left (x^{2} - 4 \, x + 5\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.98051, size = 140, normalized size = 3.68 \begin{align*} \frac{4 \,{\left (x^{2} - 4 \, x + 5\right )} \arctan \left (x - 2\right ) + 5 \,{\left (x^{2} - 4 \, x + 5\right )} \log \left (x^{2} - 4 \, x + 5\right ) - 2 \, x + 2}{2 \,{\left (x^{2} - 4 \, x + 5\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.128605, size = 31, normalized size = 0.82 \begin{align*} - \frac{x - 1}{x^{2} - 4 x + 5} + \frac{5 \log{\left (x^{2} - 4 x + 5 \right )}}{2} + 2 \operatorname{atan}{\left (x - 2 \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.06078, size = 45, normalized size = 1.18 \begin{align*} -\frac{x - 1}{x^{2} - 4 \, x + 5} + 2 \, \arctan \left (x - 2\right ) + \frac{5}{2} \, \log \left (x^{2} - 4 \, x + 5\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]