\(\int \frac {e^x (e^{7-x} (-1-2 x)+e^4 (2+2 x+x^2))}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx\) [6528]

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

Optimal result

Integrand size = 64, antiderivative size = 34 \[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=-e^3+\frac {1}{4} e^4 \left (5+\frac {e^x x}{2-e^{3-x}+x}\right ) \]

[Out]

1/4*(5+x*exp(x)/(x-exp(-x+3)+2))*exp(4)-exp(3)

Rubi [F]

\[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=\int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx \]

[In]

Int[(E^x*(E^(7 - x)*(-1 - 2*x) + E^4*(2 + 2*x + x^2)))/(16 + 4*E^(6 - 2*x) + E^(3 - x)*(-16 - 8*x) + 16*x + 4*
x^2),x]

[Out]

E^(1 + 2*x)/8 - (E^(1 + 2*x)*(1 + 2*x))/8 - (3*Defer[Int][(E^(4 + 3*x)*x)/(-E^3 + 2*E^x + E^x*x)^2, x])/4 - De
fer[Int][(E^(4 + 3*x)*x^2)/(-E^3 + 2*E^x + E^x*x)^2, x]/4 + Defer[Int][E^(1 + 3*x)/(-E^3 + 2*E^x + E^x*x), x]/
2 + (5*Defer[Int][(E^(1 + 3*x)*x)/(-E^3 + 2*E^x + E^x*x), x])/4 + Defer[Int][(E^(1 + 3*x)*x^2)/(-E^3 + 2*E^x +
 E^x*x), x]/2

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

Mathematica [A] (verified)

Time = 3.72 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.79 \[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=\frac {e^{4+2 x} x}{4 \left (-e^3+e^x (2+x)\right )} \]

[In]

Integrate[(E^x*(E^(7 - x)*(-1 - 2*x) + E^4*(2 + 2*x + x^2)))/(16 + 4*E^(6 - 2*x) + E^(3 - x)*(-16 - 8*x) + 16*
x + 4*x^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.37 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.62

method result size
parallelrisch \(\frac {x \,{\mathrm e}^{4} {\mathrm e}^{x}}{4 x -4 \,{\mathrm e}^{-x +3}+8}\) \(21\)
norman \(-\frac {x \,{\mathrm e}^{4} {\mathrm e}^{2 x}}{4 \left (-{\mathrm e}^{x} x +{\mathrm e}^{3}-2 \,{\mathrm e}^{x}\right )}\) \(24\)
risch \(\frac {\left (-x^{2} {\mathrm e}^{4+2 x}-4 x \,{\mathrm e}^{4+2 x}-4 \,{\mathrm e}^{4+2 x}\right ) x}{4 \left (-{\mathrm e}^{x} x +{\mathrm e}^{3}-2 \,{\mathrm e}^{x}\right ) \left (2+x \right )^{2}}\) \(52\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.65 \[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=\frac {x e^{\left (2 \, x + 4\right )}}{4 \, {\left ({\left (x + 2\right )} e^{x} - e^{3}\right )}} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (26) = 52\).

Time = 0.23 (sec) , antiderivative size = 71, normalized size of antiderivative = 2.09 \[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=\frac {x e^{10}}{- 4 x^{2} e^{3} - 16 x e^{3} + \left (4 x^{3} + 24 x^{2} + 48 x + 32\right ) e^{x} - 16 e^{3}} + \frac {x e^{7}}{4 x^{2} + 16 x + 16} + \frac {x e^{4} e^{x}}{4 x + 8} \]

[In]

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

[Out]

x*exp(10)/(-4*x**2*exp(3) - 16*x*exp(3) + (4*x**3 + 24*x**2 + 48*x + 32)*exp(x) - 16*exp(3)) + x*exp(7)/(4*x**
2 + 16*x + 16) + x*exp(4)*exp(x)/(4*x + 8)

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.65 \[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=\frac {x e^{\left (2 \, x + 4\right )}}{4 \, {\left ({\left (x + 2\right )} e^{x} - e^{3}\right )}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.24 \[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=\frac {{\left (x - 3\right )} e^{7} + 3 \, e^{7}}{4 \, {\left ({\left (x - 3\right )} e^{\left (-x + 3\right )} + 5 \, e^{\left (-x + 3\right )} - e^{\left (-2 \, x + 6\right )}\right )}} \]

[In]

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

[Out]

1/4*((x - 3)*e^7 + 3*e^7)/((x - 3)*e^(-x + 3) + 5*e^(-x + 3) - e^(-2*x + 6))

Mupad [B] (verification not implemented)

Time = 12.26 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.56 \[ \int \frac {e^x \left (e^{7-x} (-1-2 x)+e^4 \left (2+2 x+x^2\right )\right )}{16+4 e^{6-2 x}+e^{3-x} (-16-8 x)+16 x+4 x^2} \, dx=\frac {x\,\left (2\,{\mathrm {e}}^{x+4}\,{\mathrm {e}}^x-{\mathrm {e}}^{x+4}\,{\mathrm {e}}^3+{\mathrm {e}}^7\,{\mathrm {e}}^x+x\,{\mathrm {e}}^{x+4}\,{\mathrm {e}}^x\right )}{4\,\left (x+2\right )\,\left (2\,{\mathrm {e}}^x-{\mathrm {e}}^3+x\,{\mathrm {e}}^x\right )} \]

[In]

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

[Out]

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