\(\int e^{c-b^2 x^2} \text {erfc}(b x)^n \, dx\) [155]

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

Optimal result

Integrand size = 19, antiderivative size = 28 \[ \int e^{c-b^2 x^2} \text {erfc}(b x)^n \, dx=-\frac {e^c \sqrt {\pi } \text {erfc}(b x)^{1+n}}{2 b (1+n)} \]

[Out]

-1/2*exp(c)*erfc(b*x)^(1+n)*Pi^(1/2)/b/(1+n)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {6509, 30} \[ \int e^{c-b^2 x^2} \text {erfc}(b x)^n \, dx=-\frac {\sqrt {\pi } e^c \text {erfc}(b x)^{n+1}}{2 b (n+1)} \]

[In]

Int[E^(c - b^2*x^2)*Erfc[b*x]^n,x]

[Out]

-1/2*(E^c*Sqrt[Pi]*Erfc[b*x]^(1 + n))/(b*(1 + n))

Rule 30

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

Rule 6509

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

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (e^c \sqrt {\pi }\right ) \text {Subst}\left (\int x^n \, dx,x,\text {erfc}(b x)\right )}{2 b} \\ & = -\frac {e^c \sqrt {\pi } \text {erfc}(b x)^{1+n}}{2 b (1+n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00 \[ \int e^{c-b^2 x^2} \text {erfc}(b x)^n \, dx=-\frac {e^c \sqrt {\pi } \text {erfc}(b x)^{1+n}}{2 b (1+n)} \]

[In]

Integrate[E^(c - b^2*x^2)*Erfc[b*x]^n,x]

[Out]

-1/2*(E^c*Sqrt[Pi]*Erfc[b*x]^(1 + n))/(b*(1 + n))

Maple [F]

\[\int {\mathrm e}^{-b^{2} x^{2}+c} \operatorname {erfc}\left (b x \right )^{n}d x\]

[In]

int(exp(-b^2*x^2+c)*erfc(b*x)^n,x)

[Out]

int(exp(-b^2*x^2+c)*erfc(b*x)^n,x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int e^{c-b^2 x^2} \text {erfc}(b x)^n \, dx=\frac {\sqrt {\pi } {\left (-\operatorname {erf}\left (b x\right ) + 1\right )}^{n} {\left (\operatorname {erf}\left (b x\right ) - 1\right )} e^{c}}{2 \, {\left (b n + b\right )}} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (24) = 48\).

Time = 1.49 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.14 \[ \int e^{c-b^2 x^2} \text {erfc}(b x)^n \, dx=\begin {cases} x e^{c} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = -1\right ) \\- \frac {\sqrt {\pi } e^{c} \log {\left (\operatorname {erfc}{\left (b x \right )} \right )}}{2 b} & \text {for}\: n = -1 \\- \frac {\sqrt {\pi } e^{c} \operatorname {erfc}{\left (b x \right )} \operatorname {erfc}^{n}{\left (b x \right )}}{2 b n + 2 b} & \text {otherwise} \end {cases} \]

[In]

integrate(exp(-b**2*x**2+c)*erfc(b*x)**n,x)

[Out]

Piecewise((x*exp(c), Eq(b, 0) & (Eq(b, 0) | Eq(n, -1))), (-sqrt(pi)*exp(c)*log(erfc(b*x))/(2*b), Eq(n, -1)), (
-sqrt(pi)*exp(c)*erfc(b*x)*erfc(b*x)**n/(2*b*n + 2*b), True))

Maxima [F]

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

[In]

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

[Out]

integrate(erfc(b*x)^n*e^(-b^2*x^2 + c), x)

Giac [F]

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

[In]

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

[Out]

integrate(erfc(b*x)^n*e^(-b^2*x^2 + c), x)

Mupad [B] (verification not implemented)

Time = 4.80 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82 \[ \int e^{c-b^2 x^2} \text {erfc}(b x)^n \, dx=-\frac {\sqrt {\pi }\,{\mathrm {e}}^c\,{\mathrm {erfc}\left (b\,x\right )}^{n+1}}{2\,b\,\left (n+1\right )} \]

[In]

int(exp(c - b^2*x^2)*erfc(b*x)^n,x)

[Out]

-(pi^(1/2)*exp(c)*erfc(b*x)^(n + 1))/(2*b*(n + 1))