3.106 \(\int x \text {erfc}(b x) \, dx\)

Optimal. Leaf size=46 \[ \frac {\text {erf}(b x)}{4 b^2}-\frac {x e^{-b^2 x^2}}{2 \sqrt {\pi } b}+\frac {1}{2} x^2 \text {erfc}(b x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6362, 2212, 2205} \[ \frac {\text {Erf}(b x)}{4 b^2}-\frac {x e^{-b^2 x^2}}{2 \sqrt {\pi } b}+\frac {1}{2} x^2 \text {Erfc}(b x) \]

Antiderivative was successfully verified.

[In]

Int[x*Erfc[b*x],x]

[Out]

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

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]

Rule 2212

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 6362

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 43, normalized size = 0.93 \[ \frac {1}{4} \left (\frac {\text {erf}(b x)}{b^2}+2 x \left (x \text {erfc}(b x)-\frac {e^{-b^2 x^2}}{\sqrt {\pi } b}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Erfc[b*x],x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 50, normalized size = 1.09 \[ \frac {2 \, \pi b^{2} x^{2} - 2 \, \sqrt {\pi } b x e^{\left (-b^{2} x^{2}\right )} + {\left (\pi - 2 \, \pi b^{2} x^{2}\right )} \operatorname {erf}\left (b x\right )}{4 \, \pi b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*erfc(b*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.49, size = 49, normalized size = 1.07 \[ -\frac {1}{2} \, x^{2} \operatorname {erf}\left (b x\right ) + \frac {1}{2} \, x^{2} - \frac {b {\left (\frac {2 \, x e^{\left (-b^{2} x^{2}\right )}}{b^{2}} + \frac {\sqrt {\pi } \operatorname {erf}\left (-b x\right )}{b^{3}}\right )}}{4 \, \sqrt {\pi }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*erfc(b*x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 46, normalized size = 1.00 \[ \frac {\frac {b^{2} x^{2} \mathrm {erfc}\left (b x \right )}{2}+\frac {-\frac {{\mathrm e}^{-b^{2} x^{2}} b x}{2}+\frac {\sqrt {\pi }\, \erf \left (b x \right )}{4}}{\sqrt {\pi }}}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*erfc(b*x),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 44, normalized size = 0.96 \[ \frac {1}{2} \, x^{2} \operatorname {erfc}\left (b x\right ) - \frac {b {\left (\frac {2 \, x e^{\left (-b^{2} x^{2}\right )}}{b^{2}} - \frac {\sqrt {\pi } \operatorname {erf}\left (b x\right )}{b^{3}}\right )}}{4 \, \sqrt {\pi }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*erfc(b*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 38, normalized size = 0.83 \[ \frac {x^2\,\mathrm {erfc}\left (b\,x\right )}{2}-\frac {\frac {\mathrm {erfc}\left (b\,x\right )}{4}+\frac {b\,x\,{\mathrm {e}}^{-b^2\,x^2}}{2\,\sqrt {\pi }}}{b^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*erfc(b*x),x)

[Out]

(x^2*erfc(b*x))/2 - (erfc(b*x)/4 + (b*x*exp(-b^2*x^2))/(2*pi^(1/2)))/b^2

________________________________________________________________________________________

sympy [A]  time = 0.37, size = 42, normalized size = 0.91 \[ \begin {cases} \frac {x^{2} \operatorname {erfc}{\left (b x \right )}}{2} - \frac {x e^{- b^{2} x^{2}}}{2 \sqrt {\pi } b} - \frac {\operatorname {erfc}{\left (b x \right )}}{4 b^{2}} & \text {for}\: b \neq 0 \\\frac {x^{2}}{2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*erfc(b*x),x)

[Out]

Piecewise((x**2*erfc(b*x)/2 - x*exp(-b**2*x**2)/(2*sqrt(pi)*b) - erfc(b*x)/(4*b**2), Ne(b, 0)), (x**2/2, True)
)

________________________________________________________________________________________