3.92.30 \(\int e^{-5 x+x^2} (-240-272 x+160 x^2+e^x (88+96 x-80 x^2)+e^{2 x} (-7-7 x+10 x^2)) \, dx\)

Optimal. Leaf size=24 \[ e^{-5 x+x^2} \left (4-e^x\right )^2 (4+5 x) \]

________________________________________________________________________________________

Rubi [B]  time = 0.68, antiderivative size = 70, normalized size of antiderivative = 2.92, number of steps used = 39, number of rules used = 5, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {6742, 2234, 2204, 2240, 2241} \begin {gather*} 80 e^{x^2-5 x} x-40 e^{x^2-4 x} x+5 e^{x^2-3 x} x+64 e^{x^2-5 x}-32 e^{x^2-4 x}+4 e^{x^2-3 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^(-5*x + x^2)*(-240 - 272*x + 160*x^2 + E^x*(88 + 96*x - 80*x^2) + E^(2*x)*(-7 - 7*x + 10*x^2)),x]

[Out]

64*E^(-5*x + x^2) - 32*E^(-4*x + x^2) + 4*E^(-3*x + x^2) + 80*E^(-5*x + x^2)*x - 40*E^(-4*x + x^2)*x + 5*E^(-3
*x + x^2)*x

Rule 2204

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 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2240

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] - Dist[(b*e - 2*c*d)/(2*c), Int[F^(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e}, x] &&
 NeQ[b*e - 2*c*d, 0]

Rule 2241

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

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-240 e^{-5 x+x^2}-272 e^{-5 x+x^2} x+160 e^{-5 x+x^2} x^2-8 e^{-4 x+x^2} \left (-11-12 x+10 x^2\right )+e^{-3 x+x^2} \left (-7-7 x+10 x^2\right )\right ) \, dx\\ &=-\left (8 \int e^{-4 x+x^2} \left (-11-12 x+10 x^2\right ) \, dx\right )+160 \int e^{-5 x+x^2} x^2 \, dx-240 \int e^{-5 x+x^2} \, dx-272 \int e^{-5 x+x^2} x \, dx+\int e^{-3 x+x^2} \left (-7-7 x+10 x^2\right ) \, dx\\ &=-136 e^{-5 x+x^2}+80 e^{-5 x+x^2} x-8 \int \left (-11 e^{-4 x+x^2}-12 e^{-4 x+x^2} x+10 e^{-4 x+x^2} x^2\right ) \, dx-80 \int e^{-5 x+x^2} \, dx+400 \int e^{-5 x+x^2} x \, dx-680 \int e^{-5 x+x^2} \, dx-\frac {240 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}+\int \left (-7 e^{-3 x+x^2}-7 e^{-3 x+x^2} x+10 e^{-3 x+x^2} x^2\right ) \, dx\\ &=64 e^{-5 x+x^2}+80 e^{-5 x+x^2} x-\frac {120 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-5+2 x)\right )}{e^{25/4}}-7 \int e^{-3 x+x^2} \, dx-7 \int e^{-3 x+x^2} x \, dx+10 \int e^{-3 x+x^2} x^2 \, dx-80 \int e^{-4 x+x^2} x^2 \, dx+88 \int e^{-4 x+x^2} \, dx+96 \int e^{-4 x+x^2} x \, dx+1000 \int e^{-5 x+x^2} \, dx-\frac {80 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}-\frac {680 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}\\ &=64 e^{-5 x+x^2}+48 e^{-4 x+x^2}-\frac {7}{2} e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x-\frac {500 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-5+2 x)\right )}{e^{25/4}}-5 \int e^{-3 x+x^2} \, dx-\frac {21}{2} \int e^{-3 x+x^2} \, dx+15 \int e^{-3 x+x^2} x \, dx+40 \int e^{-4 x+x^2} \, dx-160 \int e^{-4 x+x^2} x \, dx+192 \int e^{-4 x+x^2} \, dx+\frac {1000 \int e^{\frac {1}{4} (-5+2 x)^2} \, dx}{e^{25/4}}+\frac {88 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}-\frac {7 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{e^{9/4}}\\ &=64 e^{-5 x+x^2}-32 e^{-4 x+x^2}+4 e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x-\frac {44 \sqrt {\pi } \text {erfi}(2-x)}{e^4}-\frac {7 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-3+2 x)\right )}{2 e^{9/4}}+\frac {45}{2} \int e^{-3 x+x^2} \, dx-320 \int e^{-4 x+x^2} \, dx+\frac {40 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}+\frac {192 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}-\frac {5 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{e^{9/4}}-\frac {21 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{2 e^{9/4}}\\ &=64 e^{-5 x+x^2}-32 e^{-4 x+x^2}+4 e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x-\frac {160 \sqrt {\pi } \text {erfi}(2-x)}{e^4}-\frac {45 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-3+2 x)\right )}{4 e^{9/4}}-\frac {320 \int e^{\frac {1}{4} (-4+2 x)^2} \, dx}{e^4}+\frac {45 \int e^{\frac {1}{4} (-3+2 x)^2} \, dx}{2 e^{9/4}}\\ &=64 e^{-5 x+x^2}-32 e^{-4 x+x^2}+4 e^{-3 x+x^2}+80 e^{-5 x+x^2} x-40 e^{-4 x+x^2} x+5 e^{-3 x+x^2} x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.23, size = 20, normalized size = 0.83 \begin {gather*} e^{(-5+x) x} \left (-4+e^x\right )^2 (4+5 x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^(-5*x + x^2)*(-240 - 272*x + 160*x^2 + E^x*(88 + 96*x - 80*x^2) + E^(2*x)*(-7 - 7*x + 10*x^2)),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.83, size = 33, normalized size = 1.38 \begin {gather*} {\left ({\left (5 \, x + 4\right )} e^{\left (2 \, x\right )} - 8 \, {\left (5 \, x + 4\right )} e^{x} + 80 \, x + 64\right )} e^{\left (x^{2} - 5 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((10*x^2-7*x-7)*exp(x)^2+(-80*x^2+96*x+88)*exp(x)+160*x^2-272*x-240)*exp(x^2-5*x),x, algorithm="fric
as")

[Out]

((5*x + 4)*e^(2*x) - 8*(5*x + 4)*e^x + 80*x + 64)*e^(x^2 - 5*x)

________________________________________________________________________________________

giac [B]  time = 0.14, size = 64, normalized size = 2.67 \begin {gather*} 5 \, x e^{\left (x^{2} - 3 \, x\right )} - 40 \, x e^{\left (x^{2} - 4 \, x\right )} + 80 \, x e^{\left (x^{2} - 5 \, x\right )} + 4 \, e^{\left (x^{2} - 3 \, x\right )} - 32 \, e^{\left (x^{2} - 4 \, x\right )} + 64 \, e^{\left (x^{2} - 5 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((10*x^2-7*x-7)*exp(x)^2+(-80*x^2+96*x+88)*exp(x)+160*x^2-272*x-240)*exp(x^2-5*x),x, algorithm="giac
")

[Out]

5*x*e^(x^2 - 3*x) - 40*x*e^(x^2 - 4*x) + 80*x*e^(x^2 - 5*x) + 4*e^(x^2 - 3*x) - 32*e^(x^2 - 4*x) + 64*e^(x^2 -
 5*x)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 35, normalized size = 1.46




method result size



risch \(\left (5 x \,{\mathrm e}^{2 x}-40 \,{\mathrm e}^{x} x +4 \,{\mathrm e}^{2 x}+80 x -32 \,{\mathrm e}^{x}+64\right ) {\mathrm e}^{\left (x -5\right ) x}\) \(35\)
default \(64 \,{\mathrm e}^{x^{2}-5 x}+80 x \,{\mathrm e}^{x^{2}-5 x}-32 \,{\mathrm e}^{x^{2}-4 x}-40 x \,{\mathrm e}^{x^{2}-4 x}+4 \,{\mathrm e}^{x^{2}-3 x}+5 x \,{\mathrm e}^{x^{2}-3 x}\) \(65\)
norman \(80 x \,{\mathrm e}^{x^{2}-5 x}-32 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}-5 x}+4 \,{\mathrm e}^{2 x} {\mathrm e}^{x^{2}-5 x}+5 x \,{\mathrm e}^{2 x} {\mathrm e}^{x^{2}-5 x}-40 \,{\mathrm e}^{x} x \,{\mathrm e}^{x^{2}-5 x}+64 \,{\mathrm e}^{x^{2}-5 x}\) \(77\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((10*x^2-7*x-7)*exp(x)^2+(-80*x^2+96*x+88)*exp(x)+160*x^2-272*x-240)*exp(x^2-5*x),x,method=_RETURNVERBOSE)

[Out]

(5*x*exp(2*x)-40*exp(x)*x+4*exp(2*x)+80*x-32*exp(x)+64)*exp((x-5)*x)

________________________________________________________________________________________

maxima [C]  time = 0.45, size = 424, normalized size = 17.67 \begin {gather*} \frac {7}{2} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - \frac {3}{2} i\right ) e^{\left (-\frac {9}{4}\right )} - 44 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - 2 i\right ) e^{\left (-4\right )} + 120 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x - \frac {5}{2} i\right ) e^{\left (-\frac {25}{4}\right )} - \frac {5}{4} \, {\left (\frac {4 \, {\left (2 \, x - 3\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x - 3\right )}^{2}\right )}{\left (-{\left (2 \, x - 3\right )}^{2}\right )^{\frac {3}{2}}} - \frac {9 \, \sqrt {\pi } {\left (2 \, x - 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 3\right )}^{2}}} - 12 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 3\right )}^{2}\right )}\right )} e^{\left (-\frac {9}{4}\right )} - \frac {7}{4} \, {\left (\frac {3 \, \sqrt {\pi } {\left (2 \, x - 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 3\right )}^{2}}} + 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 3\right )}^{2}\right )}\right )} e^{\left (-\frac {9}{4}\right )} + 40 \, {\left (\frac {{\left (x - 2\right )}^{3} \Gamma \left (\frac {3}{2}, -{\left (x - 2\right )}^{2}\right )}{\left (-{\left (x - 2\right )}^{2}\right )^{\frac {3}{2}}} - \frac {4 \, \sqrt {\pi } {\left (x - 2\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x - 2\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x - 2\right )}^{2}}} - 4 \, e^{\left ({\left (x - 2\right )}^{2}\right )}\right )} e^{\left (-4\right )} + 48 \, {\left (\frac {2 \, \sqrt {\pi } {\left (x - 2\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x - 2\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x - 2\right )}^{2}}} + e^{\left ({\left (x - 2\right )}^{2}\right )}\right )} e^{\left (-4\right )} - 20 \, {\left (\frac {4 \, {\left (2 \, x - 5\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x - 5\right )}^{2}\right )}{\left (-{\left (2 \, x - 5\right )}^{2}\right )^{\frac {3}{2}}} - \frac {25 \, \sqrt {\pi } {\left (2 \, x - 5\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 5\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 5\right )}^{2}}} - 20 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 5\right )}^{2}\right )}\right )} e^{\left (-\frac {25}{4}\right )} - 68 \, {\left (\frac {5 \, \sqrt {\pi } {\left (2 \, x - 5\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x - 5\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x - 5\right )}^{2}}} + 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x - 5\right )}^{2}\right )}\right )} e^{\left (-\frac {25}{4}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((10*x^2-7*x-7)*exp(x)^2+(-80*x^2+96*x+88)*exp(x)+160*x^2-272*x-240)*exp(x^2-5*x),x, algorithm="maxi
ma")

[Out]

7/2*I*sqrt(pi)*erf(I*x - 3/2*I)*e^(-9/4) - 44*I*sqrt(pi)*erf(I*x - 2*I)*e^(-4) + 120*I*sqrt(pi)*erf(I*x - 5/2*
I)*e^(-25/4) - 5/4*(4*(2*x - 3)^3*gamma(3/2, -1/4*(2*x - 3)^2)/(-(2*x - 3)^2)^(3/2) - 9*sqrt(pi)*(2*x - 3)*(er
f(1/2*sqrt(-(2*x - 3)^2)) - 1)/sqrt(-(2*x - 3)^2) - 12*e^(1/4*(2*x - 3)^2))*e^(-9/4) - 7/4*(3*sqrt(pi)*(2*x -
3)*(erf(1/2*sqrt(-(2*x - 3)^2)) - 1)/sqrt(-(2*x - 3)^2) + 2*e^(1/4*(2*x - 3)^2))*e^(-9/4) + 40*((x - 2)^3*gamm
a(3/2, -(x - 2)^2)/(-(x - 2)^2)^(3/2) - 4*sqrt(pi)*(x - 2)*(erf(sqrt(-(x - 2)^2)) - 1)/sqrt(-(x - 2)^2) - 4*e^
((x - 2)^2))*e^(-4) + 48*(2*sqrt(pi)*(x - 2)*(erf(sqrt(-(x - 2)^2)) - 1)/sqrt(-(x - 2)^2) + e^((x - 2)^2))*e^(
-4) - 20*(4*(2*x - 5)^3*gamma(3/2, -1/4*(2*x - 5)^2)/(-(2*x - 5)^2)^(3/2) - 25*sqrt(pi)*(2*x - 5)*(erf(1/2*sqr
t(-(2*x - 5)^2)) - 1)/sqrt(-(2*x - 5)^2) - 20*e^(1/4*(2*x - 5)^2))*e^(-25/4) - 68*(5*sqrt(pi)*(2*x - 5)*(erf(1
/2*sqrt(-(2*x - 5)^2)) - 1)/sqrt(-(2*x - 5)^2) + 2*e^(1/4*(2*x - 5)^2))*e^(-25/4)

________________________________________________________________________________________

mupad [B]  time = 8.71, size = 20, normalized size = 0.83 \begin {gather*} {\mathrm {e}}^{x^2-5\,x}\,\left (5\,x+4\right )\,{\left ({\mathrm {e}}^x-4\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-exp(x^2 - 5*x)*(272*x + exp(2*x)*(7*x - 10*x^2 + 7) - exp(x)*(96*x - 80*x^2 + 88) - 160*x^2 + 240),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.29, size = 39, normalized size = 1.62 \begin {gather*} \left (5 x e^{2 x} - 40 x e^{x} + 80 x + 4 e^{2 x} - 32 e^{x} + 64\right ) e^{x^{2} - 5 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((10*x**2-7*x-7)*exp(x)**2+(-80*x**2+96*x+88)*exp(x)+160*x**2-272*x-240)*exp(x**2-5*x),x)

[Out]

(5*x*exp(2*x) - 40*x*exp(x) + 80*x + 4*exp(2*x) - 32*exp(x) + 64)*exp(x**2 - 5*x)

________________________________________________________________________________________