3.10 \(\int x^2 \text {erf}(b x) \, dx\)

Optimal. Leaf size=59 \[ \frac {x^2 e^{-b^2 x^2}}{3 \sqrt {\pi } b}+\frac {e^{-b^2 x^2}}{3 \sqrt {\pi } b^3}+\frac {1}{3} x^3 \text {erf}(b x) \]

[Out]

1/3*x^3*erf(b*x)+1/3/b^3/exp(b^2*x^2)/Pi^(1/2)+1/3*x^2/b/exp(b^2*x^2)/Pi^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {6361, 2212, 2209} \[ \frac {x^2 e^{-b^2 x^2}}{3 \sqrt {\pi } b}+\frac {e^{-b^2 x^2}}{3 \sqrt {\pi } b^3}+\frac {1}{3} x^3 \text {Erf}(b x) \]

Antiderivative was successfully verified.

[In]

Int[x^2*Erf[b*x],x]

[Out]

1/(3*b^3*E^(b^2*x^2)*Sqrt[Pi]) + x^2/(3*b*E^(b^2*x^2)*Sqrt[Pi]) + (x^3*Erf[b*x])/3

Rule 2209

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^n*
F^(a + b*(c + d*x)^n))/(b*f*n*(c + d*x)^n*Log[F]), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rule 2212

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^(m
 - n + 1)*F^(a + b*(c + d*x)^n))/(b*d*n*Log[F]), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[(2*(m + 1))/n] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 6361

Int[Erf[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^(m + 1)*Erf[a + b*x])/(d*
(m + 1)), x] - Dist[(2*b)/(Sqrt[Pi]*d*(m + 1)), Int[(c + d*x)^(m + 1)/E^(a + b*x)^2, x], x] /; FreeQ[{a, b, c,
 d, m}, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int x^2 \text {erf}(b x) \, dx &=\frac {1}{3} x^3 \text {erf}(b x)-\frac {(2 b) \int e^{-b^2 x^2} x^3 \, dx}{3 \sqrt {\pi }}\\ &=\frac {e^{-b^2 x^2} x^2}{3 b \sqrt {\pi }}+\frac {1}{3} x^3 \text {erf}(b x)-\frac {2 \int e^{-b^2 x^2} x \, dx}{3 b \sqrt {\pi }}\\ &=\frac {e^{-b^2 x^2}}{3 b^3 \sqrt {\pi }}+\frac {e^{-b^2 x^2} x^2}{3 b \sqrt {\pi }}+\frac {1}{3} x^3 \text {erf}(b x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 41, normalized size = 0.69 \[ \frac {1}{3} \left (\frac {e^{-b^2 x^2} \left (b^2 x^2+1\right )}{\sqrt {\pi } b^3}+x^3 \text {erf}(b x)\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Erf[b*x],x]

[Out]

((1 + b^2*x^2)/(b^3*E^(b^2*x^2)*Sqrt[Pi]) + x^3*Erf[b*x])/3

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 43, normalized size = 0.73 \[ \frac {\pi b^{3} x^{3} \operatorname {erf}\left (b x\right ) + \sqrt {\pi } {\left (b^{2} x^{2} + 1\right )} e^{\left (-b^{2} x^{2}\right )}}{3 \, \pi b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*erf(b*x),x, algorithm="fricas")

[Out]

1/3*(pi*b^3*x^3*erf(b*x) + sqrt(pi)*(b^2*x^2 + 1)*e^(-b^2*x^2))/(pi*b^3)

________________________________________________________________________________________

giac [A]  time = 0.19, size = 36, normalized size = 0.61 \[ \frac {1}{3} \, x^{3} \operatorname {erf}\left (b x\right ) + \frac {{\left (b^{2} x^{2} + 1\right )} e^{\left (-b^{2} x^{2}\right )}}{3 \, \sqrt {\pi } b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*erf(b*x),x, algorithm="giac")

[Out]

1/3*x^3*erf(b*x) + 1/3*(b^2*x^2 + 1)*e^(-b^2*x^2)/(sqrt(pi)*b^3)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 54, normalized size = 0.92 \[ \frac {\frac {b^{3} x^{3} \erf \left (b x \right )}{3}-\frac {2 \left (-\frac {{\mathrm e}^{-b^{2} x^{2}} b^{2} x^{2}}{2}-\frac {{\mathrm e}^{-b^{2} x^{2}}}{2}\right )}{3 \sqrt {\pi }}}{b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*erf(b*x),x)

[Out]

1/b^3*(1/3*b^3*x^3*erf(b*x)-2/3/Pi^(1/2)*(-1/2/exp(b^2*x^2)*b^2*x^2-1/2/exp(b^2*x^2)))

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 36, normalized size = 0.61 \[ \frac {1}{3} \, x^{3} \operatorname {erf}\left (b x\right ) + \frac {{\left (b^{2} x^{2} + 1\right )} e^{\left (-b^{2} x^{2}\right )}}{3 \, \sqrt {\pi } b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*erf(b*x),x, algorithm="maxima")

[Out]

1/3*x^3*erf(b*x) + 1/3*(b^2*x^2 + 1)*e^(-b^2*x^2)/(sqrt(pi)*b^3)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 36, normalized size = 0.61 \[ \frac {x^3\,\mathrm {erf}\left (b\,x\right )}{3}+\frac {{\mathrm {e}}^{-b^2\,x^2}\,\left (b^2\,x^2+1\right )}{3\,b^3\,\sqrt {\pi }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*erf(b*x),x)

[Out]

(x^3*erf(b*x))/3 + (exp(-b^2*x^2)*(b^2*x^2 + 1))/(3*b^3*pi^(1/2))

________________________________________________________________________________________

sympy [A]  time = 0.65, size = 51, normalized size = 0.86 \[ \begin {cases} \frac {x^{3} \operatorname {erf}{\left (b x \right )}}{3} + \frac {x^{2} e^{- b^{2} x^{2}}}{3 \sqrt {\pi } b} + \frac {e^{- b^{2} x^{2}}}{3 \sqrt {\pi } b^{3}} & \text {for}\: b \neq 0 \\0 & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*erf(b*x),x)

[Out]

Piecewise((x**3*erf(b*x)/3 + x**2*exp(-b**2*x**2)/(3*sqrt(pi)*b) + exp(-b**2*x**2)/(3*sqrt(pi)*b**3), Ne(b, 0)
), (0, True))

________________________________________________________________________________________