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

Optimal. Leaf size=44 \[ -\frac{\sqrt{\pi } e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{2 \sqrt{c}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0107908, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2234, 2205} \[ -\frac{\sqrt{\pi } e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{b-2 c x}{2 \sqrt{c}}\right )}{2 \sqrt{c}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2205

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]

Rubi steps

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

Mathematica [A]  time = 0.0117936, size = 46, normalized size = 1.05 \[ \frac{\sqrt{\pi } e^{a+\frac{b^2}{4 c}} \text{Erf}\left (\frac{2 c x-b}{2 \sqrt{c}}\right )}{2 \sqrt{c}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 34, normalized size = 0.8 \begin{align*} -{\frac{\sqrt{\pi }}{2}{{\rm e}^{a+{\frac{{b}^{2}}{4\,c}}}}{\it Erf} \left ( -\sqrt{c}x+{\frac{b}{2}{\frac{1}{\sqrt{c}}}} \right ){\frac{1}{\sqrt{c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.978502, size = 43, normalized size = 0.98 \begin{align*} \frac{\sqrt{\pi } \operatorname{erf}\left (\sqrt{c} x - \frac{b}{2 \, \sqrt{c}}\right ) e^{\left (a + \frac{b^{2}}{4 \, c}\right )}}{2 \, \sqrt{c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.51209, size = 101, normalized size = 2.3 \begin{align*} \frac{\sqrt{\pi } \operatorname{erf}\left (\frac{2 \, c x - b}{2 \, \sqrt{c}}\right ) e^{\left (\frac{b^{2} + 4 \, a c}{4 \, c}\right )}}{2 \, \sqrt{c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.789646, size = 41, normalized size = 0.93 \begin{align*} \frac{\sqrt{\pi } \sqrt{- \frac{1}{c}} e^{a + \frac{b^{2}}{4 c}} \operatorname{erfi}{\left (\frac{b - 2 c x}{2 \sqrt{- c}} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

sqrt(pi)*sqrt(-1/c)*exp(a + b**2/(4*c))*erfi((b - 2*c*x)/(2*sqrt(-c)))/2

________________________________________________________________________________________

Giac [A]  time = 1.34232, size = 51, normalized size = 1.16 \begin{align*} -\frac{\sqrt{\pi } \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 )}}{2 \, \sqrt{c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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