3.22.99 \(\int \frac {1}{6} e^{-4 x^2} (2 x-8 x^3+e^{x+4 x^2} (2 x+x^2)) \, dx\)

Optimal. Leaf size=18 \[ \frac {1}{6} \left (e^x+e^{-4 x^2}\right ) x^2 \]

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 25, normalized size of antiderivative = 1.39, number of steps used = 13, number of rules used = 7, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.189, Rules used = {12, 6742, 2209, 2212, 2196, 2176, 2194} \begin {gather*} \frac {e^x x^2}{6}+\frac {1}{6} e^{-4 x^2} x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rule 2209

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

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{6} \int e^{-4 x^2} \left (2 x-8 x^3+e^{x+4 x^2} \left (2 x+x^2\right )\right ) \, dx\\ &=\frac {1}{6} \int \left (2 e^{-4 x^2} x-8 e^{-4 x^2} x^3+e^x x (2+x)\right ) \, dx\\ &=\frac {1}{6} \int e^x x (2+x) \, dx+\frac {1}{3} \int e^{-4 x^2} x \, dx-\frac {4}{3} \int e^{-4 x^2} x^3 \, dx\\ &=-\frac {1}{24} e^{-4 x^2}+\frac {1}{6} e^{-4 x^2} x^2+\frac {1}{6} \int \left (2 e^x x+e^x x^2\right ) \, dx-\frac {1}{3} \int e^{-4 x^2} x \, dx\\ &=\frac {1}{6} e^{-4 x^2} x^2+\frac {1}{6} \int e^x x^2 \, dx+\frac {1}{3} \int e^x x \, dx\\ &=\frac {e^x x}{3}+\frac {e^x x^2}{6}+\frac {1}{6} e^{-4 x^2} x^2-\frac {\int e^x \, dx}{3}-\frac {1}{3} \int e^x x \, dx\\ &=-\frac {e^x}{3}+\frac {e^x x^2}{6}+\frac {1}{6} e^{-4 x^2} x^2+\frac {\int e^x \, dx}{3}\\ &=\frac {e^x x^2}{6}+\frac {1}{6} e^{-4 x^2} x^2\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 18, normalized size = 1.00 \begin {gather*} \frac {1}{6} \left (e^x+e^{-4 x^2}\right ) x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 19, normalized size = 1.06 \begin {gather*} \frac {1}{6} \, x^{2} e^{\left (-4 \, x^{2}\right )} + \frac {1}{6} \, x^{2} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 3.02, size = 19, normalized size = 1.06 \begin {gather*} \frac {1}{6} \, x^{2} e^{\left (-4 \, x^{2}\right )} + \frac {1}{6} \, x^{2} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 20, normalized size = 1.11




method result size



default \(\frac {{\mathrm e}^{x} x^{2}}{6}+\frac {{\mathrm e}^{-4 x^{2}} x^{2}}{6}\) \(20\)
risch \(\frac {{\mathrm e}^{x} x^{2}}{6}+\frac {{\mathrm e}^{-4 x^{2}} x^{2}}{6}\) \(20\)
meijerg \(\frac {\left (3 x^{2}-6 x +6\right ) {\mathrm e}^{x}}{18}-\frac {\left (-2 x +2\right ) {\mathrm e}^{x}}{6}+\frac {\left (8 x^{2}+2\right ) {\mathrm e}^{-4 x^{2}}}{48}-\frac {{\mathrm e}^{-4 x^{2}}}{24}\) \(48\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.45, size = 43, normalized size = 2.39 \begin {gather*} \frac {1}{24} \, {\left (4 \, x^{2} + 1\right )} e^{\left (-4 \, x^{2}\right )} + \frac {1}{6} \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + \frac {1}{3} \, {\left (x - 1\right )} e^{x} - \frac {1}{24} \, e^{\left (-4 \, x^{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.27, size = 14, normalized size = 0.78 \begin {gather*} \frac {x^2\,\left ({\mathrm {e}}^{-4\,x^2}+{\mathrm {e}}^x\right )}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 19, normalized size = 1.06 \begin {gather*} \frac {x^{2} e^{x}}{6} + \frac {x^{2} e^{- 4 x^{2}}}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________