\(\int e^{c+d x^2} x \text {erfi}(a+b x) \, dx\) [295]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 78 \[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=\frac {e^{c+d x^2} \text {erfi}(a+b x)}{2 d}-\frac {b e^{c+\frac {a^2 d}{b^2+d}} \text {erfi}\left (\frac {a b+\left (b^2+d\right ) x}{\sqrt {b^2+d}}\right )}{2 d \sqrt {b^2+d}} \]

[Out]

1/2*exp(d*x^2+c)*erfi(b*x+a)/d-1/2*b*exp(c+a^2*d/(b^2+d))*erfi((a*b+(b^2+d)*x)/(b^2+d)^(1/2))/d/(b^2+d)^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {6519, 2266, 2235} \[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=\frac {e^{c+d x^2} \text {erfi}(a+b x)}{2 d}-\frac {b e^{\frac {a^2 d}{b^2+d}+c} \text {erfi}\left (\frac {a b+x \left (b^2+d\right )}{\sqrt {b^2+d}}\right )}{2 d \sqrt {b^2+d}} \]

[In]

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

[Out]

(E^(c + d*x^2)*Erfi[a + b*x])/(2*d) - (b*E^(c + (a^2*d)/(b^2 + d))*Erfi[(a*b + (b^2 + d)*x)/Sqrt[b^2 + d]])/(2
*d*Sqrt[b^2 + d])

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2266

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 6519

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

Rubi steps \begin{align*} \text {integral}& = \frac {e^{c+d x^2} \text {erfi}(a+b x)}{2 d}-\frac {b \int e^{a^2+c+2 a b x+\left (b^2+d\right ) x^2} \, dx}{d \sqrt {\pi }} \\ & = \frac {e^{c+d x^2} \text {erfi}(a+b x)}{2 d}-\frac {\left (b e^{c+\frac {a^2 d}{b^2+d}}\right ) \int e^{\frac {\left (2 a b+2 \left (b^2+d\right ) x\right )^2}{4 \left (b^2+d\right )}} \, dx}{d \sqrt {\pi }} \\ & = \frac {e^{c+d x^2} \text {erfi}(a+b x)}{2 d}-\frac {b e^{c+\frac {a^2 d}{b^2+d}} \text {erfi}\left (\frac {a b+\left (b^2+d\right ) x}{\sqrt {b^2+d}}\right )}{2 d \sqrt {b^2+d}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.94 \[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=\frac {e^c \left (e^{d x^2} \text {erfi}(a+b x)-\frac {b e^{\frac {a^2 d}{b^2+d}} \text {erfi}\left (\frac {a b+\left (b^2+d\right ) x}{\sqrt {b^2+d}}\right )}{\sqrt {b^2+d}}\right )}{2 d} \]

[In]

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

[Out]

(E^c*(E^(d*x^2)*Erfi[a + b*x] - (b*E^((a^2*d)/(b^2 + d))*Erfi[(a*b + (b^2 + d)*x)/Sqrt[b^2 + d]])/Sqrt[b^2 + d
]))/(2*d)

Maple [F]

\[\int {\mathrm e}^{d \,x^{2}+c} x \,\operatorname {erfi}\left (b x +a \right )d x\]

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.28 \[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=\frac {\sqrt {-b^{2} - d} b \operatorname {erf}\left (\frac {{\left (a b + {\left (b^{2} + d\right )} x\right )} \sqrt {-b^{2} - d}}{b^{2} + d}\right ) e^{\left (\frac {b^{2} c + {\left (a^{2} + c\right )} d}{b^{2} + d}\right )} + {\left (b^{2} + d\right )} \operatorname {erfi}\left (b x + a\right ) e^{\left (d x^{2} + c\right )}}{2 \, {\left (b^{2} d + d^{2}\right )}} \]

[In]

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

[Out]

1/2*(sqrt(-b^2 - d)*b*erf((a*b + (b^2 + d)*x)*sqrt(-b^2 - d)/(b^2 + d))*e^((b^2*c + (a^2 + c)*d)/(b^2 + d)) +
(b^2 + d)*erfi(b*x + a)*e^(d*x^2 + c))/(b^2*d + d^2)

Sympy [F]

\[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=e^{c} \int x e^{d x^{2}} \operatorname {erfi}{\left (a + b x \right )}\, dx \]

[In]

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

[Out]

exp(c)*Integral(x*exp(d*x**2)*erfi(a + b*x), x)

Maxima [F]

\[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=\int { x \operatorname {erfi}\left (b x + a\right ) e^{\left (d x^{2} + c\right )} \,d x } \]

[In]

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

[Out]

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

Giac [F]

\[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=\int { x \operatorname {erfi}\left (b x + a\right ) e^{\left (d x^{2} + c\right )} \,d x } \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 4.99 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.01 \[ \int e^{c+d x^2} x \text {erfi}(a+b x) \, dx=\frac {\mathrm {erfi}\left (a+b\,x\right )\,{\mathrm {e}}^{d\,x^2+c}}{2\,d}+\frac {b\,{\mathrm {e}}^{c+a^2-\frac {a^2\,b^2}{b^2+d}}\,\mathrm {erf}\left (\frac {a\,b\,1{}\mathrm {i}+x\,\left (b^2+d\right )\,1{}\mathrm {i}}{\sqrt {b^2+d}}\right )\,1{}\mathrm {i}}{2\,d\,\sqrt {b^2+d}} \]

[In]

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

[Out]

(erfi(a + b*x)*exp(c + d*x^2))/(2*d) + (b*exp(c + a^2 - (a^2*b^2)/(d + b^2))*erf((a*b*1i + x*(d + b^2)*1i)/(d
+ b^2)^(1/2))*1i)/(2*d*(d + b^2)^(1/2))