\(\int e^{3+16 x-8 e^2 x+e^4 x-x^2} (16-8 e^2+e^4-2 x) \, dx\) [6476]

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

Optimal result

Integrand size = 37, antiderivative size = 19 \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx=4+e^{3+\left (\left (-4+e^2\right )^2-x\right ) x} \]

[Out]

exp(3+((exp(2)-4)^2-x)*x)+4

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.054, Rules used = {2276, 2268} \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx=e^{-x^2+\left (4-e^2\right )^2 x+3} \]

[In]

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

[Out]

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

Rule 2268

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[e*(F^(a + b*x + c*x^2)/(2
*c*Log[F])), x] /; FreeQ[{F, a, b, c, d, e}, x] && EqQ[b*e - 2*c*d, 0]

Rule 2276

Int[(F_)^(v_)*(u_)^(m_.), x_Symbol] :> Int[ExpandToSum[u, x]^m*F^ExpandToSum[v, x], x] /; FreeQ[{F, m}, x] &&
LinearQ[u, x] && QuadraticQ[v, x] &&  !(LinearMatchQ[u, x] && QuadraticMatchQ[v, x])

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

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.95 \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx=e^{3+\left (-4+e^2\right )^2 x-x^2} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.11

method result size
risch \({\mathrm e}^{x \,{\mathrm e}^{4}-8 \,{\mathrm e}^{2} x -x^{2}+16 x +3}\) \(21\)
gosper \({\mathrm e}^{x \,{\mathrm e}^{4}-8 \,{\mathrm e}^{2} x -x^{2}+16 x +3}\) \(23\)
derivativedivides \({\mathrm e}^{x \,{\mathrm e}^{4}-8 \,{\mathrm e}^{2} x -x^{2}+16 x +3}\) \(23\)
default \({\mathrm e}^{x \,{\mathrm e}^{4}-8 \,{\mathrm e}^{2} x -x^{2}+16 x +3}\) \(23\)
norman \({\mathrm e}^{x \,{\mathrm e}^{4}-8 \,{\mathrm e}^{2} x -x^{2}+16 x +3}\) \(23\)
parallelrisch \({\mathrm e}^{x \,{\mathrm e}^{4}-8 \,{\mathrm e}^{2} x -x^{2}+16 x +3}\) \(23\)
parts \(\frac {\sqrt {\pi }\, {\mathrm e}^{3+\frac {\left ({\mathrm e}^{4}-8 \,{\mathrm e}^{2}+16\right )^{2}}{4}} \operatorname {erf}\left (x -\frac {{\mathrm e}^{4}}{2}+4 \,{\mathrm e}^{2}-8\right ) {\mathrm e}^{4}}{2}-4 \sqrt {\pi }\, {\mathrm e}^{3+\frac {\left ({\mathrm e}^{4}-8 \,{\mathrm e}^{2}+16\right )^{2}}{4}} \operatorname {erf}\left (x -\frac {{\mathrm e}^{4}}{2}+4 \,{\mathrm e}^{2}-8\right ) {\mathrm e}^{2}-\sqrt {\pi }\, {\mathrm e}^{3+\frac {\left ({\mathrm e}^{4}-8 \,{\mathrm e}^{2}+16\right )^{2}}{4}} \operatorname {erf}\left (x -\frac {{\mathrm e}^{4}}{2}+4 \,{\mathrm e}^{2}-8\right ) x +8 \sqrt {\pi }\, {\mathrm e}^{3+\frac {\left ({\mathrm e}^{4}-8 \,{\mathrm e}^{2}+16\right )^{2}}{4}} \operatorname {erf}\left (x -\frac {{\mathrm e}^{4}}{2}+4 \,{\mathrm e}^{2}-8\right )+\sqrt {\pi }\, {\mathrm e}^{3+\frac {\left ({\mathrm e}^{4}-8 \,{\mathrm e}^{2}+16\right )^{2}}{4}} \left (\operatorname {erf}\left (x -\frac {{\mathrm e}^{4}}{2}+4 \,{\mathrm e}^{2}-8\right ) \left (x -\frac {{\mathrm e}^{4}}{2}+4 \,{\mathrm e}^{2}-8\right )+\frac {{\mathrm e}^{-\left (x -\frac {{\mathrm e}^{4}}{2}+4 \,{\mathrm e}^{2}-8\right )^{2}}}{\sqrt {\pi }}\right )\) \(225\)

[In]

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

[Out]

exp(x*exp(4)-8*exp(2)*x-x^2+16*x+3)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05 \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx=e^{\left (-x^{2} + x e^{4} - 8 \, x e^{2} + 16 \, x + 3\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05 \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx=e^{- x^{2} - 8 x e^{2} + 16 x + x e^{4} + 3} \]

[In]

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

[Out]

exp(-x**2 - 8*x*exp(2) + 16*x + x*exp(4) + 3)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05 \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx=e^{\left (-x^{2} + x e^{4} - 8 \, x e^{2} + 16 \, x + 3\right )} \]

[In]

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

[Out]

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

Giac [C] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 136, normalized size of antiderivative = 7.16 \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx=-\frac {1}{2} \, \sqrt {\pi } {\left (e^{4} - 8 \, e^{2}\right )} \operatorname {erf}\left (x - \frac {1}{2} \, e^{4} + 4 \, e^{2} - 8\right ) e^{\left (\frac {1}{4} \, e^{8} - 4 \, e^{6} + 24 \, e^{4} - 64 \, e^{2} + 67\right )} + \frac {1}{2} \, \sqrt {\pi } \operatorname {erf}\left (x - \frac {1}{2} \, e^{4} + 4 \, e^{2} - 8\right ) e^{\left (\frac {1}{4} \, e^{8} - 4 \, e^{6} + 24 \, e^{4} - 64 \, e^{2} + 71\right )} - 4 \, \sqrt {\pi } \operatorname {erf}\left (x - \frac {1}{2} \, e^{4} + 4 \, e^{2} - 8\right ) e^{\left (\frac {1}{4} \, e^{8} - 4 \, e^{6} + 24 \, e^{4} - 64 \, e^{2} + 69\right )} + e^{\left (-x^{2} + x e^{4} - 8 \, x e^{2} + 16 \, x + 3\right )} \]

[In]

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

[Out]

-1/2*sqrt(pi)*(e^4 - 8*e^2)*erf(x - 1/2*e^4 + 4*e^2 - 8)*e^(1/4*e^8 - 4*e^6 + 24*e^4 - 64*e^2 + 67) + 1/2*sqrt
(pi)*erf(x - 1/2*e^4 + 4*e^2 - 8)*e^(1/4*e^8 - 4*e^6 + 24*e^4 - 64*e^2 + 71) - 4*sqrt(pi)*erf(x - 1/2*e^4 + 4*
e^2 - 8)*e^(1/4*e^8 - 4*e^6 + 24*e^4 - 64*e^2 + 69) + e^(-x^2 + x*e^4 - 8*x*e^2 + 16*x + 3)

Mupad [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.26 \[ \int e^{3+16 x-8 e^2 x+e^4 x-x^2} \left (16-8 e^2+e^4-2 x\right ) \, dx={\mathrm {e}}^{16\,x}\,{\mathrm {e}}^3\,{\mathrm {e}}^{-x^2}\,{\mathrm {e}}^{x\,{\mathrm {e}}^4}\,{\mathrm {e}}^{-8\,x\,{\mathrm {e}}^2} \]

[In]

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

[Out]

exp(16*x)*exp(3)*exp(-x^2)*exp(x*exp(4))*exp(-8*x*exp(2))