3.1.87 \(\int e^{c+d x^2} x \text {Erf}(a+b x) \, dx\) [87]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {6517, 2266, 2236} \begin {gather*} \frac {e^{c+d x^2} \text {Erf}(a+b x)}{2 d}-\frac {b e^{\frac {a^2 d}{b^2-d}+c} \text {Erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )}{2 d \sqrt {b^2-d}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(E^(c + d*x^2)*Erf[a + b*x])/(2*d) - (b*E^(c + (a^2*d)/(b^2 - d))*Erf[(a*b + (b^2 - d)*x)/Sqrt[b^2 - d]])/(2*S
qrt[b^2 - d]*d)

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]

Rule 6517

Int[E^((c_.) + (d_.)*(x_)^2)*Erf[(a_.) + (b_.)*(x_)]*(x_), x_Symbol] :> Simp[E^(c + d*x^2)*(Erf[a + b*x]/(2*d)
), x] - Dist[b/(d*Sqrt[Pi]), Int[E^(-a^2 + c - 2*a*b*x - (b^2 - d)*x^2), x], x] /; FreeQ[{a, b, c, d}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 82, normalized size = 0.95 \begin {gather*} \frac {e^c \left (e^{d x^2} \text {Erf}(a+b x)-\frac {b e^{\frac {a^2 d}{b^2-d}} \text {Erfi}\left (\frac {-a b+\left (-b^2+d\right ) x}{\sqrt {-b^2+d}}\right )}{\sqrt {-b^2+d}}\right )}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.64, size = 134, normalized size = 1.56

method result size
default \(\frac {\frac {\erf \left (b x +a \right ) b \,{\mathrm e}^{\frac {a^{2} d}{b^{2}}-\frac {2 a d \left (b x +a \right )}{b^{2}}+c +\frac {d \left (b x +a \right )^{2}}{b^{2}}}}{2 d}-\frac {b \,{\mathrm e}^{\frac {a^{2} d}{b^{2}}+c -\frac {a^{2} d^{2}}{b^{4} \left (-1+\frac {d}{b^{2}}\right )}} \erf \left (\sqrt {1-\frac {d}{b^{2}}}\, \left (b x +a \right )+\frac {a d}{b^{2} \sqrt {1-\frac {d}{b^{2}}}}\right )}{2 d \sqrt {1-\frac {d}{b^{2}}}}}{b}\) \(134\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 84, normalized size = 0.98 \begin {gather*} -\frac {b \operatorname {erf}\left (\frac {a b}{\sqrt {b^{2} - d}} + \sqrt {b^{2} - d} x\right ) e^{\left (\frac {a^{2} b^{2}}{b^{2} - d} - a^{2} + c\right )}}{2 \, \sqrt {b^{2} - d} d} + \frac {\operatorname {erf}\left (b x + a\right ) e^{\left (d x^{2} + c\right )}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 100, normalized size = 1.16 \begin {gather*} -\frac {\sqrt {b^{2} - d} b \operatorname {erf}\left (\frac {a b + {\left (b^{2} - d\right )} x}{\sqrt {b^{2} - d}}\right ) e^{\left (\frac {b^{2} c + {\left (a^{2} - c\right )} d}{b^{2} - d}\right )} - {\left (b^{2} - d\right )} \operatorname {erf}\left (b x + a\right ) e^{\left (d x^{2} + c\right )}}{2 \, {\left (b^{2} d - d^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} e^{c} \int x e^{d x^{2}} \operatorname {erf}{\left (a + b x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(c)*Integral(x*exp(d*x**2)*erf(a + b*x), x)

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 87, normalized size = 1.01 \begin {gather*} \frac {b \operatorname {erf}\left (-\sqrt {b^{2} - d} {\left (\frac {a b}{b^{2} - d} + x\right )}\right ) e^{\left (\frac {b^{2} c + a^{2} d - c d}{b^{2} - d}\right )}}{2 \, \sqrt {b^{2} - d} d} + \frac {\operatorname {erf}\left (b x + a\right ) e^{\left (d x^{2} + c\right )}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.18, size = 89, normalized size = 1.03 \begin {gather*} \frac {\mathrm {erf}\left (a+b\,x\right )\,{\mathrm {e}}^{d\,x^2+c}}{2\,d}-\frac {b\,\mathrm {erf}\left (\frac {a\,b\,1{}\mathrm {i}-x\,\left (d-b^2\right )\,1{}\mathrm {i}}{\sqrt {d-b^2}}\right )\,{\mathrm {e}}^{c-a^2-\frac {a^2\,b^2}{d-b^2}}\,1{}\mathrm {i}}{2\,d\,\sqrt {d-b^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________