3.59.79 \(\int e^{-4 x-x^2} (2-10 x+2 x^3+(9-2 x^2) (i \pi +\log (6))) \, dx\)

Optimal. Leaf size=23 \[ e^{-x (4+x)} (-2+x) (i \pi -x+\log (6)) \]

________________________________________________________________________________________

Rubi [C]  time = 0.65, antiderivative size = 138, normalized size of antiderivative = 6.00, number of steps used = 24, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {6741, 6742, 2240, 2234, 2205, 2241} \begin {gather*} -e^4 \sqrt {\pi } \text {erf}(x+2)+\frac {1}{2} e^4 \sqrt {\pi } (2+9 i \pi +9 \log (6)) \text {erf}(x+2)-\frac {9}{2} e^4 \sqrt {\pi } (\log (6)+i \pi ) \text {erf}(x+2)-e^{-x^2-4 x} x^2+2 e^{-x^2-4 x} x+e^{-x^2-4 x} x (\log (6)+i \pi )-2 e^{-x^2-4 x} (\log (6)+i \pi ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^(-4*x - x^2)*(2 - 10*x + 2*x^3 + (9 - 2*x^2)*(I*Pi + Log[6])),x]

[Out]

2*E^(-4*x - x^2)*x - E^(-4*x - x^2)*x^2 - E^4*Sqrt[Pi]*Erf[2 + x] - 2*E^(-4*x - x^2)*(I*Pi + Log[6]) + E^(-4*x
 - x^2)*x*(I*Pi + Log[6]) - (9*E^4*Sqrt[Pi]*Erf[2 + x]*(I*Pi + Log[6]))/2 + (E^4*Sqrt[Pi]*Erf[2 + x]*(2 + (9*I
)*Pi + 9*Log[6]))/2

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[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 6741

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

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 e^{-4 x-x^2} \left (2+9 i \pi -10 x+2 x^3+9 \log (6)-2 x^2 (i \pi +\log (6))\right ) \, dx\\ &=\int \left (-10 e^{-4 x-x^2} x+2 e^{-4 x-x^2} x^3-2 i e^{-4 x-x^2} x^2 (\pi -i \log (6))+2 e^{-4 x-x^2} \left (1+\frac {9}{2} (i \pi +\log (6))\right )\right ) \, dx\\ &=2 \int e^{-4 x-x^2} x^3 \, dx-10 \int e^{-4 x-x^2} x \, dx-(2 i (\pi -i \log (6))) \int e^{-4 x-x^2} x^2 \, dx+(2+9 i \pi +9 \log (6)) \int e^{-4 x-x^2} \, dx\\ &=5 e^{-4 x-x^2}-e^{-4 x-x^2} x^2+e^{-4 x-x^2} x (i \pi +\log (6))+2 \int e^{-4 x-x^2} x \, dx-4 \int e^{-4 x-x^2} x^2 \, dx+20 \int e^{-4 x-x^2} \, dx-(i \pi +\log (6)) \int e^{-4 x-x^2} \, dx+(4 (i \pi +\log (6))) \int e^{-4 x-x^2} x \, dx+\left (e^4 (2+9 i \pi +9 \log (6))\right ) \int e^{-\frac {1}{4} (-4-2 x)^2} \, dx\\ &=4 e^{-4 x-x^2}+2 e^{-4 x-x^2} x-e^{-4 x-x^2} x^2-2 e^{-4 x-x^2} (i \pi +\log (6))+e^{-4 x-x^2} x (i \pi +\log (6))+\frac {1}{2} e^4 \sqrt {\pi } \text {erf}(2+x) (2+9 i \pi +9 \log (6))-2 \int e^{-4 x-x^2} \, dx-4 \int e^{-4 x-x^2} \, dx+8 \int e^{-4 x-x^2} x \, dx+\left (20 e^4\right ) \int e^{-\frac {1}{4} (-4-2 x)^2} \, dx-(8 (i \pi +\log (6))) \int e^{-4 x-x^2} \, dx-\left (e^4 (i \pi +\log (6))\right ) \int e^{-\frac {1}{4} (-4-2 x)^2} \, dx\\ &=2 e^{-4 x-x^2} x-e^{-4 x-x^2} x^2+10 e^4 \sqrt {\pi } \text {erf}(2+x)-2 e^{-4 x-x^2} (i \pi +\log (6))+e^{-4 x-x^2} x (i \pi +\log (6))-\frac {1}{2} e^4 \sqrt {\pi } \text {erf}(2+x) (i \pi +\log (6))+\frac {1}{2} e^4 \sqrt {\pi } \text {erf}(2+x) (2+9 i \pi +9 \log (6))-16 \int e^{-4 x-x^2} \, dx-\left (2 e^4\right ) \int e^{-\frac {1}{4} (-4-2 x)^2} \, dx-\left (4 e^4\right ) \int e^{-\frac {1}{4} (-4-2 x)^2} \, dx-\left (8 e^4 (i \pi +\log (6))\right ) \int e^{-\frac {1}{4} (-4-2 x)^2} \, dx\\ &=2 e^{-4 x-x^2} x-e^{-4 x-x^2} x^2+7 e^4 \sqrt {\pi } \text {erf}(2+x)-2 e^{-4 x-x^2} (i \pi +\log (6))+e^{-4 x-x^2} x (i \pi +\log (6))-\frac {9}{2} e^4 \sqrt {\pi } \text {erf}(2+x) (i \pi +\log (6))+\frac {1}{2} e^4 \sqrt {\pi } \text {erf}(2+x) (2+9 i \pi +9 \log (6))-\left (16 e^4\right ) \int e^{-\frac {1}{4} (-4-2 x)^2} \, dx\\ &=2 e^{-4 x-x^2} x-e^{-4 x-x^2} x^2-e^4 \sqrt {\pi } \text {erf}(2+x)-2 e^{-4 x-x^2} (i \pi +\log (6))+e^{-4 x-x^2} x (i \pi +\log (6))-\frac {9}{2} e^4 \sqrt {\pi } \text {erf}(2+x) (i \pi +\log (6))+\frac {1}{2} e^4 \sqrt {\pi } \text {erf}(2+x) (2+9 i \pi +9 \log (6))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.38, size = 24, normalized size = 1.04 \begin {gather*} -e^{-x (4+x)} (-2+x) (-i \pi +x-\log (6)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^(-4*x - x^2)*(2 - 10*x + 2*x^3 + (9 - 2*x^2)*(I*Pi + Log[6])),x]

[Out]

-(((-2 + x)*((-I)*Pi + x - Log[6]))/E^(x*(4 + x)))

________________________________________________________________________________________

fricas [A]  time = 1.00, size = 33, normalized size = 1.43 \begin {gather*} {\left (-2 i \, \pi + {\left (i \, \pi + 2\right )} x - x^{2} + {\left (x - 2\right )} \log \relax (6)\right )} e^{\left (-x^{2} - 4 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^2+9)*(log(6)+I*pi)+2*x^3-10*x+2)/exp(x^2+4*x),x, algorithm="fricas")

[Out]

(-2*I*pi + (I*pi + 2)*x - x^2 + (x - 2)*log(6))*e^(-x^2 - 4*x)

________________________________________________________________________________________

giac [B]  time = 0.14, size = 44, normalized size = 1.91 \begin {gather*} {\left (-4 i \, \pi - {\left (x + 2\right )}^{2} - \pi {\left (-i \, x - 2 i\right )} + {\left (x + 2\right )} \log \relax (6) + 6 \, x - 4 \, \log \relax (6) + 4\right )} e^{\left (-x^{2} - 4 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^2+9)*(log(6)+I*pi)+2*x^3-10*x+2)/exp(x^2+4*x),x, algorithm="giac")

[Out]

(-4*I*pi - (x + 2)^2 - pi*(-I*x - 2*I) + (x + 2)*log(6) + 6*x - 4*log(6) + 4)*e^(-x^2 - 4*x)

________________________________________________________________________________________

maple [A]  time = 0.15, size = 36, normalized size = 1.57




method result size



norman \(\left (\left (i \pi +\ln \relax (6)+2\right ) x -x^{2}-2 i \pi -2 \ln \relax (6)\right ) {\mathrm e}^{-x^{2}-4 x}\) \(36\)
risch \(\left (-2 i \pi -2 \ln \relax (2)-2 \ln \relax (3)+i x \pi +x \ln \relax (2)+x \ln \relax (3)+2 x -x^{2}\right ) {\mathrm e}^{-\left (4+x \right ) x}\) \(43\)
default \(\frac {9 i \pi ^{\frac {3}{2}} {\mathrm e}^{4} \erf \left (2+x \right )}{2}-2 i \pi \left (-\frac {x \,{\mathrm e}^{-x^{2}-4 x}}{2}+{\mathrm e}^{-x^{2}-4 x}+\frac {9 \sqrt {\pi }\, {\mathrm e}^{4} \erf \left (2+x \right )}{4}\right )-x^{2} {\mathrm e}^{-x^{2}-4 x}+2 x \,{\mathrm e}^{-x^{2}-4 x}+\ln \relax (6) x \,{\mathrm e}^{-x^{2}-4 x}-2 \ln \relax (6) {\mathrm e}^{-x^{2}-4 x}\) \(109\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x^2+9)*(ln(6)+I*Pi)+2*x^3-10*x+2)/exp(x^2+4*x),x,method=_RETURNVERBOSE)

[Out]

((I*Pi+ln(6)+2)*x-x^2-2*I*Pi-2*ln(6))/exp(x^2+4*x)

________________________________________________________________________________________

maxima [C]  time = 0.45, size = 269, normalized size = 11.70 \begin {gather*} \frac {9}{2} i \, \pi ^{\frac {3}{2}} \operatorname {erf}\left (x + 2\right ) e^{4} + \frac {9}{2} \, \sqrt {\pi } \operatorname {erf}\left (x + 2\right ) e^{4} \log \relax (6) + \pi {\left (\frac {i \, {\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 i \, \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 i \, e^{\left (-{\left (x + 2\right )}^{2}\right )}\right )} e^{4} - i \, {\left (\frac {i \, {\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 i \, \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 i \, e^{\left (-{\left (x + 2\right )}^{2}\right )}\right )} e^{4} \log \relax (6) + \sqrt {\pi } \operatorname {erf}\left (x + 2\right ) e^{4} + i \, {\left (-\frac {6 i \, {\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 {8 i \, \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}}} + 12 i \, e^{\left (-{\left (x + 2\right )}^{2}\right )} + i \, \Gamma \left (2, {\left (x + 2\right )}^{2}\right )\right )} e^{4} - 5 i \, {\left (\frac {2 i \, \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}}} + i \, e^{\left (-{\left (x + 2\right )}^{2}\right )}\right )} e^{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^2+9)*(log(6)+I*pi)+2*x^3-10*x+2)/exp(x^2+4*x),x, algorithm="maxima")

[Out]

9/2*I*pi^(3/2)*erf(x + 2)*e^4 + 9/2*sqrt(pi)*erf(x + 2)*e^4*log(6) + pi*(I*(x + 2)^3*gamma(3/2, (x + 2)^2)/((x
 + 2)^2)^(3/2) - 4*I*sqrt(pi)*(x + 2)*(erf(sqrt((x + 2)^2)) - 1)/sqrt((x + 2)^2) - 4*I*e^(-(x + 2)^2))*e^4 - I
*(I*(x + 2)^3*gamma(3/2, (x + 2)^2)/((x + 2)^2)^(3/2) - 4*I*sqrt(pi)*(x + 2)*(erf(sqrt((x + 2)^2)) - 1)/sqrt((
x + 2)^2) - 4*I*e^(-(x + 2)^2))*e^4*log(6) + sqrt(pi)*erf(x + 2)*e^4 + I*(-6*I*(x + 2)^3*gamma(3/2, (x + 2)^2)
/((x + 2)^2)^(3/2) + 8*I*sqrt(pi)*(x + 2)*(erf(sqrt((x + 2)^2)) - 1)/sqrt((x + 2)^2) + 12*I*e^(-(x + 2)^2) + I
*gamma(2, (x + 2)^2))*e^4 - 5*I*(2*I*sqrt(pi)*(x + 2)*(erf(sqrt((x + 2)^2)) - 1)/sqrt((x + 2)^2) + I*e^(-(x +
2)^2))*e^4

________________________________________________________________________________________

mupad [B]  time = 0.14, size = 24, normalized size = 1.04 \begin {gather*} {\mathrm {e}}^{-x^2-4\,x}\,\left (x-2\right )\,\left (\ln \relax (6)-x+\Pi \,1{}\mathrm {i}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-exp(- 4*x - x^2)*(10*x + (Pi*1i + log(6))*(2*x^2 - 9) - 2*x^3 - 2),x)

[Out]

exp(- 4*x - x^2)*(x - 2)*(Pi*1i - x + log(6))

________________________________________________________________________________________

sympy [B]  time = 0.36, size = 63, normalized size = 2.74 \begin {gather*} - \left (x^{2} e^{- 4 x} - 2 x e^{- 4 x} - x e^{- 4 x} \log {\relax (6 )} - i \pi x e^{- 4 x} + 2 e^{- 4 x} \log {\relax (6 )} + 2 i \pi e^{- 4 x}\right ) e^{- x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x**2+9)*(ln(6)+I*pi)+2*x**3-10*x+2)/exp(x**2+4*x),x)

[Out]

-(x**2*exp(-4*x) - 2*x*exp(-4*x) - x*exp(-4*x)*log(6) - I*pi*x*exp(-4*x) + 2*exp(-4*x)*log(6) + 2*I*pi*exp(-4*
x))*exp(-x**2)

________________________________________________________________________________________