3.7.21 \(\int e^{a+b x+c x^2} (b+2 c x) (a+b x+c x^2)^2 \, dx\) [621]

Optimal. Leaf size=64 \[ 2 e^{a+b x+c x^2}-2 e^{a+b x+c x^2} \left (a+b x+c x^2\right )+e^{a+b x+c x^2} \left (a+b x+c x^2\right )^2 \]

[Out]

2*exp(c*x^2+b*x+a)-2*exp(c*x^2+b*x+a)*(c*x^2+b*x+a)+exp(c*x^2+b*x+a)*(c*x^2+b*x+a)^2

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {6839, 2207, 2225} \begin {gather*} e^{a+b x+c x^2} \left (a+b x+c x^2\right )^2-2 e^{a+b x+c x^2} \left (a+b x+c x^2\right )+2 e^{a+b x+c x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^(a + b*x + c*x^2)*(b + 2*c*x)*(a + b*x + c*x^2)^2,x]

[Out]

2*E^(a + b*x + c*x^2) - 2*E^(a + b*x + c*x^2)*(a + b*x + c*x^2) + E^(a + b*x + c*x^2)*(a + b*x + c*x^2)^2

Rule 2207

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] &&  !TrueQ[$UseGamma]

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 6839

Int[(F_)^(v_)*(u_)*(w_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Dist[q, Subst[Int[x^m*F^x,
x], x, v], x] /;  !FalseQ[q]] /; FreeQ[{F, m}, x] && EqQ[w, v]

Rubi steps

\begin {align*} \int e^{a+b x+c x^2} (b+2 c x) \left (a+b x+c x^2\right )^2 \, dx &=\text {Subst}\left (\int e^x x^2 \, dx,x,a+b x+c x^2\right )\\ &=e^{a+b x+c x^2} \left (a+b x+c x^2\right )^2-2 \text {Subst}\left (\int e^x x \, dx,x,a+b x+c x^2\right )\\ &=-2 e^{a+b x+c x^2} \left (a+b x+c x^2\right )+e^{a+b x+c x^2} \left (a+b x+c x^2\right )^2+2 \text {Subst}\left (\int e^x \, dx,x,a+b x+c x^2\right )\\ &=2 e^{a+b x+c x^2}-2 e^{a+b x+c x^2} \left (a+b x+c x^2\right )+e^{a+b x+c x^2} \left (a+b x+c x^2\right )^2\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 36, normalized size = 0.56 \begin {gather*} e^{a+x (b+c x)} \left (2-2 (a+x (b+c x))+(a+x (b+c x))^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^(a + b*x + c*x^2)*(b + 2*c*x)*(a + b*x + c*x^2)^2,x]

[Out]

E^(a + x*(b + c*x))*(2 - 2*(a + x*(b + c*x)) + (a + x*(b + c*x))^2)

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 62, normalized size = 0.97

method result size
derivativedivides \(2 \,{\mathrm e}^{c \,x^{2}+b x +a}-2 \,{\mathrm e}^{c \,x^{2}+b x +a} \left (c \,x^{2}+b x +a \right )+{\mathrm e}^{c \,x^{2}+b x +a} \left (c \,x^{2}+b x +a \right )^{2}\) \(62\)
default \(2 \,{\mathrm e}^{c \,x^{2}+b x +a}-2 \,{\mathrm e}^{c \,x^{2}+b x +a} \left (c \,x^{2}+b x +a \right )+{\mathrm e}^{c \,x^{2}+b x +a} \left (c \,x^{2}+b x +a \right )^{2}\) \(62\)
gosper \(\left (c^{2} x^{4}+2 b c \,x^{3}+2 a c \,x^{2}+b^{2} x^{2}+2 a b x -2 c \,x^{2}+a^{2}-2 b x -2 a +2\right ) {\mathrm e}^{c \,x^{2}+b x +a}\) \(64\)
risch \(\left (c^{2} x^{4}+2 b c \,x^{3}+2 a c \,x^{2}+b^{2} x^{2}+2 a b x -2 c \,x^{2}+a^{2}-2 b x -2 a +2\right ) {\mathrm e}^{c \,x^{2}+b x +a}\) \(64\)
norman \(\left (a^{2}-2 a +2\right ) {\mathrm e}^{c \,x^{2}+b x +a}+c^{2} x^{4} {\mathrm e}^{c \,x^{2}+b x +a}+\left (2 b a -2 b \right ) x \,{\mathrm e}^{c \,x^{2}+b x +a}+\left (2 c a +b^{2}-2 c \right ) x^{2} {\mathrm e}^{c \,x^{2}+b x +a}+2 b c \,x^{3} {\mathrm e}^{c \,x^{2}+b x +a}\) \(105\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(c*x^2+b*x+a)*(2*c*x+b)*(c*x^2+b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

2*exp(c*x^2+b*x+a)-2*exp(c*x^2+b*x+a)*(c*x^2+b*x+a)+exp(c*x^2+b*x+a)*(c*x^2+b*x+a)^2

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.60, size = 1223, normalized size = 19.11 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*x^2+b*x+a)*(2*c*x+b)*(c*x^2+b*x+a)^2,x, algorithm="maxima")

[Out]

1/2*sqrt(pi)*a^2*b*erf(sqrt(-c)*x - 1/2*b/sqrt(-c))*e^(a - 1/4*b^2/c)/sqrt(-c) - 1/2*(sqrt(pi)*(2*c*x + b)*b*(
erf(1/2*sqrt(-(2*c*x + b)^2/c)) - 1)/(sqrt(-(2*c*x + b)^2/c)*c^(3/2)) - 2*e^(1/4*(2*c*x + b)^2/c)/sqrt(c))*a*b
^2*e^(a - 1/4*b^2/c)/sqrt(c) + 1/8*(sqrt(pi)*(2*c*x + b)*b^2*(erf(1/2*sqrt(-(2*c*x + b)^2/c)) - 1)/(sqrt(-(2*c
*x + b)^2/c)*c^(5/2)) - 4*b*e^(1/4*(2*c*x + b)^2/c)/c^(3/2) - 4*(2*c*x + b)^3*gamma(3/2, -1/4*(2*c*x + b)^2/c)
/((-(2*c*x + b)^2/c)^(3/2)*c^(5/2)))*b^3*e^(a - 1/4*b^2/c)/sqrt(c) - 1/2*(sqrt(pi)*(2*c*x + b)*b*(erf(1/2*sqrt
(-(2*c*x + b)^2/c)) - 1)/(sqrt(-(2*c*x + b)^2/c)*c^(3/2)) - 2*e^(1/4*(2*c*x + b)^2/c)/sqrt(c))*a^2*sqrt(c)*e^(
a - 1/4*b^2/c) + 3/4*(sqrt(pi)*(2*c*x + b)*b^2*(erf(1/2*sqrt(-(2*c*x + b)^2/c)) - 1)/(sqrt(-(2*c*x + b)^2/c)*c
^(5/2)) - 4*b*e^(1/4*(2*c*x + b)^2/c)/c^(3/2) - 4*(2*c*x + b)^3*gamma(3/2, -1/4*(2*c*x + b)^2/c)/((-(2*c*x + b
)^2/c)^(3/2)*c^(5/2)))*a*b*sqrt(c)*e^(a - 1/4*b^2/c) - 1/4*(sqrt(pi)*(2*c*x + b)*b^3*(erf(1/2*sqrt(-(2*c*x + b
)^2/c)) - 1)/(sqrt(-(2*c*x + b)^2/c)*c^(7/2)) - 6*b^2*e^(1/4*(2*c*x + b)^2/c)/c^(5/2) - 12*(2*c*x + b)^3*b*gam
ma(3/2, -1/4*(2*c*x + b)^2/c)/((-(2*c*x + b)^2/c)^(3/2)*c^(7/2)) + 8*gamma(2, -1/4*(2*c*x + b)^2/c)/c^(3/2))*b
^2*sqrt(c)*e^(a - 1/4*b^2/c) - 1/4*(sqrt(pi)*(2*c*x + b)*b^3*(erf(1/2*sqrt(-(2*c*x + b)^2/c)) - 1)/(sqrt(-(2*c
*x + b)^2/c)*c^(7/2)) - 6*b^2*e^(1/4*(2*c*x + b)^2/c)/c^(5/2) - 12*(2*c*x + b)^3*b*gamma(3/2, -1/4*(2*c*x + b)
^2/c)/((-(2*c*x + b)^2/c)^(3/2)*c^(7/2)) + 8*gamma(2, -1/4*(2*c*x + b)^2/c)/c^(3/2))*a*c^(3/2)*e^(a - 1/4*b^2/
c) + 5/32*(sqrt(pi)*(2*c*x + b)*b^4*(erf(1/2*sqrt(-(2*c*x + b)^2/c)) - 1)/(sqrt(-(2*c*x + b)^2/c)*c^(9/2)) - 8
*b^3*e^(1/4*(2*c*x + b)^2/c)/c^(7/2) - 24*(2*c*x + b)^3*b^2*gamma(3/2, -1/4*(2*c*x + b)^2/c)/((-(2*c*x + b)^2/
c)^(3/2)*c^(9/2)) + 32*b*gamma(2, -1/4*(2*c*x + b)^2/c)/c^(5/2) - 16*(2*c*x + b)^5*gamma(5/2, -1/4*(2*c*x + b)
^2/c)/((-(2*c*x + b)^2/c)^(5/2)*c^(9/2)))*b*c^(3/2)*e^(a - 1/4*b^2/c) - 1/32*(sqrt(pi)*(2*c*x + b)*b^5*(erf(1/
2*sqrt(-(2*c*x + b)^2/c)) - 1)/(sqrt(-(2*c*x + b)^2/c)*c^(11/2)) - 10*b^4*e^(1/4*(2*c*x + b)^2/c)/c^(9/2) - 40
*(2*c*x + b)^3*b^3*gamma(3/2, -1/4*(2*c*x + b)^2/c)/((-(2*c*x + b)^2/c)^(3/2)*c^(11/2)) + 80*b^2*gamma(2, -1/4
*(2*c*x + b)^2/c)/c^(7/2) - 80*(2*c*x + b)^5*b*gamma(5/2, -1/4*(2*c*x + b)^2/c)/((-(2*c*x + b)^2/c)^(5/2)*c^(1
1/2)) - 32*gamma(3, -1/4*(2*c*x + b)^2/c)/c^(5/2))*c^(5/2)*e^(a - 1/4*b^2/c)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 55, normalized size = 0.86 \begin {gather*} {\left (c^{2} x^{4} + 2 \, b c x^{3} + 2 \, {\left (a - 1\right )} b x + {\left (b^{2} + 2 \, {\left (a - 1\right )} c\right )} x^{2} + a^{2} - 2 \, a + 2\right )} e^{\left (c x^{2} + b x + a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*x^2+b*x+a)*(2*c*x+b)*(c*x^2+b*x+a)^2,x, algorithm="fricas")

[Out]

(c^2*x^4 + 2*b*c*x^3 + 2*(a - 1)*b*x + (b^2 + 2*(a - 1)*c)*x^2 + a^2 - 2*a + 2)*e^(c*x^2 + b*x + a)

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 68, normalized size = 1.06 \begin {gather*} \left (a^{2} + 2 a b x + 2 a c x^{2} - 2 a + b^{2} x^{2} + 2 b c x^{3} - 2 b x + c^{2} x^{4} - 2 c x^{2} + 2\right ) e^{a + b x + c x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*x**2+b*x+a)*(2*c*x+b)*(c*x**2+b*x+a)**2,x)

[Out]

(a**2 + 2*a*b*x + 2*a*c*x**2 - 2*a + b**2*x**2 + 2*b*c*x**3 - 2*b*x + c**2*x**4 - 2*c*x**2 + 2)*exp(a + b*x +
c*x**2)

________________________________________________________________________________________

Giac [A]
time = 3.30, size = 42, normalized size = 0.66 \begin {gather*} -{\left (2 \, c x^{2} - {\left (c x^{2} + b x + a\right )}^{2} + 2 \, b x + 2 \, a - 2\right )} e^{\left (c x^{2} + b x + a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(c*x^2+b*x+a)*(2*c*x+b)*(c*x^2+b*x+a)^2,x, algorithm="giac")

[Out]

-(2*c*x^2 - (c*x^2 + b*x + a)^2 + 2*b*x + 2*a - 2)*e^(c*x^2 + b*x + a)

________________________________________________________________________________________

Mupad [B]
time = 3.61, size = 64, normalized size = 1.00 \begin {gather*} {\mathrm {e}}^{b\,x}\,{\mathrm {e}}^a\,{\mathrm {e}}^{c\,x^2}\,\left (a^2+2\,a\,b\,x+2\,a\,c\,x^2-2\,a+b^2\,x^2+2\,b\,c\,x^3-2\,b\,x+c^2\,x^4-2\,c\,x^2+2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(a + b*x + c*x^2)*(b + 2*c*x)*(a + b*x + c*x^2)^2,x)

[Out]

exp(b*x)*exp(a)*exp(c*x^2)*(a^2 - 2*b*x - 2*c*x^2 - 2*a + b^2*x^2 + c^2*x^4 + 2*a*b*x + 2*a*c*x^2 + 2*b*c*x^3
+ 2)

________________________________________________________________________________________