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

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

Optimal result

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

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81

method result size
risch \(3 \,{\mathrm e}^{-{\mathrm e}^{-\frac {x \left (-3+x \right )}{3}}}-2 x\) \(17\)
default \({\mathrm e}^{-{\mathrm e}^{-\frac {1}{3} x^{2}+x}+\ln \left (3\right )}-2 x\) \(19\)
norman \({\mathrm e}^{-{\mathrm e}^{-\frac {1}{3} x^{2}+x}+\ln \left (3\right )}-2 x\) \(19\)
parallelrisch \({\mathrm e}^{-{\mathrm e}^{-\frac {1}{3} x^{2}+x}+\ln \left (3\right )}-2 x\) \(19\)
parts \({\mathrm e}^{-{\mathrm e}^{-\frac {1}{3} x^{2}+x}+\ln \left (3\right )}-2 x\) \(19\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (18) = 36\).

Time = 0.24 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.19 \[ \int \frac {1}{3} \left (-6+3 e^{-e^{\frac {1}{3} \left (3 x-x^2\right )}+\frac {1}{3} \left (3 x-x^2\right )} (-3+2 x)\right ) \, dx=-{\left (2 \, x e^{\left (-\frac {1}{3} \, x^{2} + x\right )} - e^{\left (-\frac {1}{3} \, x^{2} + x - e^{\left (-\frac {1}{3} \, x^{2} + x\right )} + \log \left (3\right )\right )}\right )} e^{\left (\frac {1}{3} \, x^{2} - x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67 \[ \int \frac {1}{3} \left (-6+3 e^{-e^{\frac {1}{3} \left (3 x-x^2\right )}+\frac {1}{3} \left (3 x-x^2\right )} (-3+2 x)\right ) \, dx=- 2 x + 3 e^{- e^{- \frac {x^{2}}{3} + x}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1}{3} \left (-6+3 e^{-e^{\frac {1}{3} \left (3 x-x^2\right )}+\frac {1}{3} \left (3 x-x^2\right )} (-3+2 x)\right ) \, dx=-2 \, x + 3 \, e^{\left (-e^{\left (-\frac {1}{3} \, x^{2} + x\right )}\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.81 \[ \int \frac {1}{3} \left (-6+3 e^{-e^{\frac {1}{3} \left (3 x-x^2\right )}+\frac {1}{3} \left (3 x-x^2\right )} (-3+2 x)\right ) \, dx=3\,{\mathrm {e}}^{-{\mathrm {e}}^{-\frac {x^2}{3}}\,{\mathrm {e}}^x}-2\,x \]

[In]

int((exp(log(3) - exp(x - x^2/3))*exp(x - x^2/3)*(2*x - 3))/3 - 2,x)

[Out]

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