3.290 \(\int e^{c+b^2 x^2} x^2 \text {erfi}(b x) \, dx\)

Optimal. Leaf size=69 \[ -\frac {\sqrt {\pi } e^c \text {erfi}(b x)^2}{8 b^3}+\frac {x e^{b^2 x^2+c} \text {erfi}(b x)}{2 b^2}-\frac {e^{2 b^2 x^2+c}}{4 \sqrt {\pi } b^3} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {6387, 6375, 30, 2209} \[ \frac {x e^{b^2 x^2+c} \text {Erfi}(b x)}{2 b^2}-\frac {\sqrt {\pi } e^c \text {Erfi}(b x)^2}{8 b^3}-\frac {e^{2 b^2 x^2+c}}{4 \sqrt {\pi } b^3} \]

Antiderivative was successfully verified.

[In]

Int[E^(c + b^2*x^2)*x^2*Erfi[b*x],x]

[Out]

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

Rule 30

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

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 6375

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 6387

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 58, normalized size = 0.84 \[ -\frac {e^c \left (-4 \sqrt {\pi } b x e^{b^2 x^2} \text {erfi}(b x)+2 e^{2 b^2 x^2}+\pi \text {erfi}(b x)^2\right )}{8 \sqrt {\pi } b^3} \]

Antiderivative was successfully verified.

[In]

Integrate[E^(c + b^2*x^2)*x^2*Erfi[b*x],x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 53, normalized size = 0.77 \[ \frac {{\left (4 \, \pi b x \operatorname {erfi}\left (b x\right ) e^{\left (b^{2} x^{2}\right )} - \sqrt {\pi } {\left (\pi \operatorname {erfi}\left (b x\right )^{2} + 2 \, e^{\left (2 \, b^{2} x^{2}\right )}\right )}\right )} e^{c}}{8 \, \pi b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \operatorname {erfi}\left (b x\right ) e^{\left (b^{2} x^{2} + c\right )}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x^2*erfi(b*x)*e^(b^2*x^2 + c), x)

________________________________________________________________________________________

maple [F]  time = 0.18, size = 0, normalized size = 0.00 \[ \int {\mathrm e}^{b^{2} x^{2}+c} x^{2} \erfi \left (b x \right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(b^2*x^2+c)*x^2*erfi(b*x),x)

[Out]

int(exp(b^2*x^2+c)*x^2*erfi(b*x),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x^{2} \operatorname {erfi}\left (b x\right ) e^{\left (b^{2} x^{2} + c\right )}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x^2*erfi(b*x)*e^(b^2*x^2 + c), x)

________________________________________________________________________________________

mupad [B]  time = 0.32, size = 86, normalized size = 1.25 \[ \mathrm {erfi}\left (b\,x\right )\,\left (\frac {x\,{\mathrm {e}}^{b^2\,x^2+c}}{2\,b^2}-\frac {\sqrt {\pi }\,\mathrm {erfi}\left (\frac {b^2\,x}{\sqrt {b^2}}\right )\,{\mathrm {e}}^c}{4\,{\left (b^2\right )}^{3/2}}\right )-\frac {2\,{\mathrm {e}}^{2\,b^2\,x^2+c}-\pi \,{\mathrm {erfi}\left (\frac {b^2\,x}{\sqrt {b^2}}\right )}^2\,{\mathrm {e}}^c}{8\,b^3\,\sqrt {\pi }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*exp(c + b^2*x^2)*erfi(b*x),x)

[Out]

erfi(b*x)*((x*exp(c + b^2*x^2))/(2*b^2) - (pi^(1/2)*erfi((b^2*x)/(b^2)^(1/2))*exp(c))/(4*(b^2)^(3/2))) - (2*ex
p(c + 2*b^2*x^2) - pi*erfi((b^2*x)/(b^2)^(1/2))^2*exp(c))/(8*b^3*pi^(1/2))

________________________________________________________________________________________

sympy [A]  time = 3.79, size = 68, normalized size = 0.99 \[ \begin {cases} \frac {x e^{c} e^{b^{2} x^{2}} \operatorname {erfi}{\left (b x \right )}}{2 b^{2}} - \frac {e^{c} e^{2 b^{2} x^{2}}}{4 \sqrt {\pi } b^{3}} - \frac {\sqrt {\pi } e^{c} \operatorname {erfi}^{2}{\left (b x \right )}}{8 b^{3}} & \text {for}\: b \neq 0 \\0 & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(b**2*x**2+c)*x**2*erfi(b*x),x)

[Out]

Piecewise((x*exp(c)*exp(b**2*x**2)*erfi(b*x)/(2*b**2) - exp(c)*exp(2*b**2*x**2)/(4*sqrt(pi)*b**3) - sqrt(pi)*e
xp(c)*erfi(b*x)**2/(8*b**3), Ne(b, 0)), (0, True))

________________________________________________________________________________________