3.3.30 \(\int x \text {Erfi}(b x)^2 \, dx\) [230]

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

[Out]

1/2*exp(2*b^2*x^2)/b^2/Pi+1/4*erfi(b*x)^2/b^2+1/2*x^2*erfi(b*x)^2-exp(b^2*x^2)*x*erfi(b*x)/b/Pi^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, 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 = {6501, 6522, 6510, 30, 2240} \begin {gather*} -\frac {x e^{b^2 x^2} \text {Erfi}(b x)}{\sqrt {\pi } b}+\frac {\text {Erfi}(b x)^2}{4 b^2}+\frac {e^{2 b^2 x^2}}{2 \pi b^2}+\frac {1}{2} x^2 \text {Erfi}(b x)^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(2*b^2*x^2)/(2*b^2*Pi) - (E^(b^2*x^2)*x*Erfi[b*x])/(b*Sqrt[Pi]) + Erfi[b*x]^2/(4*b^2) + (x^2*Erfi[b*x]^2)/2

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2240

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 6501

Int[Erfi[(b_.)*(x_)]^2*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*(Erfi[b*x]^2/(m + 1)), x] - Dist[4*(b/(Sqrt[Pi]
*(m + 1))), Int[x^(m + 1)*E^(b^2*x^2)*Erfi[b*x], x], x] /; FreeQ[b, x] && (IGtQ[m, 0] || ILtQ[(m + 1)/2, 0])

Rule 6510

Int[E^((c_.) + (d_.)*(x_)^2)*Erfi[(b_.)*(x_)]^(n_.), x_Symbol] :> Dist[E^c*(Sqrt[Pi]/(2*b)), Subst[Int[x^n, x]
, x, Erfi[b*x]], x] /; FreeQ[{b, c, d, n}, x] && EqQ[d, b^2]

Rule 6522

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

Rubi steps

\begin {align*} \int x \text {erfi}(b x)^2 \, dx &=\frac {1}{2} x^2 \text {erfi}(b x)^2-\frac {(2 b) \int e^{b^2 x^2} x^2 \text {erfi}(b x) \, dx}{\sqrt {\pi }}\\ &=-\frac {e^{b^2 x^2} x \text {erfi}(b x)}{b \sqrt {\pi }}+\frac {1}{2} x^2 \text {erfi}(b x)^2+\frac {2 \int e^{2 b^2 x^2} x \, dx}{\pi }+\frac {\int e^{b^2 x^2} \text {erfi}(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 {erfi}(b x)}{b \sqrt {\pi }}+\frac {1}{2} x^2 \text {erfi}(b x)^2+\frac {\text {Subst}(\int x \, dx,x,\text {erfi}(b x))}{2 b^2}\\ &=\frac {e^{2 b^2 x^2}}{2 b^2 \pi }-\frac {e^{b^2 x^2} x \text {erfi}(b x)}{b \sqrt {\pi }}+\frac {\text {erfi}(b x)^2}{4 b^2}+\frac {1}{2} x^2 \text {erfi}(b x)^2\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 63, normalized size = 0.89 \begin {gather*} \frac {2 e^{2 b^2 x^2}-4 b e^{b^2 x^2} \sqrt {\pi } x \text {Erfi}(b x)+\left (\pi +2 b^2 \pi x^2\right ) \text {Erfi}(b x)^2}{4 b^2 \pi } \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(2*E^(2*b^2*x^2) - 4*b*E^(b^2*x^2)*Sqrt[Pi]*x*Erfi[b*x] + (Pi + 2*b^2*Pi*x^2)*Erfi[b*x]^2)/(4*b^2*Pi)

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int x \erfi \left (b x \right )^{2}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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]

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

[Out]

integrate(x*erfi(b*x)^2, x)

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 58, normalized size = 0.82 \begin {gather*} -\frac {4 \, \sqrt {\pi } b x \operatorname {erfi}\left (b x\right ) e^{\left (b^{2} x^{2}\right )} - {\left (\pi + 2 \, \pi b^{2} x^{2}\right )} \operatorname {erfi}\left (b x\right )^{2} - 2 \, e^{\left (2 \, b^{2} x^{2}\right )}}{4 \, \pi b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*(4*sqrt(pi)*b*x*erfi(b*x)*e^(b^2*x^2) - (pi + 2*pi*b^2*x^2)*erfi(b*x)^2 - 2*e^(2*b^2*x^2))/(pi*b^2)

________________________________________________________________________________________

Sympy [A]
time = 0.12, size = 63, normalized size = 0.89 \begin {gather*} \begin {cases} \frac {x^{2} \operatorname {erfi}^{2}{\left (b x \right )}}{2} - \frac {x e^{b^{2} x^{2}} \operatorname {erfi}{\left (b x \right )}}{\sqrt {\pi } b} + \frac {e^{2 b^{2} x^{2}}}{2 \pi b^{2}} + \frac {\operatorname {erfi}^{2}{\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]

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

[Out]

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

________________________________________________________________________________________

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]

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

[Out]

integrate(x*erfi(b*x)^2, x)

________________________________________________________________________________________

Mupad [B]
time = 0.18, size = 66, normalized size = 0.93 \begin {gather*} \frac {\frac {b^2\,x^2\,{\mathrm {erfi}\left (b\,x\right )}^2}{2}+\frac {{\mathrm {erfi}\left (b\,x\right )}^2}{4}}{b^2}+\frac {\frac {{\mathrm {e}}^{2\,b^2\,x^2}}{2}-b\,x\,\sqrt {\pi }\,{\mathrm {e}}^{b^2\,x^2}\,\mathrm {erfi}\left (b\,x\right )}{b^2\,\pi } \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(erfi(b*x)^2/4 + (b^2*x^2*erfi(b*x)^2)/2)/b^2 + (exp(2*b^2*x^2)/2 - b*x*pi^(1/2)*exp(b^2*x^2)*erfi(b*x))/(b^2*
pi)

________________________________________________________________________________________