3.5.35 \(\int e^{a+b x-c x^2} \, dx\) [435]

Optimal. Leaf size=44 \[ -\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}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 44, normalized size of antiderivative = 1.00, 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 = {2266, 2236} \begin {gather*} -\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}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2236

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]

Rule 2266

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]

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.03, size = 46, normalized size = 1.05 \begin {gather*} \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 {gather*}

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.01, size = 34, normalized size = 0.77

method result size
default \(-\frac {\sqrt {\pi }\, {\mathrm e}^{a +\frac {b^{2}}{4 c}} \erf \left (-\sqrt {c}\, x +\frac {b}{2 \sqrt {c}}\right )}{2 \sqrt {c}}\) \(34\)
risch \(-\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {4 c a +b^{2}}{4 c}} \erf \left (-\sqrt {c}\, x +\frac {b}{2 \sqrt {c}}\right )}{2 \sqrt {c}}\) \(37\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[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.28, size = 32, normalized size = 0.73 \begin {gather*} \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 {gather*}

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 = 0.39, size = 36, normalized size = 0.82 \begin {gather*} \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 {gather*}

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.33, size = 41, normalized size = 0.93 \begin {gather*} \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 {gather*}

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.78, size = 38, normalized size = 0.86 \begin {gather*} -\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 {gather*}

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)

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 40, normalized size = 0.91 \begin {gather*} -\frac {\sqrt {\pi }\,\mathrm {erf}\left (\frac {b\,1{}\mathrm {i}-c\,x\,2{}\mathrm {i}}{2\,\sqrt {-c}}\right )\,{\mathrm {e}}^{a+\frac {b^2}{4\,c}}\,1{}\mathrm {i}}{2\,\sqrt {-c}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________