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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 44 \[ \int e^{a+b x-c x^2} \, 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}} \]

[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] (verified)

Time = 0.01 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2266, 2236} \[ \int e^{a+b x-c x^2} \, dx=-\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}} \]

[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*} \text {integral}& = 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] (verified)

Time = 0.03 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.05 \[ \int e^{a+b x-c x^2} \, 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}} \]

[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] (verified)

Time = 0.01 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.77

method result size
default \(-\frac {\sqrt {\pi }\, {\mathrm e}^{a +\frac {b^{2}}{4 c}} \operatorname {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}} \operatorname {erf}\left (-\sqrt {c}\, x +\frac {b}{2 \sqrt {c}}\right )}{2 \sqrt {c}}\) \(37\)

[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))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.82 \[ \int e^{a+b x-c x^2} \, dx=\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}} \]

[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] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.93 \[ \int e^{a+b x-c x^2} \, dx=\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} \]

[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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.73 \[ \int e^{a+b x-c x^2} \, dx=\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}} \]

[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)

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.86 \[ \int e^{a+b x-c x^2} \, dx=-\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}} \]

[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] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.91 \[ \int e^{a+b x-c x^2} \, dx=-\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}} \]

[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))