Optimal. Leaf size=28 \[ 2-\frac {(3-x) x}{-1-2 e^{-2-x}+\frac {3}{x}} \]
________________________________________________________________________________________
Rubi [F] time = 2.34, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {e^{4+2 x} \left (-18 x+12 x^2-2 x^3\right )+e^{2+x} \left (6 x^2+2 x^3-2 x^4\right )}{4 x^2+e^{4+2 x} \left (9-6 x+x^2\right )+e^{2+x} \left (-12 x+4 x^2\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2 e^{2+x} x \left (-e^{2+x} (-3+x)^2-x \left (-3-x+x^2\right )\right )}{\left (e^{2+x} (-3+x)+2 x\right )^2} \, dx\\ &=2 \int \frac {e^{2+x} x \left (-e^{2+x} (-3+x)^2-x \left (-3-x+x^2\right )\right )}{\left (e^{2+x} (-3+x)+2 x\right )^2} \, dx\\ &=2 \int \left (-\frac {e^{2+x} (-3+x) x}{-3 e^{2+x}+2 x+e^{2+x} x}-\frac {e^{2+x} x^2 \left (3-3 x+x^2\right )}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2}\right ) \, dx\\ &=-\left (2 \int \frac {e^{2+x} (-3+x) x}{-3 e^{2+x}+2 x+e^{2+x} x} \, dx\right )-2 \int \frac {e^{2+x} x^2 \left (3-3 x+x^2\right )}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2} \, dx\\ &=-\left (2 \int \left (\frac {3 e^{2+x} x^2}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2}-\frac {3 e^{2+x} x^3}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2}+\frac {e^{2+x} x^4}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2}\right ) \, dx\right )-2 \int \left (-\frac {3 e^{2+x} x}{-3 e^{2+x}+2 x+e^{2+x} x}+\frac {e^{2+x} x^2}{-3 e^{2+x}+2 x+e^{2+x} x}\right ) \, dx\\ &=-\left (2 \int \frac {e^{2+x} x^4}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2} \, dx\right )-2 \int \frac {e^{2+x} x^2}{-3 e^{2+x}+2 x+e^{2+x} x} \, dx-6 \int \frac {e^{2+x} x^2}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2} \, dx+6 \int \frac {e^{2+x} x^3}{\left (-3 e^{2+x}+2 x+e^{2+x} x\right )^2} \, dx+6 \int \frac {e^{2+x} x}{-3 e^{2+x}+2 x+e^{2+x} x} \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.46, size = 29, normalized size = 1.04 \begin {gather*} -\frac {2 e^{2+x} (-3+x) x^2}{2 e^{2+x} (-3+x)+4 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.93, size = 29, normalized size = 1.04 \begin {gather*} -\frac {{\left (x^{3} - 3 \, x^{2}\right )} e^{\left (x + 2\right )}}{{\left (x - 3\right )} e^{\left (x + 2\right )} + 2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 38, normalized size = 1.36 \begin {gather*} -\frac {x^{3} e^{\left (x + 2\right )} - 3 \, x^{2} e^{\left (x + 2\right )}}{x e^{\left (x + 2\right )} + 2 \, x - 3 \, e^{\left (x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 30, normalized size = 1.07
method | result | size |
risch | \(-x^{2}+\frac {2 x^{3}}{x \,{\mathrm e}^{2+x}-3 \,{\mathrm e}^{2+x}+2 x}\) | \(30\) |
norman | \(\frac {3 x^{2} {\mathrm e}^{2+x}-{\mathrm e}^{2+x} x^{3}}{x \,{\mathrm e}^{2+x}-3 \,{\mathrm e}^{2+x}+2 x}\) | \(39\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 36, normalized size = 1.29 \begin {gather*} -\frac {{\left (x^{3} e^{2} - 3 \, x^{2} e^{2}\right )} e^{x}}{{\left (x e^{2} - 3 \, e^{2}\right )} e^{x} + 2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.19, size = 30, normalized size = 1.07 \begin {gather*} -\frac {x^2\,{\mathrm {e}}^{x+2}\,\left (x-3\right )}{2\,x-3\,{\mathrm {e}}^{x+2}+x\,{\mathrm {e}}^{x+2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.18, size = 19, normalized size = 0.68 \begin {gather*} \frac {2 x^{3}}{2 x + \left (x - 3\right ) e^{x + 2}} - x^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________