Optimal. Leaf size=71 \[ \frac {x e^{-b^2 x^2} \text {erf}(b x)}{\sqrt {\pi } b}-\frac {\text {erf}(b x)^2}{4 b^2}+\frac {e^{-2 b^2 x^2}}{2 \pi b^2}+\frac {1}{2} x^2 \text {erf}(b x)^2 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 71, normalized size of antiderivative = 1.00, 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 = {6364, 6385, 6373, 30, 2209} \[ \frac {x e^{-b^2 x^2} \text {Erf}(b x)}{\sqrt {\pi } b}-\frac {\text {Erf}(b x)^2}{4 b^2}+\frac {e^{-2 b^2 x^2}}{2 \pi b^2}+\frac {1}{2} x^2 \text {Erf}(b x)^2 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2209
Rule 6364
Rule 6373
Rule 6385
Rubi steps
\begin {align*} \int x \text {erf}(b x)^2 \, dx &=\frac {1}{2} x^2 \text {erf}(b x)^2-\frac {(2 b) \int e^{-b^2 x^2} x^2 \text {erf}(b x) \, dx}{\sqrt {\pi }}\\ &=\frac {e^{-b^2 x^2} x \text {erf}(b x)}{b \sqrt {\pi }}+\frac {1}{2} x^2 \text {erf}(b x)^2-\frac {2 \int e^{-2 b^2 x^2} x \, dx}{\pi }-\frac {\int e^{-b^2 x^2} \text {erf}(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 {erf}(b x)}{b \sqrt {\pi }}+\frac {1}{2} x^2 \text {erf}(b x)^2-\frac {\operatorname {Subst}(\int x \, dx,x,\text {erf}(b x))}{2 b^2}\\ &=\frac {e^{-2 b^2 x^2}}{2 b^2 \pi }+\frac {e^{-b^2 x^2} x \text {erf}(b x)}{b \sqrt {\pi }}-\frac {\text {erf}(b x)^2}{4 b^2}+\frac {1}{2} x^2 \text {erf}(b x)^2\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 64, normalized size = 0.90 \[ \frac {\pi \left (2 b^2 x^2-1\right ) \text {erf}(b x)^2+4 \sqrt {\pi } b x e^{-b^2 x^2} \text {erf}(b x)+2 e^{-2 b^2 x^2}}{4 \pi b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 59, normalized size = 0.83 \[ \frac {4 \, \sqrt {\pi } b x \operatorname {erf}\left (b x\right ) e^{\left (-b^{2} x^{2}\right )} - {\left (\pi - 2 \, \pi b^{2} x^{2}\right )} \operatorname {erf}\left (b x\right )^{2} + 2 \, e^{\left (-2 \, b^{2} x^{2}\right )}}{4 \, \pi b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \operatorname {erf}\left (b x\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.01, size = 0, normalized size = 0.00 \[ \int x \erf \left (b x \right )^{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 \[ -\frac {-\frac {e^{\left (-2 \, b^{2} x^{2}\right )}}{2 \, b^{2}}}{\pi } + \frac {4 \, b x \operatorname {erf}\left (b x\right ) e^{\left (-b^{2} x^{2}\right )} + {\left (2 \, \sqrt {\pi } b^{2} x^{2} - \sqrt {\pi }\right )} \operatorname {erf}\left (b x\right )^{2}}{4 \, \sqrt {\pi } b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.17, size = 67, normalized size = 0.94 \[ \frac {\frac {{\mathrm {e}}^{-2\,b^2\,x^2}}{2}+b\,x\,\sqrt {\pi }\,{\mathrm {e}}^{-b^2\,x^2}\,\mathrm {erf}\left (b\,x\right )}{b^2\,\pi }-\frac {\frac {{\mathrm {erf}\left (b\,x\right )}^2}{4}-\frac {b^2\,x^2\,{\mathrm {erf}\left (b\,x\right )}^2}{2}}{b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.68, size = 65, normalized size = 0.92 \[ \begin {cases} \frac {x^{2} \operatorname {erf}^{2}{\left (b x \right )}}{2} + \frac {x e^{- b^{2} x^{2}} \operatorname {erf}{\left (b x \right )}}{\sqrt {\pi } b} - \frac {\operatorname {erf}^{2}{\left (b x \right )}}{4 b^{2}} + \frac {e^{- 2 b^{2} x^{2}}}{2 \pi b^{2}} & \text {for}\: b \neq 0 \\0 & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________