Optimal. Leaf size=22 \[ -2+x+e^{-2 x} x-\frac {x^2}{2-x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 36, normalized size of antiderivative = 1.64, number of steps
used = 7, number of rules used = 5, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.106, Rules used = {27, 6820, 2207,
2225, 697} \begin {gather*} -\frac {1}{2} e^{-2 x} (1-2 x)+\frac {e^{-2 x}}{2}+2 x-\frac {4}{2-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 697
Rule 2207
Rule 2225
Rule 6820
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-2 x} \left (4-12 x+9 x^2-2 x^3+e^{2 x} \left (4-8 x+2 x^2\right )\right )}{(-2+x)^2} \, dx\\ &=\int \left (e^{-2 x} (1-2 x)+\frac {2 \left (2-4 x+x^2\right )}{(-2+x)^2}\right ) \, dx\\ &=2 \int \frac {2-4 x+x^2}{(-2+x)^2} \, dx+\int e^{-2 x} (1-2 x) \, dx\\ &=-\frac {1}{2} e^{-2 x} (1-2 x)+2 \int \left (1-\frac {2}{(-2+x)^2}\right ) \, dx-\int e^{-2 x} \, dx\\ &=\frac {e^{-2 x}}{2}-\frac {1}{2} e^{-2 x} (1-2 x)-\frac {4}{2-x}+2 x\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 18, normalized size = 0.82 \begin {gather*} \frac {4}{-2+x}+2 x+e^{-2 x} x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.41, size = 29, normalized size = 1.32
method | result | size |
risch | \(\frac {4}{x -2}+2 x +{\mathrm e}^{-2 x} x\) | \(18\) |
default | \(\frac {4}{x -2}+2 x -\frac {9 \,{\mathrm e}^{-2 x}}{2}+\frac {\left (2 x +9\right ) {\mathrm e}^{-2 x}}{2}\) | \(29\) |
norman | \(\frac {\left (x^{2}-4 \,{\mathrm e}^{2 x}-2 x +2 \,{\mathrm e}^{2 x} x^{2}\right ) {\mathrm e}^{-2 x}}{x -2}\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 31, normalized size = 1.41 \begin {gather*} \frac {{\left (x^{2} + 2 \, {\left (x^{2} - 2 \, x + 2\right )} e^{\left (2 \, x\right )} - 2 \, x\right )} e^{\left (-2 \, x\right )}}{x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.06, size = 14, normalized size = 0.64 \begin {gather*} 2 x + x e^{- 2 x} + \frac {4}{x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 31, normalized size = 1.41 \begin {gather*} \frac {x^{2} e^{\left (-2 \, x\right )} + 2 \, x^{2} - 2 \, x e^{\left (-2 \, x\right )} - 4 \, x + 4}{x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 17, normalized size = 0.77 \begin {gather*} 2\,x+x\,{\mathrm {e}}^{-2\,x}+\frac {4}{x-2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________