3.80.19 \(\int \frac {e^{4+2 x} (-18 x+12 x^2-2 x^3)+e^{2+x} (6 x^2+2 x^3-2 x^4)}{4 x^2+e^{4+2 x} (9-6 x+x^2)+e^{2+x} (-12 x+4 x^2)} \, dx\)

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]

Int[(E^(4 + 2*x)*(-18*x + 12*x^2 - 2*x^3) + E^(2 + x)*(6*x^2 + 2*x^3 - 2*x^4))/(4*x^2 + E^(4 + 2*x)*(9 - 6*x +
 x^2) + E^(2 + x)*(-12*x + 4*x^2)),x]

[Out]

-6*Defer[Int][(E^(2 + x)*x^2)/(-3*E^(2 + x) + 2*x + E^(2 + x)*x)^2, x] + 6*Defer[Int][(E^(2 + x)*x^3)/(-3*E^(2
 + x) + 2*x + E^(2 + x)*x)^2, x] - 2*Defer[Int][(E^(2 + x)*x^4)/(-3*E^(2 + x) + 2*x + E^(2 + x)*x)^2, x] + 6*D
efer[Int][(E^(2 + x)*x)/(-3*E^(2 + x) + 2*x + E^(2 + x)*x), x] - 2*Defer[Int][(E^(2 + x)*x^2)/(-3*E^(2 + x) +
2*x + E^(2 + x)*x), x]

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]

Integrate[(E^(4 + 2*x)*(-18*x + 12*x^2 - 2*x^3) + E^(2 + x)*(6*x^2 + 2*x^3 - 2*x^4))/(4*x^2 + E^(4 + 2*x)*(9 -
 6*x + x^2) + E^(2 + x)*(-12*x + 4*x^2)),x]

[Out]

(-2*E^(2 + x)*(-3 + x)*x^2)/(2*E^(2 + x)*(-3 + x) + 4*x)

________________________________________________________________________________________

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]

integrate(((-2*x^3+12*x^2-18*x)*exp(2+x)^2+(-2*x^4+2*x^3+6*x^2)*exp(2+x))/((x^2-6*x+9)*exp(2+x)^2+(4*x^2-12*x)
*exp(2+x)+4*x^2),x, algorithm="fricas")

[Out]

-(x^3 - 3*x^2)*e^(x + 2)/((x - 3)*e^(x + 2) + 2*x)

________________________________________________________________________________________

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]

integrate(((-2*x^3+12*x^2-18*x)*exp(2+x)^2+(-2*x^4+2*x^3+6*x^2)*exp(2+x))/((x^2-6*x+9)*exp(2+x)^2+(4*x^2-12*x)
*exp(2+x)+4*x^2),x, algorithm="giac")

[Out]

-(x^3*e^(x + 2) - 3*x^2*e^(x + 2))/(x*e^(x + 2) + 2*x - 3*e^(x + 2))

________________________________________________________________________________________

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]

int(((-2*x^3+12*x^2-18*x)*exp(2+x)^2+(-2*x^4+2*x^3+6*x^2)*exp(2+x))/((x^2-6*x+9)*exp(2+x)^2+(4*x^2-12*x)*exp(2
+x)+4*x^2),x,method=_RETURNVERBOSE)

[Out]

-x^2+2*x^3/(x*exp(2+x)-3*exp(2+x)+2*x)

________________________________________________________________________________________

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]

integrate(((-2*x^3+12*x^2-18*x)*exp(2+x)^2+(-2*x^4+2*x^3+6*x^2)*exp(2+x))/((x^2-6*x+9)*exp(2+x)^2+(4*x^2-12*x)
*exp(2+x)+4*x^2),x, algorithm="maxima")

[Out]

-(x^3*e^2 - 3*x^2*e^2)*e^x/((x*e^2 - 3*e^2)*e^x + 2*x)

________________________________________________________________________________________

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]

int(-(exp(2*x + 4)*(18*x - 12*x^2 + 2*x^3) - exp(x + 2)*(6*x^2 + 2*x^3 - 2*x^4))/(exp(2*x + 4)*(x^2 - 6*x + 9)
 - exp(x + 2)*(12*x - 4*x^2) + 4*x^2),x)

[Out]

-(x^2*exp(x + 2)*(x - 3))/(2*x - 3*exp(x + 2) + x*exp(x + 2))

________________________________________________________________________________________

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]

integrate(((-2*x**3+12*x**2-18*x)*exp(2+x)**2+(-2*x**4+2*x**3+6*x**2)*exp(2+x))/((x**2-6*x+9)*exp(2+x)**2+(4*x
**2-12*x)*exp(2+x)+4*x**2),x)

[Out]

2*x**3/(2*x + (x - 3)*exp(x + 2)) - x**2

________________________________________________________________________________________