3.24.59 \(\int \frac {-2 e^{4+2 x}-4 x^2+e^{2+x} (8 x-2 x^2)}{16 x^2+16 x^3+4 x^4+e^{4+2 x} (16+8 x+x^2)+e^{2+x} (-32 x-24 x^2-4 x^3)} \, dx\)

Optimal. Leaf size=29 \[ -e^4+\frac {2}{4+x-\frac {x^2}{e^{2+x}-x}} \]

________________________________________________________________________________________

Rubi [F]  time = 3.62, 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 {-2 e^{4+2 x}-4 x^2+e^{2+x} \left (8 x-2 x^2\right )}{16 x^2+16 x^3+4 x^4+e^{4+2 x} \left (16+8 x+x^2\right )+e^{2+x} \left (-32 x-24 x^2-4 x^3\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Int[(-2*E^(4 + 2*x) - 4*x^2 + E^(2 + x)*(8*x - 2*x^2))/(16*x^2 + 16*x^3 + 4*x^4 + E^(4 + 2*x)*(16 + 8*x + x^2)
 + E^(2 + x)*(-32*x - 24*x^2 - 4*x^3)),x]

[Out]

2/(4 + x) + 96*Defer[Int][(4*E^(2 + x) - 4*x + E^(2 + x)*x - 2*x^2)^(-2), x] - 32*Defer[Int][x/(2*x*(2 + x) -
E^(2 + x)*(4 + x))^2, x] + 12*Defer[Int][x^2/(2*x*(2 + x) - E^(2 + x)*(4 + x))^2, x] - 4*Defer[Int][x^3/(2*x*(
2 + x) - E^(2 + x)*(4 + x))^2, x] - 512*Defer[Int][1/((4 + x)^2*(2*x*(2 + x) - E^(2 + x)*(4 + x))^2), x] - 256
*Defer[Int][1/((4 + x)*(2*x*(2 + x) - E^(2 + x)*(4 + x))^2), x] + 2*Defer[Int][x/(2*x*(2 + x) - E^(2 + x)*(4 +
 x)), x] + 64*Defer[Int][1/((4 + x)^2*(2*x*(2 + x) - E^(2 + x)*(4 + x))), x] + 16*Defer[Int][1/((4 + x)*(2*x*(
2 + x) - E^(2 + x)*(4 + x))), x] + 8*Defer[Int][(-2*x*(2 + x) + E^(2 + x)*(4 + x))^(-1), x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {2 \left (-e^{4+2 x}-e^{2+x} (-4+x) x-2 x^2\right )}{\left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx\\ &=2 \int \frac {-e^{4+2 x}-e^{2+x} (-4+x) x-2 x^2}{\left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx\\ &=2 \int \left (-\frac {1}{(4+x)^2}+\frac {x \left (-8+4 x+x^2\right )}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )}-\frac {2 x^2 \left (-8+5 x^2+x^3\right )}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2}\right ) \, dx\\ &=\frac {2}{4+x}+2 \int \frac {x \left (-8+4 x+x^2\right )}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )} \, dx-4 \int \frac {x^2 \left (-8+5 x^2+x^3\right )}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2} \, dx\\ &=\frac {2}{4+x}+2 \int \frac {x \left (-8+4 x+x^2\right )}{(4+x)^2 \left (2 x (2+x)-e^{2+x} (4+x)\right )} \, dx-4 \int \frac {x^2 \left (-8+5 x^2+x^3\right )}{(4+x)^2 \left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx\\ &=\frac {2}{4+x}+2 \int \left (\frac {4}{4 e^{2+x}-4 x+e^{2+x} x-2 x^2}+\frac {x}{-4 e^{2+x}+4 x-e^{2+x} x+2 x^2}+\frac {32}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )}+\frac {8}{(4+x) \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )}\right ) \, dx-4 \int \left (-\frac {24}{\left (4 e^{2+x}-4 x+e^{2+x} x-2 x^2\right )^2}+\frac {8 x}{\left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2}-\frac {3 x^2}{\left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2}+\frac {x^3}{\left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2}+\frac {128}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2}+\frac {64}{(4+x) \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2}\right ) \, dx\\ &=\frac {2}{4+x}+2 \int \frac {x}{-4 e^{2+x}+4 x-e^{2+x} x+2 x^2} \, dx-4 \int \frac {x^3}{\left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2} \, dx+8 \int \frac {1}{4 e^{2+x}-4 x+e^{2+x} x-2 x^2} \, dx+12 \int \frac {x^2}{\left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2} \, dx+16 \int \frac {1}{(4+x) \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )} \, dx-32 \int \frac {x}{\left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2} \, dx+64 \int \frac {1}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )} \, dx+96 \int \frac {1}{\left (4 e^{2+x}-4 x+e^{2+x} x-2 x^2\right )^2} \, dx-256 \int \frac {1}{(4+x) \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2} \, dx-512 \int \frac {1}{(4+x)^2 \left (-4 e^{2+x}+4 x-e^{2+x} x+2 x^2\right )^2} \, dx\\ &=\frac {2}{4+x}+2 \int \frac {x}{2 x (2+x)-e^{2+x} (4+x)} \, dx-4 \int \frac {x^3}{\left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx+8 \int \frac {1}{-2 x (2+x)+e^{2+x} (4+x)} \, dx+12 \int \frac {x^2}{\left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx+16 \int \frac {1}{(4+x) \left (2 x (2+x)-e^{2+x} (4+x)\right )} \, dx-32 \int \frac {x}{\left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx+64 \int \frac {1}{(4+x)^2 \left (2 x (2+x)-e^{2+x} (4+x)\right )} \, dx+96 \int \frac {1}{\left (4 e^{2+x}-4 x+e^{2+x} x-2 x^2\right )^2} \, dx-256 \int \frac {1}{(4+x) \left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx-512 \int \frac {1}{(4+x)^2 \left (2 x (2+x)-e^{2+x} (4+x)\right )^2} \, dx\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.57, size = 29, normalized size = 1.00 \begin {gather*} -\frac {2 \left (-e^{2+x}+x\right )}{-2 x (2+x)+e^{2+x} (4+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2*E^(4 + 2*x) - 4*x^2 + E^(2 + x)*(8*x - 2*x^2))/(16*x^2 + 16*x^3 + 4*x^4 + E^(4 + 2*x)*(16 + 8*x
+ x^2) + E^(2 + x)*(-32*x - 24*x^2 - 4*x^3)),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 30, normalized size = 1.03 \begin {gather*} \frac {2 \, {\left (x - e^{\left (x + 2\right )}\right )}}{2 \, x^{2} - {\left (x + 4\right )} e^{\left (x + 2\right )} + 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*exp(2+x)^2+(-2*x^2+8*x)*exp(2+x)-4*x^2)/((x^2+8*x+16)*exp(2+x)^2+(-4*x^3-24*x^2-32*x)*exp(2+x)+4
*x^4+16*x^3+16*x^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.33, size = 34, normalized size = 1.17 \begin {gather*} \frac {2 \, {\left (x - e^{\left (x + 2\right )}\right )}}{2 \, x^{2} - x e^{\left (x + 2\right )} + 4 \, x - 4 \, e^{\left (x + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*exp(2+x)^2+(-2*x^2+8*x)*exp(2+x)-4*x^2)/((x^2+8*x+16)*exp(2+x)^2+(-4*x^3-24*x^2-32*x)*exp(2+x)+4
*x^4+16*x^3+16*x^2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.26, size = 36, normalized size = 1.24




method result size



norman \(\frac {-2 \,{\mathrm e}^{2+x}+2 x}{2 x^{2}-x \,{\mathrm e}^{2+x}+4 x -4 \,{\mathrm e}^{2+x}}\) \(36\)
risch \(\frac {2}{4+x}-\frac {2 x^{2}}{\left (4+x \right ) \left (2 x^{2}-x \,{\mathrm e}^{2+x}+4 x -4 \,{\mathrm e}^{2+x}\right )}\) \(43\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-2*exp(2+x)^2+(-2*x^2+8*x)*exp(2+x)-4*x^2)/((x^2+8*x+16)*exp(2+x)^2+(-4*x^3-24*x^2-32*x)*exp(2+x)+4*x^4+1
6*x^3+16*x^2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 34, normalized size = 1.17 \begin {gather*} \frac {2 \, {\left (x - e^{\left (x + 2\right )}\right )}}{2 \, x^{2} - {\left (x e^{2} + 4 \, e^{2}\right )} e^{x} + 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*exp(2+x)^2+(-2*x^2+8*x)*exp(2+x)-4*x^2)/((x^2+8*x+16)*exp(2+x)^2+(-4*x^3-24*x^2-32*x)*exp(2+x)+4
*x^4+16*x^3+16*x^2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.41, size = 35, normalized size = 1.21 \begin {gather*} \frac {2\,x-2\,{\mathrm {e}}^{x+2}}{4\,x-4\,{\mathrm {e}}^{x+2}-x\,{\mathrm {e}}^{x+2}+2\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(2*exp(2*x + 4) - exp(x + 2)*(8*x - 2*x^2) + 4*x^2)/(exp(2*x + 4)*(8*x + x^2 + 16) - exp(x + 2)*(32*x + 2
4*x^2 + 4*x^3) + 16*x^2 + 16*x^3 + 4*x^4),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.23, size = 36, normalized size = 1.24 \begin {gather*} \frac {2 x^{2}}{- 2 x^{3} - 12 x^{2} - 16 x + \left (x^{2} + 8 x + 16\right ) e^{x + 2}} + \frac {2}{x + 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-2*exp(2+x)**2+(-2*x**2+8*x)*exp(2+x)-4*x**2)/((x**2+8*x+16)*exp(2+x)**2+(-4*x**3-24*x**2-32*x)*exp
(2+x)+4*x**4+16*x**3+16*x**2),x)

[Out]

2*x**2/(-2*x**3 - 12*x**2 - 16*x + (x**2 + 8*x + 16)*exp(x + 2)) + 2/(x + 4)

________________________________________________________________________________________