3.432 \(\int e^{a+b x-c x^2} x^3 \, dx\)

Optimal. Leaf size=181 \[ -\frac{3 \sqrt{\pi } b e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{5/2}}-\frac{b^2 e^{a+b x-c x^2}}{8 c^3}-\frac{\sqrt{\pi } b^3 e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{16 c^{7/2}}-\frac{b x e^{a+b x-c x^2}}{4 c^2}-\frac{e^{a+b x-c x^2}}{2 c^2}-\frac{x^2 e^{a+b x-c x^2}}{2 c} \]

[Out]

-(b^2*E^(a + b*x - c*x^2))/(8*c^3) - E^(a + b*x - c*x^2)/(2*c^2) - (b*E^(a + b*x
 - c*x^2)*x)/(4*c^2) - (E^(a + b*x - c*x^2)*x^2)/(2*c) - (b^3*E^(a + b^2/(4*c))*
Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(16*c^(7/2)) - (3*b*E^(a + b^2/(4*c))*Sqr
t[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(8*c^(5/2))

_______________________________________________________________________________________

Rubi [A]  time = 0.288438, antiderivative size = 181, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235 \[ -\frac{3 \sqrt{\pi } b e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{8 c^{5/2}}-\frac{b^2 e^{a+b x-c x^2}}{8 c^3}-\frac{\sqrt{\pi } b^3 e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{16 c^{7/2}}-\frac{b x e^{a+b x-c x^2}}{4 c^2}-\frac{e^{a+b x-c x^2}}{2 c^2}-\frac{x^2 e^{a+b x-c x^2}}{2 c} \]

Antiderivative was successfully verified.

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

[Out]

-(b^2*E^(a + b*x - c*x^2))/(8*c^3) - E^(a + b*x - c*x^2)/(2*c^2) - (b*E^(a + b*x
 - c*x^2)*x)/(4*c^2) - (E^(a + b*x - c*x^2)*x^2)/(2*c) - (b^3*E^(a + b^2/(4*c))*
Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(16*c^(7/2)) - (3*b*E^(a + b^2/(4*c))*Sqr
t[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])])/(8*c^(5/2))

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{b^{3} e^{a + \frac{b^{2}}{4 c}} \int e^{- \frac{b^{2}}{4 c} + b x - c x^{2}}\, dx}{8 c^{3}} - \frac{b^{2} e^{a + b x - c x^{2}}}{8 c^{3}} - \frac{b x e^{a + b x - c x^{2}}}{4 c^{2}} + \frac{3 b e^{a + \frac{b^{2}}{4 c}} \int e^{- \frac{b^{2}}{4 c} + b x - c x^{2}}\, dx}{4 c^{2}} - \frac{x^{2} e^{a + b x - c x^{2}}}{2 c} - \frac{e^{a + b x - c x^{2}}}{2 c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(exp(-c*x**2+b*x+a)*x**3,x)

[Out]

b**3*exp(a + b**2/(4*c))*Integral(exp(-b**2/(4*c) + b*x - c*x**2), x)/(8*c**3) -
 b**2*exp(a + b*x - c*x**2)/(8*c**3) - b*x*exp(a + b*x - c*x**2)/(4*c**2) + 3*b*
exp(a + b**2/(4*c))*Integral(exp(-b**2/(4*c) + b*x - c*x**2), x)/(4*c**2) - x**2
*exp(a + b*x - c*x**2)/(2*c) - exp(a + b*x - c*x**2)/(2*c**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.305889, size = 91, normalized size = 0.5 \[ -\frac{e^a \left (\sqrt{\pi } b \left (b^2+6 c\right ) e^{\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )+2 \sqrt{c} e^{x (b-c x)} \left (b^2+2 b c x+4 c \left (c x^2+1\right )\right )\right )}{16 c^{7/2}} \]

Antiderivative was successfully verified.

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

[Out]

-(E^a*(2*Sqrt[c]*E^(x*(b - c*x))*(b^2 + 2*b*c*x + 4*c*(1 + c*x^2)) + b*(b^2 + 6*
c)*E^(b^2/(4*c))*Sqrt[Pi]*Erf[(b - 2*c*x)/(2*Sqrt[c])]))/(16*c^(7/2))

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 194, normalized size = 1.1 \[ -{\frac{{{\rm e}^{-c{x}^{2}+bx+a}}{x}^{2}}{2\,c}}+{\frac{b}{2\,c} \left ( -{\frac{{{\rm e}^{-c{x}^{2}+bx+a}}x}{2\,c}}+{\frac{b}{2\,c} \left ( -{\frac{{{\rm e}^{-c{x}^{2}+bx+a}}}{2\,c}}-{\frac{b\sqrt{\pi }}{4}{{\rm e}^{a+{\frac{{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){c}^{-{\frac{3}{2}}}} \right ) }-{\frac{\sqrt{\pi }}{4}{{\rm e}^{a+{\frac{{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){c}^{-{\frac{3}{2}}}} \right ) }+{\frac{1}{c} \left ( -{\frac{{{\rm e}^{-c{x}^{2}+bx+a}}}{2\,c}}-{\frac{b\sqrt{\pi }}{4}{{\rm e}^{a+{\frac{{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){c}^{-{\frac{3}{2}}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(exp(-c*x^2+b*x+a)*x^3,x)

[Out]

-1/2*exp(-c*x^2+b*x+a)*x^2/c+1/2*b/c*(-1/2*exp(-c*x^2+b*x+a)*x/c+1/2*b/c*(-1/2*e
xp(-c*x^2+b*x+a)/c-1/4*b/c^(3/2)*Pi^(1/2)*exp(a+1/4*b^2/c)*erf(-c^(1/2)*x+1/2*b/
c^(1/2)))-1/4/c^(3/2)*Pi^(1/2)*exp(a+1/4*b^2/c)*erf(-c^(1/2)*x+1/2*b/c^(1/2)))+1
/c*(-1/2*exp(-c*x^2+b*x+a)/c-1/4*b/c^(3/2)*Pi^(1/2)*exp(a+1/4*b^2/c)*erf(-c^(1/2
)*x+1/2*b/c^(1/2)))

_______________________________________________________________________________________

Maxima [A]  time = 0.814027, size = 244, normalized size = 1.35 \[ \frac{{\left (\frac{\sqrt{\pi }{\left (2 \, c x - b\right )} b^{3}{\left (\operatorname{erf}\left (\frac{1}{2} \, \sqrt{\frac{{\left (2 \, c x - b\right )}^{2}}{c}}\right ) - 1\right )}}{\sqrt{\frac{{\left (2 \, c x - b\right )}^{2}}{c}} \left (-c\right )^{\frac{7}{2}}} - \frac{6 \, b^{2} c e^{\left (-\frac{{\left (2 \, c x - b\right )}^{2}}{4 \, c}\right )}}{\left (-c\right )^{\frac{7}{2}}} - \frac{12 \,{\left (2 \, c x - b\right )}^{3} b \Gamma \left (\frac{3}{2}, \frac{{\left (2 \, c x - b\right )}^{2}}{4 \, c}\right )}{\left (\frac{{\left (2 \, c x - b\right )}^{2}}{c}\right )^{\frac{3}{2}} \left (-c\right )^{\frac{7}{2}}} - \frac{8 \, c^{2} \Gamma \left (2, \frac{{\left (2 \, c x - b\right )}^{2}}{4 \, c}\right )}{\left (-c\right )^{\frac{7}{2}}}\right )} e^{\left (a + \frac{b^{2}}{4 \, c}\right )}}{16 \, \sqrt{-c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^3*e^(-c*x^2 + b*x + a),x, algorithm="maxima")

[Out]

1/16*(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*c*e^(-1/4*(2*c*x - b)^2/c)/(-c)^(7/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*c^2*gamma(2, 1/4*(2*c*x - b)^2/c)/(-c)^(7/2))*e^(a + 1/4*b^2/c)/sqrt(-c)

_______________________________________________________________________________________

Fricas [A]  time = 0.270917, size = 112, normalized size = 0.62 \[ \frac{\sqrt{\pi }{\left (b^{3} + 6 \, b c\right )} \operatorname{erf}\left (\frac{2 \, c x - b}{2 \, \sqrt{c}}\right ) e^{\left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )} - 2 \,{\left (4 \, c^{2} x^{2} + 2 \, b c x + b^{2} + 4 \, c\right )} \sqrt{c} e^{\left (-c x^{2} + b x + a\right )}}{16 \, c^{\frac{7}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^3*e^(-c*x^2 + b*x + a),x, algorithm="fricas")

[Out]

1/16*(sqrt(pi)*(b^3 + 6*b*c)*erf(1/2*(2*c*x - b)/sqrt(c))*e^(1/4*(b^2 + 4*a*c)/c
) - 2*(4*c^2*x^2 + 2*b*c*x + b^2 + 4*c)*sqrt(c)*e^(-c*x^2 + b*x + a))/c^(7/2)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(exp(-c*x**2+b*x+a)*x**3,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.228239, size = 140, normalized size = 0.77 \[ -\frac{\frac{\sqrt{\pi }{\left (b^{3} + 6 \, b c\right )} \operatorname{erf}\left (-\frac{1}{2} \, \sqrt{c}{\left (2 \, x - \frac{b}{c}\right )}\right ) e^{\left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )}}{\sqrt{c}} + 2 \,{\left (c^{2}{\left (2 \, x - \frac{b}{c}\right )}^{2} + 3 \, b c{\left (2 \, x - \frac{b}{c}\right )} + 3 \, b^{2} + 4 \, c\right )} e^{\left (-c x^{2} + b x + a\right )}}{16 \, c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^3*e^(-c*x^2 + b*x + a),x, algorithm="giac")

[Out]

-1/16*(sqrt(pi)*(b^3 + 6*b*c)*erf(-1/2*sqrt(c)*(2*x - b/c))*e^(1/4*(b^2 + 4*a*c)
/c)/sqrt(c) + 2*(c^2*(2*x - b/c)^2 + 3*b*c*(2*x - b/c) + 3*b^2 + 4*c)*e^(-c*x^2
+ b*x + a))/c^3