Optimal. Leaf size=72 \[ -\frac{x e^{-b^2 x^2} \text{Erfc}(b x)}{\sqrt{\pi } b}-\frac{\text{Erfc}(b x)^2}{4 b^2}+\frac{e^{-2 b^2 x^2}}{2 \pi b^2}+\frac{1}{2} x^2 \text{Erfc}(b x)^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0810356, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.625, Rules used = {6365, 6386, 6374, 30, 2209} \[ -\frac{x e^{-b^2 x^2} \text{Erfc}(b x)}{\sqrt{\pi } b}-\frac{\text{Erfc}(b x)^2}{4 b^2}+\frac{e^{-2 b^2 x^2}}{2 \pi b^2}+\frac{1}{2} x^2 \text{Erfc}(b x)^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6365
Rule 6386
Rule 6374
Rule 30
Rule 2209
Rubi steps
\begin{align*} \int x \text{erfc}(b x)^2 \, dx &=\frac{1}{2} x^2 \text{erfc}(b x)^2+\frac{(2 b) \int e^{-b^2 x^2} x^2 \text{erfc}(b x) \, dx}{\sqrt{\pi }}\\ &=-\frac{e^{-b^2 x^2} x \text{erfc}(b x)}{b \sqrt{\pi }}+\frac{1}{2} x^2 \text{erfc}(b x)^2-\frac{2 \int e^{-2 b^2 x^2} x \, dx}{\pi }+\frac{\int e^{-b^2 x^2} \text{erfc}(b x) \, dx}{b \sqrt{\pi }}\\ &=\frac{e^{-2 b^2 x^2}}{2 b^2 \pi }-\frac{e^{-b^2 x^2} x \text{erfc}(b x)}{b \sqrt{\pi }}+\frac{1}{2} x^2 \text{erfc}(b x)^2-\frac{\operatorname{Subst}(\int x \, dx,x,\text{erfc}(b x))}{2 b^2}\\ &=\frac{e^{-2 b^2 x^2}}{2 b^2 \pi }-\frac{e^{-b^2 x^2} x \text{erfc}(b x)}{b \sqrt{\pi }}-\frac{\text{erfc}(b x)^2}{4 b^2}+\frac{1}{2} x^2 \text{erfc}(b x)^2\\ \end{align*}
Mathematica [A] time = 0.128451, size = 99, normalized size = 1.38 \[ \frac{\pi \left (2 b^2 x^2-1\right ) \text{Erf}(b x)^2+\left (4 \sqrt{\pi } b x e^{-b^2 x^2}+\pi \left (2-4 b^2 x^2\right )\right ) \text{Erf}(b x)+2 e^{-2 b^2 x^2} \left (\sqrt{\pi } b x e^{b^2 x^2}-1\right )^2}{4 \pi b^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.059, size = 0, normalized size = 0. \begin{align*} \int x \left ({\it erfc} \left ( bx \right ) \right ) ^{2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \operatorname{erfc}\left (b x\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.06366, size = 217, normalized size = 3.01 \begin{align*} \frac{2 \, \pi b^{2} x^{2} -{\left (\pi - 2 \, \pi b^{2} x^{2}\right )} \operatorname{erf}\left (b x\right )^{2} + 4 \, \sqrt{\pi }{\left (b x \operatorname{erf}\left (b x\right ) - b x\right )} e^{\left (-b^{2} x^{2}\right )} + 2 \,{\left (\pi - 2 \, \pi b^{2} x^{2}\right )} \operatorname{erf}\left (b x\right ) + 2 \, e^{\left (-2 \, b^{2} x^{2}\right )}}{4 \, \pi b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.833607, size = 68, normalized size = 0.94 \begin{align*} \begin{cases} \frac{x^{2} \operatorname{erfc}^{2}{\left (b x \right )}}{2} - \frac{x e^{- b^{2} x^{2}} \operatorname{erfc}{\left (b x \right )}}{\sqrt{\pi } b} - \frac{\operatorname{erfc}^{2}{\left (b x \right )}}{4 b^{2}} + \frac{e^{- 2 b^{2} x^{2}}}{2 \pi b^{2}} & \text{for}\: b \neq 0 \\\frac{x^{2}}{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \operatorname{erfc}\left (b x\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]