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

   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 [F]
   Mupad [B] (verification not implemented)

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

integrate(1/2*((-4*x+2)*exp(x)^2-2*x^2+3*x)/exp(x)^2/exp(1/4*(4*x*exp(x)^2-x+1)/exp(x)^2)^2,x, algorithm="fric
as")

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

integrate(1/2*((-4*x+2)*exp(x)^2-2*x^2+3*x)/exp(x)^2/exp(1/4*(4*x*exp(x)^2-x+1)/exp(x)^2)^2,x, algorithm="maxi
ma")

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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