3.34.46 \(\int e^{3-x-x^2} (-6 e^{-3+2 x+x^2}+e^x (-6+12 x^2)) \, dx\) [3346]

Optimal. Leaf size=22 \[ 6 e^x \left (-1-e^{3-x-x^2} x\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 18, normalized size of antiderivative = 0.82, number of steps used = 8, number of rules used = 5, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {6820, 2225, 2258, 2236, 2243} \begin {gather*} -6 e^{3-x^2} x-6 e^x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^(3 - x - x^2)*(-6*E^(-3 + 2*x + x^2) + E^x*(-6 + 12*x^2)),x]

[Out]

-6*E^x - 6*E^(3 - x^2)*x

Rule 2225

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 2236

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

Rule 6820

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-6 e^x+6 e^{3-x^2} \left (-1+2 x^2\right )\right ) \, dx\\ &=-\left (6 \int e^x \, dx\right )+6 \int e^{3-x^2} \left (-1+2 x^2\right ) \, dx\\ &=-6 e^x+6 \int \left (-e^{3-x^2}+2 e^{3-x^2} x^2\right ) \, dx\\ &=-6 e^x-6 \int e^{3-x^2} \, dx+12 \int e^{3-x^2} x^2 \, dx\\ &=-6 e^x-6 e^{3-x^2} x-3 e^3 \sqrt {\pi } \text {erf}(x)+6 \int e^{3-x^2} \, dx\\ &=-6 e^x-6 e^{3-x^2} x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.18, size = 18, normalized size = 0.82 \begin {gather*} -6 e^x-6 e^{3-x^2} x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^(3 - x - x^2)*(-6*E^(-3 + 2*x + x^2) + E^x*(-6 + 12*x^2)),x]

[Out]

-6*E^x - 6*E^(3 - x^2)*x

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.15, size = 40, normalized size = 1.82

method result size
risch \(-6 \,{\mathrm e}^{x}-6 x \,{\mathrm e}^{-x^{2}+3}\) \(17\)
norman \(\left (-6 \,{\mathrm e}^{x} x -6 \,{\mathrm e}^{x} {\mathrm e}^{x^{2}+x -3}\right ) {\mathrm e}^{-x^{2}-x +3}\) \(28\)
default \(-3 \,{\mathrm e}^{3} \sqrt {\pi }\, \erf \left (x \right )+12 \,{\mathrm e}^{3} \left (-\frac {{\mathrm e}^{-x^{2}} x}{2}+\frac {\sqrt {\pi }\, \erf \left (x \right )}{4}\right )-6 \,{\mathrm e}^{x}\) \(40\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-3/exp(-3)*Pi^(1/2)*erf(x)+12/exp(-3)*(-1/2*x/exp(x^2)+1/4*Pi^(1/2)*erf(x))-6*exp(x)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 16, normalized size = 0.73 \begin {gather*} -6 \, x e^{\left (-x^{2} + 3\right )} - 6 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.45, size = 29, normalized size = 1.32 \begin {gather*} -6 \, {\left (x e^{\left (2 \, x\right )} + e^{\left (x^{2} + 3 \, x - 3\right )}\right )} e^{\left (-x^{2} - 2 \, x + 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 20, normalized size = 0.91 \begin {gather*} - 6 x e^{x} e^{- x^{2} - x + 3} - 6 e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-6*exp(x)*exp(x**2+x-3)+(12*x**2-6)*exp(x))/exp(x**2+x-3),x)

[Out]

-6*x*exp(x)*exp(-x**2 - x + 3) - 6*exp(x)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 16, normalized size = 0.73 \begin {gather*} -6 \, x e^{\left (-x^{2} + 3\right )} - 6 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.11, size = 16, normalized size = 0.73 \begin {gather*} -6\,{\mathrm {e}}^x-6\,x\,{\mathrm {e}}^3\,{\mathrm {e}}^{-x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

- 6*exp(x) - 6*x*exp(3)*exp(-x^2)

________________________________________________________________________________________