\(\int \frac {e^{2 x} (-4+4 x)+e^{\frac {e^x+4 x}{2 x}} (e^{3 x} (1-x)+e^{2 x} (2 x-4 x^2))}{2 x^3} \, dx\) [9460]

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

Optimal result

Integrand size = 63, antiderivative size = 35 \[ \int \frac {e^{2 x} (-4+4 x)+e^{\frac {e^x+4 x}{2 x}} \left (e^{3 x} (1-x)+e^{2 x} \left (2 x-4 x^2\right )\right )}{2 x^3} \, dx=1-\frac {e^{2+\frac {e^x}{2 x}+2 x}-\frac {e^{2 x}}{x}}{x} \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.43 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.80 \[ \int \frac {e^{2 x} (-4+4 x)+e^{\frac {e^x+4 x}{2 x}} \left (e^{3 x} (1-x)+e^{2 x} \left (2 x-4 x^2\right )\right )}{2 x^3} \, dx=-\frac {e^{2 x} \left (-1+e^{2+\frac {e^x}{2 x}} x\right )}{x^2} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.29 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.91

method result size
risch \(\frac {{\mathrm e}^{2 x}}{x^{2}}-\frac {{\mathrm e}^{\frac {4 x^{2}+{\mathrm e}^{x}+4 x}{2 x}}}{x}\) \(32\)
parallelrisch \(\frac {-2 \,{\mathrm e}^{\frac {4 x +{\mathrm e}^{x}}{2 x}} {\mathrm e}^{2 x} x +2 \,{\mathrm e}^{2 x}}{2 x^{2}}\) \(32\)

[In]

int(1/2*(((1-x)*exp(x)^3+(-4*x^2+2*x)*exp(x)^2)*exp(1/2*(4*x+exp(x))/x)+(-4+4*x)*exp(x)^2)/x^3,x,method=_RETUR
NVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.86 \[ \int \frac {e^{2 x} (-4+4 x)+e^{\frac {e^x+4 x}{2 x}} \left (e^{3 x} (1-x)+e^{2 x} \left (2 x-4 x^2\right )\right )}{2 x^3} \, dx=-\frac {x e^{\left (2 \, x + \frac {4 \, x + e^{x}}{2 \, x}\right )} - e^{\left (2 \, x\right )}}{x^{2}} \]

[In]

integrate(1/2*(((1-x)*exp(x)^3+(-4*x^2+2*x)*exp(x)^2)*exp(1/2*(4*x+exp(x))/x)+(-4+4*x)*exp(x)^2)/x^3,x, algori
thm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.74 \[ \int \frac {e^{2 x} (-4+4 x)+e^{\frac {e^x+4 x}{2 x}} \left (e^{3 x} (1-x)+e^{2 x} \left (2 x-4 x^2\right )\right )}{2 x^3} \, dx=- \frac {e^{2 x} e^{\frac {2 x + \frac {e^{x}}{2}}{x}}}{x} + \frac {e^{2 x}}{x^{2}} \]

[In]

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

[Out]

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

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.29 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.94 \[ \int \frac {e^{2 x} (-4+4 x)+e^{\frac {e^x+4 x}{2 x}} \left (e^{3 x} (1-x)+e^{2 x} \left (2 x-4 x^2\right )\right )}{2 x^3} \, dx=-\frac {e^{\left (2 \, x + \frac {e^{x}}{2 \, x} + 2\right )}}{x} + 4 \, \Gamma \left (-1, -2 \, x\right ) + 8 \, \Gamma \left (-2, -2 \, x\right ) \]

[In]

integrate(1/2*(((1-x)*exp(x)^3+(-4*x^2+2*x)*exp(x)^2)*exp(1/2*(4*x+exp(x))/x)+(-4+4*x)*exp(x)^2)/x^3,x, algori
thm="maxima")

[Out]

-e^(2*x + 1/2*e^x/x + 2)/x + 4*gamma(-1, -2*x) + 8*gamma(-2, -2*x)

Giac [F]

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

[In]

integrate(1/2*(((1-x)*exp(x)^3+(-4*x^2+2*x)*exp(x)^2)*exp(1/2*(4*x+exp(x))/x)+(-4+4*x)*exp(x)^2)/x^3,x, algori
thm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 15.55 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.71 \[ \int \frac {e^{2 x} (-4+4 x)+e^{\frac {e^x+4 x}{2 x}} \left (e^{3 x} (1-x)+e^{2 x} \left (2 x-4 x^2\right )\right )}{2 x^3} \, dx=\frac {{\mathrm {e}}^{2\,x}-x\,{\mathrm {e}}^{2\,x+\frac {{\mathrm {e}}^x}{2\,x}+2}}{x^2} \]

[In]

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

[Out]

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