\(\int e^{-5+x^2} (-4 x+e^5 (1-12 x-2 e x+2 e^3 x+2 x^2)) \, dx\) [6880]

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.60, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2258, 2235, 2240, 2243} \[ \int e^{-5+x^2} \left (-4 x+e^5 \left (1-12 x-2 e x+2 e^3 x+2 x^2\right )\right ) \, dx=e^{x^2} x-\left (2+6 e^5+e^6-e^8\right ) e^{x^2-5} \]

[In]

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

[Out]

-(E^(-5 + x^2)*(2 + 6*E^5 + E^6 - E^8)) + E^x^2*x

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2240

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

Rule 2243

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
- n + 1)*(F^(a + b*(c + d*x)^n)/(b*d*n*Log[F])), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 2258

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(u_), x_Symbol] :> Int[ExpandLinearProduct[F^(a + b*(c + d*
x)^n), u, c, d, x], x] /; FreeQ[{F, a, b, c, d, n}, x] && PolynomialQ[u, x]

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

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.25 \[ \int e^{-5+x^2} \left (-4 x+e^5 \left (1-12 x-2 e x+2 e^3 x+2 x^2\right )\right ) \, dx=e^{-5+x^2} \left (-2-e^6+e^8+e^5 (-6+x)\right ) \]

[In]

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

[Out]

E^(-5 + x^2)*(-2 - E^6 + E^8 + E^5*(-6 + x))

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20

method result size
risch \(\left ({\mathrm e}^{8}-{\mathrm e}^{6}+x \,{\mathrm e}^{5}-6 \,{\mathrm e}^{5}-2\right ) {\mathrm e}^{x^{2}-5}\) \(24\)
gosper \({\mathrm e}^{x^{2}} \left (x \,{\mathrm e}^{5}+{\mathrm e}^{3} {\mathrm e}^{5}-{\mathrm e} \,{\mathrm e}^{5}-6 \,{\mathrm e}^{5}-2\right ) {\mathrm e}^{-5}\) \(31\)
norman \({\mathrm e}^{x^{2}} x +\left ({\mathrm e}^{3} {\mathrm e}^{5}-{\mathrm e} \,{\mathrm e}^{5}-6 \,{\mathrm e}^{5}-2\right ) {\mathrm e}^{-5} {\mathrm e}^{x^{2}}\) \(34\)
parallelrisch \({\mathrm e}^{-5} \left ({\mathrm e}^{3} {\mathrm e}^{5} {\mathrm e}^{x^{2}}-{\mathrm e} \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}+{\mathrm e}^{x^{2}} x \,{\mathrm e}^{5}-6 \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}-2 \,{\mathrm e}^{x^{2}}\right )\) \(48\)
meijerg \(\frac {\sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{2}-\frac {\left (2 \,{\mathrm e}^{8}-2 \,{\mathrm e}^{6}-12 \,{\mathrm e}^{5}-4\right ) {\mathrm e}^{-5} \left (1-{\mathrm e}^{x^{2}}\right )}{2}+i \left (-i {\mathrm e}^{x^{2}} x +\frac {i \sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{2}\right )\) \(55\)
default \({\mathrm e}^{-5} \left (\frac {{\mathrm e}^{5} \sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{2}-2 \,{\mathrm e}^{x^{2}}+2 \,{\mathrm e}^{5} \left (\frac {{\mathrm e}^{x^{2}} x}{2}-\frac {\sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{4}\right )-6 \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}-{\mathrm e} \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}+{\mathrm e}^{3} {\mathrm e}^{5} {\mathrm e}^{x^{2}}\right )\) \(68\)
parts \(\sqrt {\pi }\, \operatorname {erfi}\left (x \right ) {\mathrm e}^{3} x -\sqrt {\pi }\, \operatorname {erfi}\left (x \right ) {\mathrm e} x +\sqrt {\pi }\, \operatorname {erfi}\left (x \right ) x^{2}-6 x \sqrt {\pi }\, \operatorname {erfi}\left (x \right )+\frac {\sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{2}-2 \,{\mathrm e}^{-5} \sqrt {\pi }\, \operatorname {erfi}\left (x \right ) x -\frac {\left (2 \sqrt {\pi }\, {\mathrm e}^{5} {\mathrm e}^{3} x \,\operatorname {erfi}\left (x \right )-2 \sqrt {\pi }\, {\mathrm e}^{5} {\mathrm e} x \,\operatorname {erfi}\left (x \right )+2 x^{2} \operatorname {erfi}\left (x \right ) \sqrt {\pi }\, {\mathrm e}^{5}-12 \sqrt {\pi }\, {\mathrm e}^{5} x \,\operatorname {erfi}\left (x \right )+{\mathrm e}^{5} \sqrt {\pi }\, \operatorname {erfi}\left (x \right )-4 x \sqrt {\pi }\, \operatorname {erfi}\left (x \right )-2 \,{\mathrm e}^{3} {\mathrm e}^{5} {\mathrm e}^{x^{2}}+2 \,{\mathrm e} \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}-2 \,{\mathrm e}^{x^{2}} x \,{\mathrm e}^{5}+12 \,{\mathrm e}^{5} {\mathrm e}^{x^{2}}+4 \,{\mathrm e}^{x^{2}}\right ) {\mathrm e}^{-5}}{2}\) \(169\)

[In]

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

[Out]

(exp(8)-exp(6)+x*exp(5)-6*exp(5)-2)*exp(x^2-5)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

((x - 6)*e^5 + e^8 - e^6 - 2)*e^(x^2 - 5)

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

(x*exp(5) - 6*exp(5) - exp(6) - 2 + exp(8))*exp(-5)*exp(x**2)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.75 \[ \int e^{-5+x^2} \left (-4 x+e^5 \left (1-12 x-2 e x+2 e^3 x+2 x^2\right )\right ) \, dx=x e^{\left (x^{2}\right )} + e^{\left (x^{2} + 3\right )} - e^{\left (x^{2} + 1\right )} - 2 \, e^{\left (x^{2} - 5\right )} - 6 \, e^{\left (x^{2}\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

-exp(x^2 - 5)*(6*exp(5) + exp(6) - exp(8) - x*exp(5) + 2)