3.189 \(\int e^{c+d x^2} x^3 \text {erfc}(a+b x) \, dx\)

Optimal. Leaf size=342 \[ -\frac {b e^{\frac {a^2 d}{b^2-d}+c} \text {erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )}{2 d^2 \sqrt {b^2-d}}+\frac {b e^{\frac {a^2 d}{b^2-d}+c} \text {erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )}{4 d \left (b^2-d\right )^{3/2}}+\frac {a b^2 e^{-a^2-2 a b x-x^2 \left (b^2-d\right )+c}}{2 \sqrt {\pi } d \left (b^2-d\right )^2}-\frac {b x e^{-a^2-2 a b x-x^2 \left (b^2-d\right )+c}}{2 \sqrt {\pi } d \left (b^2-d\right )}+\frac {a^2 b^3 e^{\frac {a^2 d}{b^2-d}+c} \text {erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )}{2 d \left (b^2-d\right )^{5/2}}-\frac {e^{c+d x^2} \text {erfc}(a+b x)}{2 d^2}+\frac {x^2 e^{c+d x^2} \text {erfc}(a+b x)}{2 d} \]

[Out]

1/2*a^2*b^3*exp(c+a^2*d/(b^2-d))*erf((a*b+(b^2-d)*x)/(b^2-d)^(1/2))/(b^2-d)^(5/2)/d+1/4*b*exp(c+a^2*d/(b^2-d))
*erf((a*b+(b^2-d)*x)/(b^2-d)^(1/2))/(b^2-d)^(3/2)/d-1/2*exp(d*x^2+c)*erfc(b*x+a)/d^2+1/2*exp(d*x^2+c)*x^2*erfc
(b*x+a)/d-1/2*b*exp(c+a^2*d/(b^2-d))*erf((a*b+(b^2-d)*x)/(b^2-d)^(1/2))/d^2/(b^2-d)^(1/2)+1/2*a*b^2*exp(-a^2+c
-2*a*b*x-(b^2-d)*x^2)/(b^2-d)^2/d/Pi^(1/2)-1/2*b*exp(-a^2+c-2*a*b*x-(b^2-d)*x^2)*x/(b^2-d)/d/Pi^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.47, antiderivative size = 342, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {6386, 6383, 2234, 2205, 2241, 2240} \[ -\frac {b e^{\frac {a^2 d}{b^2-d}+c} \text {Erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )}{2 d^2 \sqrt {b^2-d}}+\frac {a^2 b^3 e^{\frac {a^2 d}{b^2-d}+c} \text {Erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )}{2 d \left (b^2-d\right )^{5/2}}+\frac {b e^{\frac {a^2 d}{b^2-d}+c} \text {Erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )}{4 d \left (b^2-d\right )^{3/2}}+\frac {a b^2 e^{-a^2-2 a b x-x^2 \left (b^2-d\right )+c}}{2 \sqrt {\pi } d \left (b^2-d\right )^2}-\frac {b x e^{-a^2-2 a b x-x^2 \left (b^2-d\right )+c}}{2 \sqrt {\pi } d \left (b^2-d\right )}-\frac {e^{c+d x^2} \text {Erfc}(a+b x)}{2 d^2}+\frac {x^2 e^{c+d x^2} \text {Erfc}(a+b x)}{2 d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a*b^2*E^(-a^2 + c - 2*a*b*x - (b^2 - d)*x^2))/(2*(b^2 - d)^2*d*Sqrt[Pi]) - (b*E^(-a^2 + c - 2*a*b*x - (b^2 -
d)*x^2)*x)/(2*(b^2 - d)*d*Sqrt[Pi]) - (b*E^(c + (a^2*d)/(b^2 - d))*Erf[(a*b + (b^2 - d)*x)/Sqrt[b^2 - d]])/(2*
Sqrt[b^2 - d]*d^2) + (a^2*b^3*E^(c + (a^2*d)/(b^2 - d))*Erf[(a*b + (b^2 - d)*x)/Sqrt[b^2 - d]])/(2*(b^2 - d)^(
5/2)*d) + (b*E^(c + (a^2*d)/(b^2 - d))*Erf[(a*b + (b^2 - d)*x)/Sqrt[b^2 - d]])/(4*(b^2 - d)^(3/2)*d) - (E^(c +
 d*x^2)*Erfc[a + b*x])/(2*d^2) + (E^(c + d*x^2)*x^2*Erfc[a + b*x])/(2*d)

Rule 2205

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

Rule 2234

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 2240

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*F^(a + b*x + c*x^2))/(
2*c*Log[F]), x] - Dist[(b*e - 2*c*d)/(2*c), Int[F^(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e}, x] &&
 NeQ[b*e - 2*c*d, 0]

Rule 2241

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

Rule 6383

Int[E^((c_.) + (d_.)*(x_)^2)*Erfc[(a_.) + (b_.)*(x_)]*(x_), x_Symbol] :> Simp[(E^(c + d*x^2)*Erfc[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]

Rule 6386

Int[E^((c_.) + (d_.)*(x_)^2)*Erfc[(a_.) + (b_.)*(x_)]*(x_)^(m_), x_Symbol] :> Simp[(x^(m - 1)*E^(c + d*x^2)*Er
fc[a + b*x])/(2*d), x] + (-Dist[(m - 1)/(2*d), Int[x^(m - 2)*E^(c + d*x^2)*Erfc[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+d x^2} x^3 \text {erfc}(a+b x) \, dx &=\frac {e^{c+d x^2} x^2 \text {erfc}(a+b x)}{2 d}-\frac {\int e^{c+d x^2} x \text {erfc}(a+b x) \, dx}{d}+\frac {b \int e^{-a^2+c-2 a b x+\left (-b^2+d\right ) x^2} x^2 \, dx}{d \sqrt {\pi }}\\ &=-\frac {b e^{-a^2+c-2 a b x-\left (b^2-d\right ) x^2} x}{2 \left (b^2-d\right ) d \sqrt {\pi }}-\frac {e^{c+d x^2} \text {erfc}(a+b x)}{2 d^2}+\frac {e^{c+d x^2} x^2 \text {erfc}(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^2 \sqrt {\pi }}+\frac {b \int e^{-a^2+c-2 a b x+\left (-b^2+d\right ) x^2} \, dx}{2 \left (b^2-d\right ) d \sqrt {\pi }}-\frac {\left (a b^2\right ) \int e^{-a^2+c-2 a b x+\left (-b^2+d\right ) x^2} x \, dx}{\left (b^2-d\right ) d \sqrt {\pi }}\\ &=\frac {a b^2 e^{-a^2+c-2 a b x-\left (b^2-d\right ) x^2}}{2 \left (b^2-d\right )^2 d \sqrt {\pi }}-\frac {b e^{-a^2+c-2 a b x-\left (b^2-d\right ) x^2} x}{2 \left (b^2-d\right ) d \sqrt {\pi }}-\frac {e^{c+d x^2} \text {erfc}(a+b x)}{2 d^2}+\frac {e^{c+d x^2} x^2 \text {erfc}(a+b x)}{2 d}+\frac {\left (a^2 b^3\right ) \int e^{-a^2+c-2 a b x+\left (-b^2+d\right ) x^2} \, dx}{\left (b^2-d\right )^2 d \sqrt {\pi }}-\frac {\left (b e^{\frac {b^2 c+a^2 d-c d}{b^2-d}}\right ) \int \exp \left (\frac {\left (-2 a b+2 \left (-b^2+d\right ) x\right )^2}{4 \left (-b^2+d\right )}\right ) \, dx}{d^2 \sqrt {\pi }}+\frac {\left (b e^{\frac {b^2 c+a^2 d-c d}{b^2-d}}\right ) \int \exp \left (\frac {\left (-2 a b+2 \left (-b^2+d\right ) x\right )^2}{4 \left (-b^2+d\right )}\right ) \, dx}{2 \left (b^2-d\right ) d \sqrt {\pi }}\\ &=\frac {a b^2 e^{-a^2+c-2 a b x-\left (b^2-d\right ) x^2}}{2 \left (b^2-d\right )^2 d \sqrt {\pi }}-\frac {b e^{-a^2+c-2 a b x-\left (b^2-d\right ) x^2} x}{2 \left (b^2-d\right ) d \sqrt {\pi }}-\frac {b e^{\frac {b^2 c+a^2 d-c d}{b^2-d}} \text {erf}\left (\frac {a b+\left (b^2-d\right ) x}{\sqrt {b^2-d}}\right )}{2 \sqrt {b^2-d} d^2}+\frac {b e^{\frac {b^2 c+a^2 d-c d}{b^2-d}} \text {erf}\left (\frac {a b+\left (b^2-d\right ) x}{\sqrt {b^2-d}}\right )}{4 \left (b^2-d\right )^{3/2} d}-\frac {e^{c+d x^2} \text {erfc}(a+b x)}{2 d^2}+\frac {e^{c+d x^2} x^2 \text {erfc}(a+b x)}{2 d}+\frac {\left (a^2 b^3 e^{\frac {b^2 c+a^2 d-c d}{b^2-d}}\right ) \int \exp \left (\frac {\left (-2 a b+2 \left (-b^2+d\right ) x\right )^2}{4 \left (-b^2+d\right )}\right ) \, dx}{\left (b^2-d\right )^2 d \sqrt {\pi }}\\ &=\frac {a b^2 e^{-a^2+c-2 a b x-\left (b^2-d\right ) x^2}}{2 \left (b^2-d\right )^2 d \sqrt {\pi }}-\frac {b e^{-a^2+c-2 a b x-\left (b^2-d\right ) x^2} x}{2 \left (b^2-d\right ) d \sqrt {\pi }}-\frac {b e^{\frac {b^2 c+a^2 d-c d}{b^2-d}} \text {erf}\left (\frac {a b+\left (b^2-d\right ) x}{\sqrt {b^2-d}}\right )}{2 \sqrt {b^2-d} d^2}+\frac {a^2 b^3 e^{\frac {b^2 c+a^2 d-c d}{b^2-d}} \text {erf}\left (\frac {a b+\left (b^2-d\right ) x}{\sqrt {b^2-d}}\right )}{2 \left (b^2-d\right )^{5/2} d}+\frac {b e^{\frac {b^2 c+a^2 d-c d}{b^2-d}} \text {erf}\left (\frac {a b+\left (b^2-d\right ) x}{\sqrt {b^2-d}}\right )}{4 \left (b^2-d\right )^{3/2} d}-\frac {e^{c+d x^2} \text {erfc}(a+b x)}{2 d^2}+\frac {e^{c+d x^2} x^2 \text {erfc}(a+b x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 2.62, size = 256, normalized size = 0.75 \[ -\frac {e^c \left (-\frac {b d e^{-a^2-2 a b x+x^2 \left (d-b^2\right )} \left (\sqrt {\pi } \sqrt {b^2-d} \left (\left (2 a^2+1\right ) b^2-d\right ) e^{\frac {\left (a b+x \left (b^2-d\right )\right )^2}{b^2-d}} \text {erf}\left (\frac {a b+x \left (b^2-d\right )}{\sqrt {b^2-d}}\right )+2 \left (b^2-d\right ) \left (a b+x \left (d-b^2\right )\right )\right )}{\sqrt {\pi } \left (b^2-d\right )^3}+\frac {2 b e^{\frac {a^2 d}{b^2-d}} \text {erfi}\left (\frac {x \left (d-b^2\right )-a b}{\sqrt {d-b^2}}\right )}{\sqrt {d-b^2}}+2 e^{d x^2} \left (d x^2-1\right ) \text {erf}(a+b x)-2 e^{d x^2} \left (d x^2-1\right )\right )}{4 d^2} \]

Warning: Unable to verify antiderivative.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 328, normalized size = 0.96 \[ -\frac {\pi {\left (2 \, b^{5} - {\left (2 \, a^{2} + 5\right )} b^{3} d + 3 \, b d^{2}\right )} \sqrt {b^{2} - d} \operatorname {erf}\left (\frac {a b + {\left (b^{2} - d\right )} x}{\sqrt {b^{2} - d}}\right ) e^{\left (\frac {b^{2} c + {\left (a^{2} - c\right )} d}{b^{2} - d}\right )} - 2 \, \sqrt {\pi } {\left (a b^{4} d - a b^{2} d^{2} - {\left (b^{5} d - 2 \, b^{3} d^{2} + b d^{3}\right )} x\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x + d x^{2} - a^{2} + c\right )} - 2 \, {\left (\pi {\left (b^{6} d - 3 \, b^{4} d^{2} + 3 \, b^{2} d^{3} - d^{4}\right )} x^{2} - \pi {\left (b^{6} - 3 \, b^{4} d + 3 \, b^{2} d^{2} - d^{3}\right )} - {\left (\pi {\left (b^{6} d - 3 \, b^{4} d^{2} + 3 \, b^{2} d^{3} - d^{4}\right )} x^{2} - \pi {\left (b^{6} - 3 \, b^{4} d + 3 \, b^{2} d^{2} - d^{3}\right )}\right )} \operatorname {erf}\left (b x + a\right )\right )} e^{\left (d x^{2} + c\right )}}{4 \, \pi {\left (b^{6} d^{2} - 3 \, b^{4} d^{3} + 3 \, b^{2} d^{4} - d^{5}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*(pi*(2*b^5 - (2*a^2 + 5)*b^3*d + 3*b*d^2)*sqrt(b^2 - d)*erf((a*b + (b^2 - d)*x)/sqrt(b^2 - d))*e^((b^2*c
+ (a^2 - c)*d)/(b^2 - d)) - 2*sqrt(pi)*(a*b^4*d - a*b^2*d^2 - (b^5*d - 2*b^3*d^2 + b*d^3)*x)*e^(-b^2*x^2 - 2*a
*b*x + d*x^2 - a^2 + c) - 2*(pi*(b^6*d - 3*b^4*d^2 + 3*b^2*d^3 - d^4)*x^2 - pi*(b^6 - 3*b^4*d + 3*b^2*d^2 - d^
3) - (pi*(b^6*d - 3*b^4*d^2 + 3*b^2*d^3 - d^4)*x^2 - pi*(b^6 - 3*b^4*d + 3*b^2*d^2 - d^3))*erf(b*x + a))*e^(d*
x^2 + c))/(pi*(b^6*d^2 - 3*b^4*d^3 + 3*b^2*d^4 - d^5))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int x^3\,\mathrm {erfc}\left (a+b\,x\right )\,{\mathrm {e}}^{d\,x^2+c} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________