3.134 \(\int \text{Erfc}(b x)^2 \, dx\)

Optimal. Leaf size=56 \[ -\frac{2 e^{-b^2 x^2} \text{Erfc}(b x)}{\sqrt{\pi } b}-\frac{\sqrt{\frac{2}{\pi }} \text{Erf}\left (\sqrt{2} b x\right )}{b}+x \text{Erfc}(b x)^2 \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0458552, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.667, Rules used = {6353, 12, 6383, 2205} \[ -\frac{2 e^{-b^2 x^2} \text{Erfc}(b x)}{\sqrt{\pi } b}-\frac{\sqrt{\frac{2}{\pi }} \text{Erf}\left (\sqrt{2} b x\right )}{b}+x \text{Erfc}(b x)^2 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6353

Int[Erfc[(a_.) + (b_.)*(x_)]^2, x_Symbol] :> Simp[((a + b*x)*Erfc[a + b*x]^2)/b, x] + Dist[4/Sqrt[Pi], Int[((a
 + b*x)*Erfc[a + b*x])/E^(a + b*x)^2, x], x] /; FreeQ[{a, b}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 6383

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 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]

Rubi steps

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

Mathematica [A]  time = 0.0497155, size = 56, normalized size = 1. \[ -\frac{2 e^{-b^2 x^2} \text{Erfc}(b x)}{\sqrt{\pi } b}-\frac{\sqrt{\frac{2}{\pi }} \text{Erf}\left (\sqrt{2} b x\right )}{b}+x \text{Erfc}(b x)^2 \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 48, normalized size = 0.9 \begin{align*}{\frac{1}{b} \left ( bx \left ({\it Erf} \left ( bx \right ) \right ) ^{2}+2\,{\frac{{\it Erf} \left ( bx \right ){{\rm e}^{-{b}^{2}{x}^{2}}}}{\sqrt{\pi }}}-{\frac{\sqrt{2}{\it Erf} \left ( bx\sqrt{2} \right ) }{\sqrt{\pi }}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \operatorname{erfc}\left (b x\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.12992, size = 219, normalized size = 3.91 \begin{align*} \frac{\pi b^{2} x \operatorname{erf}\left (b x\right )^{2} - 2 \, \pi b^{2} x \operatorname{erf}\left (b x\right ) + \pi b^{2} x - \sqrt{2} \sqrt{\pi } \sqrt{b^{2}} \operatorname{erf}\left (\sqrt{2} \sqrt{b^{2}} x\right ) + 2 \, \sqrt{\pi }{\left (b \operatorname{erf}\left (b x\right ) - b\right )} e^{\left (-b^{2} x^{2}\right )}}{\pi b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \operatorname{erfc}^{2}{\left (b x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(erfc(b*x)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.31717, size = 99, normalized size = 1.77 \begin{align*} x \operatorname{erf}\left (b x\right )^{2} - 2 \, x \operatorname{erf}\left (b x\right ) + \frac{b{\left (\frac{2 \, \operatorname{erf}\left (b x\right ) e^{\left (-b^{2} x^{2}\right )}}{b^{2}} + \frac{\sqrt{2} \operatorname{erf}\left (-\sqrt{2} b x\right )}{b^{2}}\right )}}{\sqrt{\pi }} + x - \frac{2 \, e^{\left (-b^{2} x^{2}\right )}}{\sqrt{\pi } b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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