3.727 \(\int e^{-x^2} (x^4+x^6+x^8) \, dx\)

Optimal. Leaf size=66 \[ \frac{147}{32} \sqrt{\pi } \text{Erf}(x)-\frac{1}{2} e^{-x^2} x^7-\frac{9}{4} e^{-x^2} x^5-\frac{49}{8} e^{-x^2} x^3-\frac{147}{16} e^{-x^2} x \]

[Out]

(-147*x)/(16*E^x^2) - (49*x^3)/(8*E^x^2) - (9*x^5)/(4*E^x^2) - x^7/(2*E^x^2) + (147*Sqrt[Pi]*Erf[x])/32

________________________________________________________________________________________

Rubi [A]  time = 0.183538, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 15, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {1594, 2226, 2212, 2205} \[ \frac{147}{32} \sqrt{\pi } \text{Erf}(x)-\frac{1}{2} e^{-x^2} x^7-\frac{9}{4} e^{-x^2} x^5-\frac{49}{8} e^{-x^2} x^3-\frac{147}{16} e^{-x^2} x \]

Antiderivative was successfully verified.

[In]

Int[(x^4 + x^6 + x^8)/E^x^2,x]

[Out]

(-147*x)/(16*E^x^2) - (49*x^3)/(8*E^x^2) - (9*x^5)/(4*E^x^2) - x^7/(2*E^x^2) + (147*Sqrt[Pi]*Erf[x])/32

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2226

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]

Rule 2212

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 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]

Rubi steps

\begin{align*} \int e^{-x^2} \left (x^4+x^6+x^8\right ) \, dx &=\int e^{-x^2} x^4 \left (1+x^2+x^4\right ) \, dx\\ &=\int \left (e^{-x^2} x^4+e^{-x^2} x^6+e^{-x^2} x^8\right ) \, dx\\ &=\int e^{-x^2} x^4 \, dx+\int e^{-x^2} x^6 \, dx+\int e^{-x^2} x^8 \, dx\\ &=-\frac{1}{2} e^{-x^2} x^3-\frac{1}{2} e^{-x^2} x^5-\frac{1}{2} e^{-x^2} x^7+\frac{3}{2} \int e^{-x^2} x^2 \, dx+\frac{5}{2} \int e^{-x^2} x^4 \, dx+\frac{7}{2} \int e^{-x^2} x^6 \, dx\\ &=-\frac{3}{4} e^{-x^2} x-\frac{7}{4} e^{-x^2} x^3-\frac{9}{4} e^{-x^2} x^5-\frac{1}{2} e^{-x^2} x^7+\frac{3}{4} \int e^{-x^2} \, dx+\frac{15}{4} \int e^{-x^2} x^2 \, dx+\frac{35}{4} \int e^{-x^2} x^4 \, dx\\ &=-\frac{21}{8} e^{-x^2} x-\frac{49}{8} e^{-x^2} x^3-\frac{9}{4} e^{-x^2} x^5-\frac{1}{2} e^{-x^2} x^7+\frac{3}{8} \sqrt{\pi } \text{erf}(x)+\frac{15}{8} \int e^{-x^2} \, dx+\frac{105}{8} \int e^{-x^2} x^2 \, dx\\ &=-\frac{147}{16} e^{-x^2} x-\frac{49}{8} e^{-x^2} x^3-\frac{9}{4} e^{-x^2} x^5-\frac{1}{2} e^{-x^2} x^7+\frac{21}{16} \sqrt{\pi } \text{erf}(x)+\frac{105}{16} \int e^{-x^2} \, dx\\ &=-\frac{147}{16} e^{-x^2} x-\frac{49}{8} e^{-x^2} x^3-\frac{9}{4} e^{-x^2} x^5-\frac{1}{2} e^{-x^2} x^7+\frac{147}{32} \sqrt{\pi } \text{erf}(x)\\ \end{align*}

Mathematica [A]  time = 0.0229439, size = 41, normalized size = 0.62 \[ \frac{1}{32} \left (147 \sqrt{\pi } \text{Erf}(x)-2 e^{-x^2} x \left (8 x^6+36 x^4+98 x^2+147\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(x^4 + x^6 + x^8)/E^x^2,x]

[Out]

((-2*x*(147 + 98*x^2 + 36*x^4 + 8*x^6))/E^x^2 + 147*Sqrt[Pi]*Erf[x])/32

________________________________________________________________________________________

Maple [A]  time = 0.025, size = 51, normalized size = 0.8 \begin{align*} -{\frac{147\,x}{16\,{{\rm e}^{{x}^{2}}}}}-{\frac{49\,{x}^{3}}{8\,{{\rm e}^{{x}^{2}}}}}-{\frac{9\,{x}^{5}}{4\,{{\rm e}^{{x}^{2}}}}}-{\frac{{x}^{7}}{2\,{{\rm e}^{{x}^{2}}}}}+{\frac{147\,{\it Erf} \left ( x \right ) \sqrt{\pi }}{32}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^8+x^6+x^4)/exp(x^2),x)

[Out]

-147/16*x/exp(x^2)-49/8*x^3/exp(x^2)-9/4*x^5/exp(x^2)-1/2*x^7/exp(x^2)+147/32*erf(x)*Pi^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 0.975671, size = 100, normalized size = 1.52 \begin{align*} -\frac{1}{16} \,{\left (8 \, x^{7} + 28 \, x^{5} + 70 \, x^{3} + 105 \, x\right )} e^{\left (-x^{2}\right )} - \frac{1}{8} \,{\left (4 \, x^{5} + 10 \, x^{3} + 15 \, x\right )} e^{\left (-x^{2}\right )} - \frac{1}{4} \,{\left (2 \, x^{3} + 3 \, x\right )} e^{\left (-x^{2}\right )} + \frac{147}{32} \, \sqrt{\pi } \operatorname{erf}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^8+x^6+x^4)/exp(x^2),x, algorithm="maxima")

[Out]

-1/16*(8*x^7 + 28*x^5 + 70*x^3 + 105*x)*e^(-x^2) - 1/8*(4*x^5 + 10*x^3 + 15*x)*e^(-x^2) - 1/4*(2*x^3 + 3*x)*e^
(-x^2) + 147/32*sqrt(pi)*erf(x)

________________________________________________________________________________________

Fricas [A]  time = 0.754979, size = 101, normalized size = 1.53 \begin{align*} -\frac{1}{16} \,{\left (8 \, x^{7} + 36 \, x^{5} + 98 \, x^{3} + 147 \, x\right )} e^{\left (-x^{2}\right )} + \frac{147}{32} \, \sqrt{\pi } \operatorname{erf}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^8+x^6+x^4)/exp(x^2),x, algorithm="fricas")

[Out]

-1/16*(8*x^7 + 36*x^5 + 98*x^3 + 147*x)*e^(-x^2) + 147/32*sqrt(pi)*erf(x)

________________________________________________________________________________________

Sympy [A]  time = 158.37, size = 54, normalized size = 0.82 \begin{align*} - \frac{x^{7} e^{- x^{2}}}{2} - \frac{9 x^{5} e^{- x^{2}}}{4} - \frac{49 x^{3} e^{- x^{2}}}{8} - \frac{147 x e^{- x^{2}}}{16} + \frac{147 \sqrt{\pi } \operatorname{erf}{\left (x \right )}}{32} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**8+x**6+x**4)/exp(x**2),x)

[Out]

-x**7*exp(-x**2)/2 - 9*x**5*exp(-x**2)/4 - 49*x**3*exp(-x**2)/8 - 147*x*exp(-x**2)/16 + 147*sqrt(pi)*erf(x)/32

________________________________________________________________________________________

Giac [A]  time = 1.22418, size = 47, normalized size = 0.71 \begin{align*} -\frac{1}{16} \,{\left (8 \, x^{7} + 36 \, x^{5} + 98 \, x^{3} + 147 \, x\right )} e^{\left (-x^{2}\right )} + \frac{147}{32} \, \sqrt{\pi } \operatorname{erf}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^8+x^6+x^4)/exp(x^2),x, algorithm="giac")

[Out]

-1/16*(8*x^7 + 36*x^5 + 98*x^3 + 147*x)*e^(-x^2) + 147/32*sqrt(pi)*erf(x)