3.64.10 \(\int e^{2+3 x+x^2} (5+17 x+13 x^2+2 x^3+e^x (1+4 x+2 x^2)) \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.44, antiderivative size = 51, normalized size of antiderivative = 2.83, number of steps used = 24, number of rules used = 6, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {6742, 2234, 2204, 2240, 2241, 2288} \begin {gather*} e^{x^2+3 x+2} x^2+5 e^{x^2+3 x+2} x+\frac {e^{x^2+4 x+2} \left (x^2+2 x\right )}{x+2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^(2 + 3*x + x^2)*(5 + 17*x + 13*x^2 + 2*x^3 + E^x*(1 + 4*x + 2*x^2)),x]

[Out]

5*E^(2 + 3*x + x^2)*x + E^(2 + 3*x + x^2)*x^2 + (E^(2 + 4*x + x^2)*(2*x + x^2))/(2 + 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 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 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

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 \left (5 e^{2+3 x+x^2}+17 e^{2+3 x+x^2} x+13 e^{2+3 x+x^2} x^2+2 e^{2+3 x+x^2} x^3+e^{2+4 x+x^2} \left (1+4 x+2 x^2\right )\right ) \, dx\\ &=2 \int e^{2+3 x+x^2} x^3 \, dx+5 \int e^{2+3 x+x^2} \, dx+13 \int e^{2+3 x+x^2} x^2 \, dx+17 \int e^{2+3 x+x^2} x \, dx+\int e^{2+4 x+x^2} \left (1+4 x+2 x^2\right ) \, dx\\ &=\frac {17}{2} e^{2+3 x+x^2}+\frac {13}{2} e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}-2 \int e^{2+3 x+x^2} x \, dx-3 \int e^{2+3 x+x^2} x^2 \, dx-\frac {13}{2} \int e^{2+3 x+x^2} \, dx-\frac {39}{2} \int e^{2+3 x+x^2} x \, dx-\frac {51}{2} \int e^{2+3 x+x^2} \, dx+\frac {5 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{\sqrt [4]{e}}\\ &=-\frac {9}{4} e^{2+3 x+x^2}+5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}+\frac {5 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (3+2 x)\right )}{2 \sqrt [4]{e}}+\frac {3}{2} \int e^{2+3 x+x^2} \, dx+3 \int e^{2+3 x+x^2} \, dx+\frac {9}{2} \int e^{2+3 x+x^2} x \, dx+\frac {117}{4} \int e^{2+3 x+x^2} \, dx-\frac {13 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{2 \sqrt [4]{e}}-\frac {51 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{2 \sqrt [4]{e}}\\ &=5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}-\frac {27 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (3+2 x)\right )}{2 \sqrt [4]{e}}-\frac {27}{4} \int e^{2+3 x+x^2} \, dx+\frac {3 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{2 \sqrt [4]{e}}+\frac {3 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{\sqrt [4]{e}}+\frac {117 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{4 \sqrt [4]{e}}\\ &=5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}+\frac {27 \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (3+2 x)\right )}{8 \sqrt [4]{e}}-\frac {27 \int e^{\frac {1}{4} (3+2 x)^2} \, dx}{4 \sqrt [4]{e}}\\ &=5 e^{2+3 x+x^2} x+e^{2+3 x+x^2} x^2+\frac {e^{2+4 x+x^2} \left (2 x+x^2\right )}{2+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.22, size = 18, normalized size = 1.00 \begin {gather*} e^{2+3 x+x^2} x \left (5+e^x+x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^(2 + 3*x + x^2)*(5 + 17*x + 13*x^2 + 2*x^3 + E^x*(1 + 4*x + 2*x^2)),x]

[Out]

E^(2 + 3*x + x^2)*x*(5 + E^x + x)

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 21, normalized size = 1.17 \begin {gather*} {\left (x^{2} + x e^{x} + 5 \, x\right )} e^{\left (x^{2} + 3 \, x + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2+4*x+1)*exp(x)+2*x^3+13*x^2+17*x+5)*exp(x^2+3*x+2),x, algorithm="fricas")

[Out]

(x^2 + x*e^x + 5*x)*e^(x^2 + 3*x + 2)

________________________________________________________________________________________

giac [B]  time = 0.15, size = 35, normalized size = 1.94 \begin {gather*} x e^{\left (x^{2} + 4 \, x + 2\right )} + \frac {1}{4} \, {\left ({\left (2 \, x + 3\right )}^{2} + 8 \, x - 9\right )} e^{\left (x^{2} + 3 \, x + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2+4*x+1)*exp(x)+2*x^3+13*x^2+17*x+5)*exp(x^2+3*x+2),x, algorithm="giac")

[Out]

x*e^(x^2 + 4*x + 2) + 1/4*((2*x + 3)^2 + 8*x - 9)*e^(x^2 + 3*x + 2)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 21, normalized size = 1.17




method result size



risch \(\left (x^{2}+{\mathrm e}^{x} x +5 x \right ) {\mathrm e}^{\left (2+x \right ) \left (x +1\right )}\) \(21\)
default \(5 x \,{\mathrm e}^{x^{2}+3 x +2}+x^{2} {\mathrm e}^{x^{2}+3 x +2}+x \,{\mathrm e}^{x^{2}+4 x +2}\) \(38\)
norman \(x^{2} {\mathrm e}^{x^{2}+3 x +2}+{\mathrm e}^{x} x \,{\mathrm e}^{x^{2}+3 x +2}+5 x \,{\mathrm e}^{x^{2}+3 x +2}\) \(40\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^2+4*x+1)*exp(x)+2*x^3+13*x^2+17*x+5)*exp(x^2+3*x+2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.46, size = 372, normalized size = 20.67 \begin {gather*} -\frac {5}{2} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + \frac {3}{2} i\right ) e^{\left (-\frac {1}{4}\right )} - \frac {1}{2} i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + 2 i\right ) e^{\left (-2\right )} + \frac {1}{8} \, {\left (\frac {36 \, {\left (2 \, x + 3\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}{\left (-{\left (2 \, x + 3\right )}^{2}\right )^{\frac {3}{2}}} - \frac {27 \, \sqrt {\pi } {\left (2 \, x + 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 3\right )}^{2}}} + 54 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )} - 8 \, \Gamma \left (2, -\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )\right )} e^{\left (-\frac {1}{4}\right )} - \frac {13}{8} \, {\left (\frac {4 \, {\left (2 \, x + 3\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}{\left (-{\left (2 \, x + 3\right )}^{2}\right )^{\frac {3}{2}}} - \frac {9 \, \sqrt {\pi } {\left (2 \, x + 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 3\right )}^{2}}} + 12 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} - \frac {17}{4} \, {\left (\frac {3 \, \sqrt {\pi } {\left (2 \, x + 3\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-{\left (2 \, x + 3\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (2 \, x + 3\right )}^{2}}} - 2 \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 3\right )}^{2}\right )}\right )} e^{\left (-\frac {1}{4}\right )} - {\left (\frac {{\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 \, \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 \, e^{\left ({\left (x + 2\right )}^{2}\right )}\right )} e^{\left (-2\right )} - 2 \, {\left (\frac {2 \, \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}}} - e^{\left ({\left (x + 2\right )}^{2}\right )}\right )} e^{\left (-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2+4*x+1)*exp(x)+2*x^3+13*x^2+17*x+5)*exp(x^2+3*x+2),x, algorithm="maxima")

[Out]

-5/2*I*sqrt(pi)*erf(I*x + 3/2*I)*e^(-1/4) - 1/2*I*sqrt(pi)*erf(I*x + 2*I)*e^(-2) + 1/8*(36*(2*x + 3)^3*gamma(3
/2, -1/4*(2*x + 3)^2)/(-(2*x + 3)^2)^(3/2) - 27*sqrt(pi)*(2*x + 3)*(erf(1/2*sqrt(-(2*x + 3)^2)) - 1)/sqrt(-(2*
x + 3)^2) + 54*e^(1/4*(2*x + 3)^2) - 8*gamma(2, -1/4*(2*x + 3)^2))*e^(-1/4) - 13/8*(4*(2*x + 3)^3*gamma(3/2, -
1/4*(2*x + 3)^2)/(-(2*x + 3)^2)^(3/2) - 9*sqrt(pi)*(2*x + 3)*(erf(1/2*sqrt(-(2*x + 3)^2)) - 1)/sqrt(-(2*x + 3)
^2) + 12*e^(1/4*(2*x + 3)^2))*e^(-1/4) - 17/4*(3*sqrt(pi)*(2*x + 3)*(erf(1/2*sqrt(-(2*x + 3)^2)) - 1)/sqrt(-(2
*x + 3)^2) - 2*e^(1/4*(2*x + 3)^2))*e^(-1/4) - ((x + 2)^3*gamma(3/2, -(x + 2)^2)/(-(x + 2)^2)^(3/2) - 4*sqrt(p
i)*(x + 2)*(erf(sqrt(-(x + 2)^2)) - 1)/sqrt(-(x + 2)^2) + 4*e^((x + 2)^2))*e^(-2) - 2*(2*sqrt(pi)*(x + 2)*(erf
(sqrt(-(x + 2)^2)) - 1)/sqrt(-(x + 2)^2) - e^((x + 2)^2))*e^(-2)

________________________________________________________________________________________

mupad [B]  time = 4.04, size = 16, normalized size = 0.89 \begin {gather*} x\,{\mathrm {e}}^{x^2+3\,x+2}\,\left (x+{\mathrm {e}}^x+5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(3*x + x^2 + 2)*(17*x + exp(x)*(4*x + 2*x^2 + 1) + 13*x^2 + 2*x^3 + 5),x)

[Out]

x*exp(3*x + x^2 + 2)*(x + exp(x) + 5)

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 20, normalized size = 1.11 \begin {gather*} \left (x^{2} + x e^{x} + 5 x\right ) e^{x^{2} + 3 x + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**2+4*x+1)*exp(x)+2*x**3+13*x**2+17*x+5)*exp(x**2+3*x+2),x)

[Out]

(x**2 + x*exp(x) + 5*x)*exp(x**2 + 3*x + 2)

________________________________________________________________________________________