Optimal. Leaf size=46 \[ \frac {e^{-b^2 x^2} x}{2 b \sqrt {\pi }}-\frac {\text {Erf}(b x)}{4 b^2}+\frac {1}{2} x^2 \text {Erf}(b x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6496, 2243,
2236} \begin {gather*} -\frac {\text {Erf}(b x)}{4 b^2}+\frac {x e^{-b^2 x^2}}{2 \sqrt {\pi } b}+\frac {1}{2} x^2 \text {Erf}(b x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2236
Rule 2243
Rule 6496
Rubi steps
\begin {align*} \int x \text {erf}(b x) \, dx &=\frac {1}{2} x^2 \text {erf}(b x)-\frac {b \int e^{-b^2 x^2} x^2 \, dx}{\sqrt {\pi }}\\ &=\frac {e^{-b^2 x^2} x}{2 b \sqrt {\pi }}+\frac {1}{2} x^2 \text {erf}(b x)-\frac {\int e^{-b^2 x^2} \, dx}{2 b \sqrt {\pi }}\\ &=\frac {e^{-b^2 x^2} x}{2 b \sqrt {\pi }}-\frac {\text {erf}(b x)}{4 b^2}+\frac {1}{2} x^2 \text {erf}(b x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 42, normalized size = 0.91 \begin {gather*} \frac {1}{4} \left (\frac {2 e^{-b^2 x^2} x}{b \sqrt {\pi }}+\left (-\frac {1}{b^2}+2 x^2\right ) \text {Erf}(b x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 47, normalized size = 1.02
method | result | size |
meijerg | \(\frac {{\mathrm e}^{-b^{2} x^{2}} b x -\frac {\left (-6 b^{2} x^{2}+3\right ) \erf \left (b x \right ) \sqrt {\pi }}{6}}{2 b^{2} \sqrt {\pi }}\) | \(41\) |
derivativedivides | \(\frac {\frac {\erf \left (b x \right ) b^{2} x^{2}}{2}-\frac {-\frac {{\mathrm e}^{-b^{2} x^{2}} b x}{2}+\frac {\erf \left (b x \right ) \sqrt {\pi }}{4}}{\sqrt {\pi }}}{b^{2}}\) | \(47\) |
default | \(\frac {\frac {\erf \left (b x \right ) b^{2} x^{2}}{2}-\frac {-\frac {{\mathrm e}^{-b^{2} x^{2}} b x}{2}+\frac {\erf \left (b x \right ) \sqrt {\pi }}{4}}{\sqrt {\pi }}}{b^{2}}\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 44, normalized size = 0.96 \begin {gather*} \frac {1}{2} \, x^{2} \operatorname {erf}\left (b x\right ) + \frac {b {\left (\frac {2 \, x e^{\left (-b^{2} x^{2}\right )}}{b^{2}} - \frac {\sqrt {\pi } \operatorname {erf}\left (b x\right )}{b^{3}}\right )}}{4 \, \sqrt {\pi }} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 42, normalized size = 0.91 \begin {gather*} \frac {2 \, \sqrt {\pi } b x e^{\left (-b^{2} x^{2}\right )} - {\left (\pi - 2 \, \pi b^{2} x^{2}\right )} \operatorname {erf}\left (b x\right )}{4 \, \pi b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.18, size = 39, normalized size = 0.85 \begin {gather*} \begin {cases} \frac {x^{2} \operatorname {erf}{\left (b x \right )}}{2} + \frac {x e^{- b^{2} x^{2}}}{2 \sqrt {\pi } b} - \frac {\operatorname {erf}{\left (b x \right )}}{4 b^{2}} & \text {for}\: b \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 44, normalized size = 0.96 \begin {gather*} \frac {1}{2} \, x^{2} \operatorname {erf}\left (b x\right ) + \frac {b {\left (\frac {2 \, x e^{\left (-b^{2} x^{2}\right )}}{b^{2}} + \frac {\sqrt {\pi } \operatorname {erf}\left (-b x\right )}{b^{3}}\right )}}{4 \, \sqrt {\pi }} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 48, normalized size = 1.04 \begin {gather*} \frac {x^2\,\mathrm {erf}\left (b\,x\right )}{2}+\frac {b\,\mathrm {erfi}\left (x\,\sqrt {-b^2}\right )}{4\,{\left (-b^2\right )}^{3/2}}+\frac {x\,{\mathrm {e}}^{-b^2\,x^2}}{2\,b\,\sqrt {\pi }} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________