\(\int e^{\frac {1}{2} (-12-8 e^2+2 x+x^2)} (5+e^{\frac {1}{2} (12+8 e^2-2 x-x^2)}+5 x) \, dx\) [3313]

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

Optimal result

Integrand size = 46, antiderivative size = 22 \[ \int e^{\frac {1}{2} \left (-12-8 e^2+2 x+x^2\right )} \left (5+e^{\frac {1}{2} \left (12+8 e^2-2 x-x^2\right )}+5 x\right ) \, dx=-1+5 e^{-6-4 e^2+x+\frac {x^2}{2}}+x \]

[Out]

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

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.09, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {6820, 2268} \[ \int e^{\frac {1}{2} \left (-12-8 e^2+2 x+x^2\right )} \left (5+e^{\frac {1}{2} \left (12+8 e^2-2 x-x^2\right )}+5 x\right ) \, dx=5 e^{\frac {x^2}{2}+x-2 \left (3+2 e^2\right )}+x \]

[In]

Int[E^((-12 - 8*E^2 + 2*x + x^2)/2)*(5 + E^((12 + 8*E^2 - 2*x - x^2)/2) + 5*x),x]

[Out]

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

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 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

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

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.95 \[ \int e^{\frac {1}{2} \left (-12-8 e^2+2 x+x^2\right )} \left (5+e^{\frac {1}{2} \left (12+8 e^2-2 x-x^2\right )}+5 x\right ) \, dx=5 e^{-6-4 e^2+x+\frac {x^2}{2}}+x \]

[In]

Integrate[E^((-12 - 8*E^2 + 2*x + x^2)/2)*(5 + E^((12 + 8*E^2 - 2*x - x^2)/2) + 5*x),x]

[Out]

5*E^(-6 - 4*E^2 + x + x^2/2) + x

Maple [A] (verified)

Time = 0.67 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82

method result size
risch \(x +5 \,{\mathrm e}^{-4 \,{\mathrm e}^{2}+\frac {x^{2}}{2}+x -6}\) \(18\)
norman \(\left (5+x \,{\mathrm e}^{4 \,{\mathrm e}^{2}-\frac {x^{2}}{2}-x +6}\right ) {\mathrm e}^{-4 \,{\mathrm e}^{2}+\frac {x^{2}}{2}+x -6}\) \(38\)
parallelrisch \(\left (5+x \,{\mathrm e}^{4 \,{\mathrm e}^{2}-\frac {x^{2}}{2}-x +6}\right ) {\mathrm e}^{-4 \,{\mathrm e}^{2}+\frac {x^{2}}{2}+x -6}\) \(38\)
default \(x -\frac {5 i {\mathrm e}^{-4 \,{\mathrm e}^{2}} {\mathrm e}^{-6} \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{2}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, x}{2}+\frac {i \sqrt {2}}{2}\right )}{2}+5 \,{\mathrm e}^{-4 \,{\mathrm e}^{2}} {\mathrm e}^{-6} \left ({\mathrm e}^{\frac {1}{2} x^{2}+x}+\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{2}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, x}{2}+\frac {i \sqrt {2}}{2}\right )}{2}\right )\) \(84\)
parts \(x -\frac {5 i {\mathrm e}^{-4 \,{\mathrm e}^{2}} {\mathrm e}^{-6} \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{2}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, x}{2}+\frac {i \sqrt {2}}{2}\right )}{2}+5 \,{\mathrm e}^{-4 \,{\mathrm e}^{2}} {\mathrm e}^{-6} \left ({\mathrm e}^{\frac {1}{2} x^{2}+x}+\frac {i \sqrt {\pi }\, {\mathrm e}^{-\frac {1}{2}} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, x}{2}+\frac {i \sqrt {2}}{2}\right )}{2}\right )\) \(84\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

integrate((exp(4*exp(2)-1/2*x^2-x+6)+5*x+5)/exp(4*exp(2)-1/2*x^2-x+6),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int e^{\frac {1}{2} \left (-12-8 e^2+2 x+x^2\right )} \left (5+e^{\frac {1}{2} \left (12+8 e^2-2 x-x^2\right )}+5 x\right ) \, dx=x + 5 e^{\frac {x^{2}}{2} + x - 4 e^{2} - 6} \]

[In]

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

[Out]

x + 5*exp(x**2/2 + x - 4*exp(2) - 6)

Maxima [C] (verification not implemented)

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

Time = 0.33 (sec) , antiderivative size = 88, normalized size of antiderivative = 4.00 \[ \int e^{\frac {1}{2} \left (-12-8 e^2+2 x+x^2\right )} \left (5+e^{\frac {1}{2} \left (12+8 e^2-2 x-x^2\right )}+5 x\right ) \, dx=-\frac {5}{2} i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\frac {1}{2} i \, \sqrt {2} x + \frac {1}{2} i \, \sqrt {2}\right ) e^{\left (-4 \, e^{2} - \frac {13}{2}\right )} - \frac {5}{2} \, \sqrt {2} {\left (\frac {\sqrt {\pi } {\left (x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {-{\left (x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x + 1\right )}^{2}}} - \sqrt {2} e^{\left (\frac {1}{2} \, {\left (x + 1\right )}^{2}\right )}\right )} e^{\left (-4 \, e^{2} - \frac {13}{2}\right )} + x \]

[In]

integrate((exp(4*exp(2)-1/2*x^2-x+6)+5*x+5)/exp(4*exp(2)-1/2*x^2-x+6),x, algorithm="maxima")

[Out]

-5/2*I*sqrt(2)*sqrt(pi)*erf(1/2*I*sqrt(2)*x + 1/2*I*sqrt(2))*e^(-4*e^2 - 13/2) - 5/2*sqrt(2)*(sqrt(pi)*(x + 1)
*(erf(sqrt(1/2)*sqrt(-(x + 1)^2)) - 1)/sqrt(-(x + 1)^2) - sqrt(2)*e^(1/2*(x + 1)^2))*e^(-4*e^2 - 13/2) + x

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int e^{\frac {1}{2} \left (-12-8 e^2+2 x+x^2\right )} \left (5+e^{\frac {1}{2} \left (12+8 e^2-2 x-x^2\right )}+5 x\right ) \, dx=x + 5 \, e^{\left (\frac {1}{2} \, x^{2} + x - 4 \, e^{2} - 6\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

int(exp(x - 4*exp(2) + x^2/2 - 6)*(5*x + exp(4*exp(2) - x - x^2/2 + 6) + 5),x)

[Out]

x + 5*exp(x - 4*exp(2) + x^2/2 - 6)