3.68.43 \(\int (-2+e^{1+2 x+x^2} (-2-4 x-4 x^2)) \, dx\)

Optimal. Leaf size=15 \[ 4-2 x-2 e^{(1+x)^2} x \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 25, normalized size of antiderivative = 1.67, number of steps used = 8, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {2227, 2226, 2204, 2209, 2212} \begin {gather*} -2 x+2 e^{(x+1)^2}-2 e^{(x+1)^2} (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[-2 + E^(1 + 2*x + x^2)*(-2 - 4*x - 4*x^2),x]

[Out]

2*E^(1 + x)^2 - 2*x - 2*E^(1 + x)^2*(1 + 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 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 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 2227

Int[(u_.)*(F_)^((a_.) + (b_.)*(v_)), x_Symbol] :> Int[u*F^(a + b*NormalizePowerOfLinear[v, x]), x] /; FreeQ[{F
, a, b}, x] && PolynomialQ[u, x] && PowerOfLinearQ[v, x] &&  !PowerOfLinearMatchQ[v, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 14, normalized size = 0.93 \begin {gather*} -2 x-2 e^{(1+x)^2} x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[-2 + E^(1 + 2*x + x^2)*(-2 - 4*x - 4*x^2),x]

[Out]

-2*x - 2*E^(1 + x)^2*x

________________________________________________________________________________________

fricas [A]  time = 0.51, size = 16, normalized size = 1.07 \begin {gather*} -2 \, x e^{\left (x^{2} + 2 \, x + 1\right )} - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x*e^(x^2 + 2*x + 1) - 2*x

________________________________________________________________________________________

giac [A]  time = 0.20, size = 16, normalized size = 1.07 \begin {gather*} -2 \, x e^{\left (x^{2} + 2 \, x + 1\right )} - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x*e^(x^2 + 2*x + 1) - 2*x

________________________________________________________________________________________

maple [A]  time = 0.03, size = 14, normalized size = 0.93




method result size



risch \(-2 x -2 \,{\mathrm e}^{\left (x +1\right )^{2}} x\) \(14\)
default \(-2 x -2 \,{\mathrm e}^{x^{2}+2 x +1} x\) \(17\)
norman \(-2 x -2 \,{\mathrm e}^{x^{2}+2 x +1} x\) \(17\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x-2*exp((x+1)^2)*x

________________________________________________________________________________________

maxima [C]  time = 0.42, size = 48, normalized size = 3.20 \begin {gather*} \frac {2 \, {\left (x + 1\right )}^{3} \Gamma \left (\frac {3}{2}, -{\left (x + 1\right )}^{2}\right )}{\left (-{\left (x + 1\right )}^{2}\right )^{\frac {3}{2}}} + i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + i\right ) - 2 \, x + 2 \, e^{\left ({\left (x + 1\right )}^{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(x + 1)^3*gamma(3/2, -(x + 1)^2)/(-(x + 1)^2)^(3/2) + I*sqrt(pi)*erf(I*x + I) - 2*x + 2*e^((x + 1)^2)

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 16, normalized size = 1.07 \begin {gather*} -2\,x\,\left ({\mathrm {e}}^{2\,x}\,{\mathrm {e}}^{x^2}\,\mathrm {e}+1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(- exp(2*x + x^2 + 1)*(4*x + 4*x^2 + 2) - 2,x)

[Out]

-2*x*(exp(2*x)*exp(x^2)*exp(1) + 1)

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 17, normalized size = 1.13 \begin {gather*} - 2 x e^{x^{2} + 2 x + 1} - 2 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-4*x**2-4*x-2)*exp(x**2+2*x+1)-2,x)

[Out]

-2*x*exp(x**2 + 2*x + 1) - 2*x

________________________________________________________________________________________