\(\int \frac {e^{4+x} (2 x-x^2)+e^8 (48 x+4 x^2)}{e^{2 x}+e^{4+x} (48+8 x)+e^8 (576+192 x+16 x^2)} \, dx\) [2489]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 63, antiderivative size = 16 \[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\frac {x^2}{24+e^{-4+x}+4 x} \]

[Out]

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

Rubi [F]

\[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx \]

[In]

Int[(E^(4 + x)*(2*x - x^2) + E^8*(48*x + 4*x^2))/(E^(2*x) + E^(4 + x)*(48 + 8*x) + E^8*(576 + 192*x + 16*x^2))
,x]

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {-e^{4+x} (-2+x) x+4 e^8 x (12+x)}{\left (e^x+4 e^4 (6+x)\right )^2} \, dx \\ & = \int \left (\frac {4 e^8 x^2 (5+x)}{\left (24 e^4+e^x+4 e^4 x\right )^2}-\frac {e^4 (-2+x) x}{24 e^4+e^x+4 e^4 x}\right ) \, dx \\ & = -\left (e^4 \int \frac {(-2+x) x}{24 e^4+e^x+4 e^4 x} \, dx\right )+\left (4 e^8\right ) \int \frac {x^2 (5+x)}{\left (24 e^4+e^x+4 e^4 x\right )^2} \, dx \\ & = -\left (e^4 \int \left (-\frac {2 x}{24 e^4+e^x+4 e^4 x}+\frac {x^2}{24 e^4+e^x+4 e^4 x}\right ) \, dx\right )+\left (4 e^8\right ) \int \left (\frac {5 x^2}{\left (24 e^4+e^x+4 e^4 x\right )^2}+\frac {x^3}{\left (24 e^4+e^x+4 e^4 x\right )^2}\right ) \, dx \\ & = -\left (e^4 \int \frac {x^2}{24 e^4+e^x+4 e^4 x} \, dx\right )+\left (2 e^4\right ) \int \frac {x}{24 e^4+e^x+4 e^4 x} \, dx+\left (4 e^8\right ) \int \frac {x^3}{\left (24 e^4+e^x+4 e^4 x\right )^2} \, dx+\left (20 e^8\right ) \int \frac {x^2}{\left (24 e^4+e^x+4 e^4 x\right )^2} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 1.66 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31 \[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\frac {e^4 x^2}{e^x+4 e^4 (6+x)} \]

[In]

Integrate[(E^(4 + x)*(2*x - x^2) + E^8*(48*x + 4*x^2))/(E^(2*x) + E^(4 + x)*(48 + 8*x) + E^8*(576 + 192*x + 16
*x^2)),x]

[Out]

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

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31

method result size
norman \(\frac {x^{2} {\mathrm e}^{4}}{4 x \,{\mathrm e}^{4}+24 \,{\mathrm e}^{4}+{\mathrm e}^{x}}\) \(21\)
risch \(\frac {x^{2} {\mathrm e}^{4}}{4 x \,{\mathrm e}^{4}+24 \,{\mathrm e}^{4}+{\mathrm e}^{x}}\) \(21\)
parallelrisch \(\frac {x^{2} {\mathrm e}^{4}}{4 x \,{\mathrm e}^{4}+24 \,{\mathrm e}^{4}+{\mathrm e}^{x}}\) \(21\)

[In]

int(((-x^2+2*x)*exp(4)*exp(x)+(4*x^2+48*x)*exp(4)^2)/(exp(x)^2+(8*x+48)*exp(4)*exp(x)+(16*x^2+192*x+576)*exp(4
)^2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\frac {x^{2} e^{8}}{4 \, {\left (x + 6\right )} e^{8} + e^{\left (x + 4\right )}} \]

[In]

integrate(((-x^2+2*x)*exp(4)*exp(x)+(4*x^2+48*x)*exp(4)^2)/(exp(x)^2+(8*x+48)*exp(4)*exp(x)+(16*x^2+192*x+576)
*exp(4)^2),x, algorithm="fricas")

[Out]

x^2*e^8/(4*(x + 6)*e^8 + e^(x + 4))

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\frac {x^{2} e^{4}}{4 x e^{4} + e^{x} + 24 e^{4}} \]

[In]

integrate(((-x**2+2*x)*exp(4)*exp(x)+(4*x**2+48*x)*exp(4)**2)/(exp(x)**2+(8*x+48)*exp(4)*exp(x)+(16*x**2+192*x
+576)*exp(4)**2),x)

[Out]

x**2*exp(4)/(4*x*exp(4) + exp(x) + 24*exp(4))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\frac {x^{2} e^{4}}{4 \, x e^{4} + 24 \, e^{4} + e^{x}} \]

[In]

integrate(((-x^2+2*x)*exp(4)*exp(x)+(4*x^2+48*x)*exp(4)^2)/(exp(x)^2+(8*x+48)*exp(4)*exp(x)+(16*x^2+192*x+576)
*exp(4)^2),x, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (15) = 30\).

Time = 0.26 (sec) , antiderivative size = 39, normalized size of antiderivative = 2.44 \[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\frac {{\left (x + 4\right )}^{2} e^{8} - 8 \, {\left (x + 4\right )} e^{8} + 16 \, e^{8}}{4 \, {\left (x + 4\right )} e^{8} + 8 \, e^{8} + e^{\left (x + 4\right )}} \]

[In]

integrate(((-x^2+2*x)*exp(4)*exp(x)+(4*x^2+48*x)*exp(4)^2)/(exp(x)^2+(8*x+48)*exp(4)*exp(x)+(16*x^2+192*x+576)
*exp(4)^2),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 10.40 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {e^{4+x} \left (2 x-x^2\right )+e^8 \left (48 x+4 x^2\right )}{e^{2 x}+e^{4+x} (48+8 x)+e^8 \left (576+192 x+16 x^2\right )} \, dx=\frac {x^2\,{\mathrm {e}}^4}{24\,{\mathrm {e}}^4+{\mathrm {e}}^x+4\,x\,{\mathrm {e}}^4} \]

[In]

int((exp(8)*(48*x + 4*x^2) + exp(4)*exp(x)*(2*x - x^2))/(exp(2*x) + exp(8)*(192*x + 16*x^2 + 576) + exp(4)*exp
(x)*(8*x + 48)),x)

[Out]

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