Optimal. Leaf size=63 \[ \frac {e^{-2 b^2 x^2}}{4 b^3 \sqrt {\pi }}-\frac {e^{-b^2 x^2} x \text {Erfc}(b x)}{2 b^2}-\frac {\sqrt {\pi } \text {Erfc}(b x)^2}{8 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {6521, 6509, 30,
2240} \begin {gather*} -\frac {\sqrt {\pi } \text {Erfc}(b x)^2}{8 b^3}-\frac {x e^{-b^2 x^2} \text {Erfc}(b x)}{2 b^2}+\frac {e^{-2 b^2 x^2}}{4 \sqrt {\pi } b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2240
Rule 6509
Rule 6521
Rubi steps
\begin {align*} \int e^{-b^2 x^2} x^2 \text {erfc}(b x) \, dx &=-\frac {e^{-b^2 x^2} x \text {erfc}(b x)}{2 b^2}+\frac {\int e^{-b^2 x^2} \text {erfc}(b x) \, dx}{2 b^2}-\frac {\int e^{-2 b^2 x^2} x \, dx}{b \sqrt {\pi }}\\ &=\frac {e^{-2 b^2 x^2}}{4 b^3 \sqrt {\pi }}-\frac {e^{-b^2 x^2} x \text {erfc}(b x)}{2 b^2}-\frac {\sqrt {\pi } \text {Subst}(\int x \, dx,x,\text {erfc}(b x))}{4 b^3}\\ &=\frac {e^{-2 b^2 x^2}}{4 b^3 \sqrt {\pi }}-\frac {e^{-b^2 x^2} x \text {erfc}(b x)}{2 b^2}-\frac {\sqrt {\pi } \text {erfc}(b x)^2}{8 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 79, normalized size = 1.25 \begin {gather*} \frac {2 e^{-2 b^2 x^2} \left (\frac {1}{\sqrt {\pi }}-2 b e^{b^2 x^2} x\right )+\left (2 \sqrt {\pi }+4 b e^{-b^2 x^2} x\right ) \text {Erf}(b x)-\sqrt {\pi } \text {Erf}(b x)^2}{8 b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int x^{2} \mathrm {erfc}\left (b x \right ) {\mathrm e}^{-b^{2} x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 66, normalized size = 1.05 \begin {gather*} \frac {4 \, {\left (\pi b x \operatorname {erf}\left (b x\right ) - \pi b x\right )} e^{\left (-b^{2} x^{2}\right )} - \sqrt {\pi } {\left (\pi \operatorname {erf}\left (b x\right )^{2} - 2 \, \pi \operatorname {erf}\left (b x\right ) - 2 \, e^{\left (-2 \, b^{2} x^{2}\right )}\right )}}{8 \, \pi b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.36, size = 63, normalized size = 1.00 \begin {gather*} \begin {cases} - \frac {x e^{- b^{2} x^{2}} \operatorname {erfc}{\left (b x \right )}}{2 b^{2}} - \frac {\sqrt {\pi } \operatorname {erfc}^{2}{\left (b x \right )}}{8 b^{3}} + \frac {e^{- 2 b^{2} x^{2}}}{4 \sqrt {\pi } b^{3}} & \text {for}\: b \neq 0 \\\frac {x^{3}}{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.19, size = 49, normalized size = 0.78 \begin {gather*} \frac {2\,{\mathrm {e}}^{-2\,b^2\,x^2}-\pi \,{\mathrm {erfc}\left (b\,x\right )}^2}{8\,b^3\,\sqrt {\pi }}-\frac {x\,{\mathrm {e}}^{-b^2\,x^2}\,\mathrm {erfc}\left (b\,x\right )}{2\,b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________