3.2.57 \(\int e^{c+d x^2} x^3 \text {Erfc}(b x) \, dx\) [157]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 155, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {6521, 6518, 2236, 2243} \begin {gather*} -\frac {b e^c \text {Erf}\left (x \sqrt {b^2-d}\right )}{2 d^2 \sqrt {b^2-d}}+\frac {b e^c \text {Erf}\left (x \sqrt {b^2-d}\right )}{4 d \left (b^2-d\right )^{3/2}}-\frac {b x e^{c-x^2 \left (b^2-d\right )}}{2 \sqrt {\pi } d \left (b^2-d\right )}-\frac {\text {Erfc}(b x) e^{c+d x^2}}{2 d^2}+\frac {x^2 \text {Erfc}(b x) e^{c+d x^2}}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^(c + d*x^2)*x^3*Erfc[b*x],x]

[Out]

-1/2*(b*E^(c - (b^2 - d)*x^2)*x)/((b^2 - d)*d*Sqrt[Pi]) - (b*E^c*Erf[Sqrt[b^2 - d]*x])/(2*Sqrt[b^2 - d]*d^2) +
 (b*E^c*Erf[Sqrt[b^2 - d]*x])/(4*(b^2 - d)^(3/2)*d) - (E^(c + d*x^2)*Erfc[b*x])/(2*d^2) + (E^(c + d*x^2)*x^2*E
rfc[b*x])/(2*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 2243

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
- n + 1)*(F^(a + b*(c + d*x)^n)/(b*d*n*Log[F])), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 6518

Int[E^((c_.) + (d_.)*(x_)^2)*Erfc[(a_.) + (b_.)*(x_)]*(x_), x_Symbol] :> Simp[E^(c + d*x^2)*(Erfc[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]

Rule 6521

Int[E^((c_.) + (d_.)*(x_)^2)*Erfc[(a_.) + (b_.)*(x_)]*(x_)^(m_), x_Symbol] :> Simp[x^(m - 1)*E^(c + d*x^2)*(Er
fc[a + b*x]/(2*d)), x] + (-Dist[(m - 1)/(2*d), Int[x^(m - 2)*E^(c + d*x^2)*Erfc[a + b*x], x], x] + Dist[b/(d*S
qrt[Pi]), Int[x^(m - 1)*E^(-a^2 + c - 2*a*b*x - (b^2 - d)*x^2), x], x]) /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 1
]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.23, size = 99, normalized size = 0.64 \begin {gather*} \frac {e^c \left (\frac {2 b d e^{\left (-b^2+d\right ) x^2} x}{\left (-b^2+d\right ) \sqrt {\pi }}+2 e^{d x^2} \left (-1+d x^2\right ) \text {Erfc}(b x)+\frac {\left (2 b^3-3 b d\right ) \text {Erfi}\left (\sqrt {-b^2+d} x\right )}{\left (-b^2+d\right )^{3/2}}\right )}{4 d^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^(c + d*x^2)*x^3*Erfc[b*x],x]

[Out]

(E^c*((2*b*d*E^((-b^2 + d)*x^2)*x)/((-b^2 + d)*Sqrt[Pi]) + 2*E^(d*x^2)*(-1 + d*x^2)*Erfc[b*x] + ((2*b^3 - 3*b*
d)*Erfi[Sqrt[-b^2 + d]*x])/(-b^2 + d)^(3/2)))/(4*d^2)

________________________________________________________________________________________

Maple [A]
time = 0.50, size = 206, normalized size = 1.33

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x^3*erfc(b*x)*e^(d*x^2 + c), x)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 190, normalized size = 1.23 \begin {gather*} -\frac {\pi {\left (2 \, b^{3} - 3 \, b d\right )} \sqrt {b^{2} - d} \operatorname {erf}\left (\sqrt {b^{2} - d} x\right ) e^{c} + 2 \, \sqrt {\pi } {\left (b^{3} d - b d^{2}\right )} x e^{\left (-b^{2} x^{2} + d x^{2} + c\right )} - 2 \, {\left (\pi {\left (b^{4} d - 2 \, b^{2} d^{2} + d^{3}\right )} x^{2} - \pi {\left (b^{4} - 2 \, b^{2} d + d^{2}\right )} - {\left (\pi {\left (b^{4} d - 2 \, b^{2} d^{2} + d^{3}\right )} x^{2} - \pi {\left (b^{4} - 2 \, b^{2} d + d^{2}\right )}\right )} \operatorname {erf}\left (b x\right )\right )} e^{\left (d x^{2} + c\right )}}{4 \, \pi {\left (b^{4} d^{2} - 2 \, b^{2} d^{3} + d^{4}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(d*x**2+c)*x**3*erfc(b*x),x)

[Out]

exp(c)*Integral(x**3*exp(d*x**2)*erfc(b*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x^3*erfc(b*x)*e^(d*x^2 + c), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^3\,{\mathrm {e}}^{d\,x^2+c}\,\mathrm {erfc}\left (b\,x\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*exp(c + d*x^2)*erfc(b*x),x)

[Out]

int(x^3*exp(c + d*x^2)*erfc(b*x), x)

________________________________________________________________________________________