Optimal. Leaf size=113 \[ \frac {e^{-2 b^2 x^2} x}{3 b^2 \pi }-\frac {5 \text {Erf}\left (\sqrt {2} b x\right )}{6 b^3 \sqrt {2 \pi }}-\frac {2 e^{-b^2 x^2} \text {Erfc}(b x)}{3 b^3 \sqrt {\pi }}-\frac {2 e^{-b^2 x^2} x^2 \text {Erfc}(b x)}{3 b \sqrt {\pi }}+\frac {1}{3} x^3 \text {Erfc}(b x)^2 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6500, 6521,
6518, 2236, 2243} \begin {gather*} -\frac {5 \text {Erf}\left (\sqrt {2} b x\right )}{6 \sqrt {2 \pi } b^3}-\frac {2 x^2 e^{-b^2 x^2} \text {Erfc}(b x)}{3 \sqrt {\pi } b}+\frac {x e^{-2 b^2 x^2}}{3 \pi b^2}-\frac {2 e^{-b^2 x^2} \text {Erfc}(b x)}{3 \sqrt {\pi } b^3}+\frac {1}{3} x^3 \text {Erfc}(b x)^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2236
Rule 2243
Rule 6500
Rule 6518
Rule 6521
Rubi steps
\begin {align*} \int x^2 \text {erfc}(b x)^2 \, dx &=\frac {1}{3} x^3 \text {erfc}(b x)^2+\frac {(4 b) \int e^{-b^2 x^2} x^3 \text {erfc}(b x) \, dx}{3 \sqrt {\pi }}\\ &=-\frac {2 e^{-b^2 x^2} x^2 \text {erfc}(b x)}{3 b \sqrt {\pi }}+\frac {1}{3} x^3 \text {erfc}(b x)^2-\frac {4 \int e^{-2 b^2 x^2} x^2 \, dx}{3 \pi }+\frac {4 \int e^{-b^2 x^2} x \text {erfc}(b x) \, dx}{3 b \sqrt {\pi }}\\ &=\frac {e^{-2 b^2 x^2} x}{3 b^2 \pi }-\frac {2 e^{-b^2 x^2} \text {erfc}(b x)}{3 b^3 \sqrt {\pi }}-\frac {2 e^{-b^2 x^2} x^2 \text {erfc}(b x)}{3 b \sqrt {\pi }}+\frac {1}{3} x^3 \text {erfc}(b x)^2-\frac {\int e^{-2 b^2 x^2} \, dx}{3 b^2 \pi }-\frac {4 \int e^{-2 b^2 x^2} \, dx}{3 b^2 \pi }\\ &=\frac {e^{-2 b^2 x^2} x}{3 b^2 \pi }-\frac {\sqrt {\frac {2}{\pi }} \text {erf}\left (\sqrt {2} b x\right )}{3 b^3}-\frac {\text {erf}\left (\sqrt {2} b x\right )}{6 b^3 \sqrt {2 \pi }}-\frac {2 e^{-b^2 x^2} \text {erfc}(b x)}{3 b^3 \sqrt {\pi }}-\frac {2 e^{-b^2 x^2} x^2 \text {erfc}(b x)}{3 b \sqrt {\pi }}+\frac {1}{3} x^3 \text {erfc}(b x)^2\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 88, normalized size = 0.78 \begin {gather*} \frac {4 b e^{-2 b^2 x^2} x-5 \sqrt {2 \pi } \text {Erf}\left (\sqrt {2} b x\right )-8 e^{-b^2 x^2} \sqrt {\pi } \left (1+b^2 x^2\right ) \text {Erfc}(b x)+4 b^3 \pi x^3 \text {Erfc}(b x)^2}{12 b^3 \pi } \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.33, size = 151, normalized size = 1.34
method | result | size |
derivativedivides | \(\frac {\frac {b^{3} x^{3}}{3}-\frac {2 \erf \left (b x \right ) b^{3} x^{3}}{3}+\frac {-\frac {2 b^{2} x^{2} {\mathrm e}^{-b^{2} x^{2}}}{3}-\frac {2 \,{\mathrm e}^{-b^{2} x^{2}}}{3}}{\sqrt {\pi }}+\frac {\erf \left (b x \right )^{2} b^{3} x^{3}}{3}-\frac {4 \erf \left (b x \right ) \left (-\frac {b^{2} x^{2} {\mathrm e}^{-b^{2} x^{2}}}{2}-\frac {{\mathrm e}^{-b^{2} x^{2}}}{2}\right )}{3 \sqrt {\pi }}+\frac {-\frac {5 \sqrt {2}\, \sqrt {\pi }\, \erf \left (b x \sqrt {2}\right )}{12}+\frac {{\mathrm e}^{-2 b^{2} x^{2}} b x}{3}}{\pi }}{b^{3}}\) | \(151\) |
default | \(\frac {\frac {b^{3} x^{3}}{3}-\frac {2 \erf \left (b x \right ) b^{3} x^{3}}{3}+\frac {-\frac {2 b^{2} x^{2} {\mathrm e}^{-b^{2} x^{2}}}{3}-\frac {2 \,{\mathrm e}^{-b^{2} x^{2}}}{3}}{\sqrt {\pi }}+\frac {\erf \left (b x \right )^{2} b^{3} x^{3}}{3}-\frac {4 \erf \left (b x \right ) \left (-\frac {b^{2} x^{2} {\mathrm e}^{-b^{2} x^{2}}}{2}-\frac {{\mathrm e}^{-b^{2} x^{2}}}{2}\right )}{3 \sqrt {\pi }}+\frac {-\frac {5 \sqrt {2}\, \sqrt {\pi }\, \erf \left (b x \sqrt {2}\right )}{12}+\frac {{\mathrm e}^{-2 b^{2} x^{2}} b x}{3}}{\pi }}{b^{3}}\) | \(151\) |
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 = 123, normalized size = 1.09 \begin {gather*} \frac {4 \, \pi b^{4} x^{3} \operatorname {erf}\left (b x\right )^{2} - 8 \, \pi b^{4} x^{3} \operatorname {erf}\left (b x\right ) + 4 \, \pi b^{4} x^{3} + 4 \, b^{2} x e^{\left (-2 \, b^{2} x^{2}\right )} - 5 \, \sqrt {2} \sqrt {\pi } \sqrt {b^{2}} \operatorname {erf}\left (\sqrt {2} \sqrt {b^{2}} x\right ) - 8 \, \sqrt {\pi } {\left (b^{3} x^{2} - {\left (b^{3} x^{2} + b\right )} \operatorname {erf}\left (b x\right ) + b\right )} e^{\left (-b^{2} x^{2}\right )}}{12 \, \pi b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \operatorname {erfc}^{2}{\left (b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 151, normalized size = 1.34 \begin {gather*} \frac {1}{3} \, x^{3} \operatorname {erf}\left (b x\right )^{2} - \frac {2}{3} \, x^{3} \operatorname {erf}\left (b x\right ) + \frac {1}{3} \, x^{3} + \frac {b {\left (\frac {8 \, {\left (b^{2} x^{2} + 1\right )} \operatorname {erf}\left (b x\right ) e^{\left (-b^{2} x^{2}\right )}}{b^{4}} + \frac {b^{2} {\left (\frac {4 \, x e^{\left (-2 \, b^{2} x^{2}\right )}}{b^{2}} + \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\sqrt {2} b x\right )}{b^{3}}\right )} + \frac {4 \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\sqrt {2} b x\right )}{b}}{\sqrt {\pi } b^{3}}\right )}}{12 \, \sqrt {\pi }} - \frac {2 \, {\left (b^{2} x^{2} + 1\right )} e^{\left (-b^{2} x^{2}\right )}}{3 \, \sqrt {\pi } b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,{\mathrm {erfc}\left (b\,x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________