\(\int (c+d x)^2 \text {erfc}(a+b x) \, dx\) [119]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (warning: unable to verify)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [F]
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [F]

Optimal result

Integrand size = 14, antiderivative size = 194 \[ \int (c+d x)^2 \text {erfc}(a+b x) \, dx=-\frac {d^2 e^{-(a+b x)^2}}{3 b^3 \sqrt {\pi }}-\frac {(b c-a d)^2 e^{-(a+b x)^2}}{b^3 \sqrt {\pi }}-\frac {d (b c-a d) e^{-(a+b x)^2} (a+b x)}{b^3 \sqrt {\pi }}-\frac {d^2 e^{-(a+b x)^2} (a+b x)^2}{3 b^3 \sqrt {\pi }}+\frac {d (b c-a d) \text {erf}(a+b x)}{2 b^3}+\frac {(b c-a d)^3 \text {erf}(a+b x)}{3 b^3 d}+\frac {(c+d x)^3 \text {erfc}(a+b x)}{3 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.82 \[ \int (c+d x)^2 \text {erfc}(a+b x) \, dx=\frac {-\left (\left (-3 b c d-6 a^2 b c d+2 a^3 d^2+3 a \left (2 b^2 c^2+d^2\right )\right ) \text {erf}(a+b x)\right )+\frac {2 e^{-(a+b x)^2} \left (-\left (\left (1+a^2\right ) d^2\right )+a b d (3 c+d x)-b^2 \left (3 c^2+3 c d x+d^2 x^2\right )+b^3 e^{(a+b x)^2} \sqrt {\pi } x \left (3 c^2+3 c d x+d^2 x^2\right ) \text {erfc}(a+b x)\right )}{\sqrt {\pi }}}{6 b^3} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.45 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.05, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {6916, 2656, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

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

\(\Big \downarrow \) 6916

\(\displaystyle \frac {2 b \int e^{-(a+b x)^2} (c+d x)^3dx}{3 \sqrt {\pi } d}+\frac {(c+d x)^3 \text {erfc}(a+b x)}{3 d}\)

\(\Big \downarrow \) 2656

\(\displaystyle \frac {2 b \int \left (\frac {e^{-(a+b x)^2} (b c-a d)^3}{b^3}+\frac {3 d e^{-(a+b x)^2} (a+b x) (b c-a d)^2}{b^3}+\frac {3 d^2 e^{-(a+b x)^2} (a+b x)^2 (b c-a d)}{b^3}+\frac {d^3 e^{-(a+b x)^2} (a+b x)^3}{b^3}\right )dx}{3 \sqrt {\pi } d}+\frac {(c+d x)^3 \text {erfc}(a+b x)}{3 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 b \left (\frac {3 \sqrt {\pi } d^2 (b c-a d) \text {erf}(a+b x)}{4 b^4}-\frac {3 d^2 e^{-(a+b x)^2} (a+b x) (b c-a d)}{2 b^4}+\frac {\sqrt {\pi } (b c-a d)^3 \text {erf}(a+b x)}{2 b^4}-\frac {3 d e^{-(a+b x)^2} (b c-a d)^2}{2 b^4}-\frac {d^3 e^{-(a+b x)^2}}{2 b^4}-\frac {d^3 e^{-(a+b x)^2} (a+b x)^2}{2 b^4}\right )}{3 \sqrt {\pi } d}+\frac {(c+d x)^3 \text {erfc}(a+b x)}{3 d}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2656
Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(Px_), x_Symbol] :> Int[ 
ExpandLinearProduct[F^(a + b*(c + d*x)^n), Px, c, d, x], x] /; FreeQ[{F, a, 
 b, c, d, n}, x] && PolynomialQ[Px, x]
 

rule 6916
Int[Erfc[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[ 
(c + d*x)^(m + 1)*(Erfc[a + b*x]/(d*(m + 1))), x] + Simp[2*(b/(Sqrt[Pi]*d*( 
m + 1)))   Int[(c + d*x)^(m + 1)/E^(a + b*x)^2, x], x] /; FreeQ[{a, b, c, d 
, m}, x] && NeQ[m, -1]
 
Maple [A] (warning: unable to verify)

Time = 0.51 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.40

method result size
parallelrisch \(\frac {2 d^{2} \operatorname {erfc}\left (b x +a \right ) x^{3} \sqrt {\pi }\, b^{3}+6 c d \,x^{2} \operatorname {erfc}\left (b x +a \right ) \sqrt {\pi }\, b^{3}+6 c^{2} x \,\operatorname {erfc}\left (b x +a \right ) \sqrt {\pi }\, b^{3}+2 \sqrt {\pi }\, \operatorname {erfc}\left (b x +a \right ) a^{3} d^{2}-6 \sqrt {\pi }\, \operatorname {erfc}\left (b x +a \right ) a^{2} b c d +6 \sqrt {\pi }\, \operatorname {erfc}\left (b x +a \right ) a \,b^{2} c^{2}-2 d^{2} {\mathrm e}^{-\left (b x +a \right )^{2}} x^{2} b^{2}+2 x \,{\mathrm e}^{-\left (b x +a \right )^{2}} a b \,d^{2}-6 x \,{\mathrm e}^{-\left (b x +a \right )^{2}} b^{2} c d +3 \sqrt {\pi }\, \operatorname {erfc}\left (b x +a \right ) a \,d^{2}-3 \sqrt {\pi }\, \operatorname {erfc}\left (b x +a \right ) b c d -2 \,{\mathrm e}^{-\left (b x +a \right )^{2}} a^{2} d^{2}+6 \,{\mathrm e}^{-\left (b x +a \right )^{2}} a b c d -6 \,{\mathrm e}^{-\left (b x +a \right )^{2}} b^{2} c^{2}-2 \,{\mathrm e}^{-\left (b x +a \right )^{2}} d^{2}}{6 \sqrt {\pi }\, b^{3}}\) \(272\)
parts \(\frac {\operatorname {erfc}\left (b x +a \right ) d^{2} x^{3}}{3}+\operatorname {erfc}\left (b x +a \right ) d c \,x^{2}+\operatorname {erfc}\left (b x +a \right ) c^{2} x +\frac {\operatorname {erfc}\left (b x +a \right ) c^{3}}{3 d}+\frac {2 b \left (\frac {c^{3} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2 b}+{\mathrm e}^{-a^{2}} d^{3} \left (-\frac {x^{2} {\mathrm e}^{-b^{2} x^{2}-2 b x a}}{2 b^{2}}-\frac {a \left (-\frac {x \,{\mathrm e}^{-b^{2} x^{2}-2 b x a}}{2 b^{2}}-\frac {a \left (-\frac {{\mathrm e}^{-b^{2} x^{2}-2 b x a}}{2 b^{2}}-\frac {a \sqrt {\pi }\, {\mathrm e}^{a^{2}} \operatorname {erf}\left (b x +a \right )}{2 b^{2}}\right )}{b}+\frac {\sqrt {\pi }\, {\mathrm e}^{a^{2}} \operatorname {erf}\left (b x +a \right )}{4 b^{3}}\right )}{b}+\frac {-\frac {{\mathrm e}^{-b^{2} x^{2}-2 b x a}}{2 b^{2}}-\frac {a \sqrt {\pi }\, {\mathrm e}^{a^{2}} \operatorname {erf}\left (b x +a \right )}{2 b^{2}}}{b^{2}}\right )+3 \,{\mathrm e}^{-a^{2}} c \,d^{2} \left (-\frac {x \,{\mathrm e}^{-b^{2} x^{2}-2 b x a}}{2 b^{2}}-\frac {a \left (-\frac {{\mathrm e}^{-b^{2} x^{2}-2 b x a}}{2 b^{2}}-\frac {a \sqrt {\pi }\, {\mathrm e}^{a^{2}} \operatorname {erf}\left (b x +a \right )}{2 b^{2}}\right )}{b}+\frac {\sqrt {\pi }\, {\mathrm e}^{a^{2}} \operatorname {erf}\left (b x +a \right )}{4 b^{3}}\right )+3 \,{\mathrm e}^{-a^{2}} d \,c^{2} \left (-\frac {{\mathrm e}^{-b^{2} x^{2}-2 b x a}}{2 b^{2}}-\frac {a \sqrt {\pi }\, {\mathrm e}^{a^{2}} \operatorname {erf}\left (b x +a \right )}{2 b^{2}}\right )\right )}{3 d \sqrt {\pi }}\) \(400\)
derivativedivides \(\frac {-\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) a^{3}}{3 b^{2}}+\frac {d \,\operatorname {erfc}\left (b x +a \right ) a^{2} c}{b}+\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) a^{2} \left (b x +a \right )}{b^{2}}-\operatorname {erfc}\left (b x +a \right ) a \,c^{2}-\frac {2 d \,\operatorname {erfc}\left (b x +a \right ) a c \left (b x +a \right )}{b}-\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) a \left (b x +a \right )^{2}}{b^{2}}+\frac {b \,\operatorname {erfc}\left (b x +a \right ) c^{3}}{3 d}+\operatorname {erfc}\left (b x +a \right ) c^{2} \left (b x +a \right )+\frac {d \,\operatorname {erfc}\left (b x +a \right ) c \left (b x +a \right )^{2}}{b}+\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) \left (b x +a \right )^{3}}{3 b^{2}}-\frac {2 \left (\frac {a^{3} d^{3} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-\frac {b^{3} c^{3} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-d^{3} \left (-\frac {{\mathrm e}^{-\left (b x +a \right )^{2}} \left (b x +a \right )^{2}}{2}-\frac {{\mathrm e}^{-\left (b x +a \right )^{2}}}{2}\right )+3 a \,d^{3} \left (-\frac {\left (b x +a \right ) {\mathrm e}^{-\left (b x +a \right )^{2}}}{2}+\frac {\sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{4}\right )+\frac {3 a^{2} d^{3} {\mathrm e}^{-\left (b x +a \right )^{2}}}{2}+\frac {3 a \,b^{2} c^{2} d \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-\frac {3 a^{2} b c \,d^{2} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-3 b c \,d^{2} \left (-\frac {\left (b x +a \right ) {\mathrm e}^{-\left (b x +a \right )^{2}}}{2}+\frac {\sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{4}\right )+\frac {3 b^{2} c^{2} d \,{\mathrm e}^{-\left (b x +a \right )^{2}}}{2}-3 a b c \,d^{2} {\mathrm e}^{-\left (b x +a \right )^{2}}\right )}{3 \sqrt {\pi }\, b^{2} d}}{b}\) \(429\)
default \(\frac {-\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) a^{3}}{3 b^{2}}+\frac {d \,\operatorname {erfc}\left (b x +a \right ) a^{2} c}{b}+\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) a^{2} \left (b x +a \right )}{b^{2}}-\operatorname {erfc}\left (b x +a \right ) a \,c^{2}-\frac {2 d \,\operatorname {erfc}\left (b x +a \right ) a c \left (b x +a \right )}{b}-\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) a \left (b x +a \right )^{2}}{b^{2}}+\frac {b \,\operatorname {erfc}\left (b x +a \right ) c^{3}}{3 d}+\operatorname {erfc}\left (b x +a \right ) c^{2} \left (b x +a \right )+\frac {d \,\operatorname {erfc}\left (b x +a \right ) c \left (b x +a \right )^{2}}{b}+\frac {d^{2} \operatorname {erfc}\left (b x +a \right ) \left (b x +a \right )^{3}}{3 b^{2}}-\frac {2 \left (\frac {a^{3} d^{3} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-\frac {b^{3} c^{3} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-d^{3} \left (-\frac {{\mathrm e}^{-\left (b x +a \right )^{2}} \left (b x +a \right )^{2}}{2}-\frac {{\mathrm e}^{-\left (b x +a \right )^{2}}}{2}\right )+3 a \,d^{3} \left (-\frac {\left (b x +a \right ) {\mathrm e}^{-\left (b x +a \right )^{2}}}{2}+\frac {\sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{4}\right )+\frac {3 a^{2} d^{3} {\mathrm e}^{-\left (b x +a \right )^{2}}}{2}+\frac {3 a \,b^{2} c^{2} d \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-\frac {3 a^{2} b c \,d^{2} \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{2}-3 b c \,d^{2} \left (-\frac {\left (b x +a \right ) {\mathrm e}^{-\left (b x +a \right )^{2}}}{2}+\frac {\sqrt {\pi }\, \operatorname {erf}\left (b x +a \right )}{4}\right )+\frac {3 b^{2} c^{2} d \,{\mathrm e}^{-\left (b x +a \right )^{2}}}{2}-3 a b c \,d^{2} {\mathrm e}^{-\left (b x +a \right )^{2}}\right )}{3 \sqrt {\pi }\, b^{2} d}}{b}\) \(429\)

Input:

int((d*x+c)^2*erfc(b*x+a),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.02 \[ \int (c+d x)^2 \text {erfc}(a+b x) \, dx=\frac {2 \, \pi b^{3} d^{2} x^{3} + 6 \, \pi b^{3} c d x^{2} + 6 \, \pi b^{3} c^{2} x - 2 \, \sqrt {\pi } {\left (b^{2} d^{2} x^{2} + 3 \, b^{2} c^{2} - 3 \, a b c d + {\left (a^{2} + 1\right )} d^{2} + {\left (3 \, b^{2} c d - a b d^{2}\right )} x\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )} - {\left (2 \, \pi b^{3} d^{2} x^{3} + 6 \, \pi b^{3} c d x^{2} + 6 \, \pi b^{3} c^{2} x + \pi {\left (6 \, a b^{2} c^{2} - 3 \, {\left (2 \, a^{2} + 1\right )} b c d + {\left (2 \, a^{3} + 3 \, a\right )} d^{2}\right )}\right )} \operatorname {erf}\left (b x + a\right )}{6 \, \pi b^{3}} \] Input:

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

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 398 vs. \(2 (165) = 330\).

Time = 0.89 (sec) , antiderivative size = 398, normalized size of antiderivative = 2.05 \[ \int (c+d x)^2 \text {erfc}(a+b x) \, dx=\begin {cases} \frac {a^{3} d^{2} \operatorname {erfc}{\left (a + b x \right )}}{3 b^{3}} - \frac {a^{2} c d \operatorname {erfc}{\left (a + b x \right )}}{b^{2}} - \frac {a^{2} d^{2} e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{3 \sqrt {\pi } b^{3}} + \frac {a c^{2} \operatorname {erfc}{\left (a + b x \right )}}{b} + \frac {a c d e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{\sqrt {\pi } b^{2}} + \frac {a d^{2} x e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{3 \sqrt {\pi } b^{2}} + \frac {a d^{2} \operatorname {erfc}{\left (a + b x \right )}}{2 b^{3}} + c^{2} x \operatorname {erfc}{\left (a + b x \right )} + c d x^{2} \operatorname {erfc}{\left (a + b x \right )} + \frac {d^{2} x^{3} \operatorname {erfc}{\left (a + b x \right )}}{3} - \frac {c^{2} e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{\sqrt {\pi } b} - \frac {c d x e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{\sqrt {\pi } b} - \frac {d^{2} x^{2} e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{3 \sqrt {\pi } b} - \frac {c d \operatorname {erfc}{\left (a + b x \right )}}{2 b^{2}} - \frac {d^{2} e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{3 \sqrt {\pi } b^{3}} & \text {for}\: b \neq 0 \\\left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) \operatorname {erfc}{\left (a \right )} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((a**3*d**2*erfc(a + b*x)/(3*b**3) - a**2*c*d*erfc(a + b*x)/b**2 
- a**2*d**2*exp(-a**2)*exp(-b**2*x**2)*exp(-2*a*b*x)/(3*sqrt(pi)*b**3) + a 
*c**2*erfc(a + b*x)/b + a*c*d*exp(-a**2)*exp(-b**2*x**2)*exp(-2*a*b*x)/(sq 
rt(pi)*b**2) + a*d**2*x*exp(-a**2)*exp(-b**2*x**2)*exp(-2*a*b*x)/(3*sqrt(p 
i)*b**2) + a*d**2*erfc(a + b*x)/(2*b**3) + c**2*x*erfc(a + b*x) + c*d*x**2 
*erfc(a + b*x) + d**2*x**3*erfc(a + b*x)/3 - c**2*exp(-a**2)*exp(-b**2*x** 
2)*exp(-2*a*b*x)/(sqrt(pi)*b) - c*d*x*exp(-a**2)*exp(-b**2*x**2)*exp(-2*a* 
b*x)/(sqrt(pi)*b) - d**2*x**2*exp(-a**2)*exp(-b**2*x**2)*exp(-2*a*b*x)/(3* 
sqrt(pi)*b) - c*d*erfc(a + b*x)/(2*b**2) - d**2*exp(-a**2)*exp(-b**2*x**2) 
*exp(-2*a*b*x)/(3*sqrt(pi)*b**3), Ne(b, 0)), ((c**2*x + c*d*x**2 + d**2*x* 
*3/3)*erfc(a), True))
 

Maxima [F]

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

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 280, normalized size of antiderivative = 1.44 \[ \int (c+d x)^2 \text {erfc}(a+b x) \, dx=\frac {1}{3} \, d^{2} x^{3} + c d x^{2} - {\left (x \operatorname {erf}\left (b x + a\right ) - \frac {\frac {\sqrt {\pi } a \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{\sqrt {\pi }}\right )} c^{2} - \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {erf}\left (b x + a\right ) + \frac {\frac {\sqrt {\pi } {\left (2 \, a^{2} + 1\right )} \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} + \frac {2 \, {\left (b {\left (x + \frac {a}{b}\right )} - 2 \, a\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{\sqrt {\pi } b}\right )} c d - \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {erf}\left (b x + a\right ) - \frac {\frac {\sqrt {\pi } {\left (2 \, a^{3} + 3 \, a\right )} \operatorname {erf}\left (-b {\left (x + \frac {a}{b}\right )}\right )}{b} - \frac {2 \, {\left (b^{2} {\left (x + \frac {a}{b}\right )}^{2} - 3 \, a b {\left (x + \frac {a}{b}\right )} + 3 \, a^{2} + 1\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )}}{b}}{\sqrt {\pi } b^{2}}\right )} d^{2} + c^{2} x \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.13 \[ \int (c+d x)^2 \text {erfc}(a+b x) \, dx=\frac {d^2\,x^3\,\mathrm {erfc}\left (a+b\,x\right )}{3}-\frac {{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}\,\left (\frac {b^2\,c^2}{\sqrt {\pi }}-\frac {a\,d\,b\,c}{\sqrt {\pi }}+\frac {a^2\,d^2+d^2}{3\,\sqrt {\pi }}\right )}{b^3}+\frac {\mathrm {erfc}\left (a+b\,x\right )\,\left (\frac {a\,d^2}{2}-b\,\left (c\,d\,a^2+\frac {c\,d}{2}\right )+\frac {a^3\,d^2}{3}+a\,b^2\,c^2\right )}{b^3}+c^2\,x\,\mathrm {erfc}\left (a+b\,x\right )+c\,d\,x^2\,\mathrm {erfc}\left (a+b\,x\right )+\frac {x\,{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}\,\left (a\,d^2-3\,b\,c\,d\right )}{3\,b^2\,\sqrt {\pi }}-\frac {d^2\,x^2\,{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}}{3\,b\,\sqrt {\pi }} \] Input:

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

Output:

(d^2*x^3*erfc(a + b*x))/3 - (exp(- a^2 - b^2*x^2 - 2*a*b*x)*((d^2 + a^2*d^ 
2)/(3*pi^(1/2)) + (b^2*c^2)/pi^(1/2) - (a*b*c*d)/pi^(1/2)))/b^3 + (erfc(a 
+ b*x)*((a*d^2)/2 - b*((c*d)/2 + a^2*c*d) + (a^3*d^2)/3 + a*b^2*c^2))/b^3 
+ c^2*x*erfc(a + b*x) + c*d*x^2*erfc(a + b*x) + (x*exp(- a^2 - b^2*x^2 - 2 
*a*b*x)*(a*d^2 - 3*b*c*d))/(3*b^2*pi^(1/2)) - (d^2*x^2*exp(- a^2 - b^2*x^2 
 - 2*a*b*x))/(3*b*pi^(1/2))
 

Reduce [F]

\[ \int (c+d x)^2 \text {erfc}(a+b x) \, dx=\frac {-3 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \mathrm {erf}\left (b x +a \right ) a \,c^{2}-3 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \mathrm {erf}\left (b x +a \right ) b \,c^{2} x -3 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \left (\int \mathrm {erf}\left (b x +a \right ) x^{2}d x \right ) b \,d^{2}-6 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \left (\int \mathrm {erf}\left (b x +a \right ) x d x \right ) b c d +3 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} b \,c^{2} x +3 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} b c d \,x^{2}+\sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} b \,d^{2} x^{3}-3 c^{2}}{3 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} b} \] Input:

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

Output:

( - 3*sqrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*erf(a + b*x)*a*c**2 - 3*sqr 
t(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*erf(a + b*x)*b*c**2*x - 3*sqrt(pi)*e 
**(a**2 + 2*a*b*x + b**2*x**2)*int(erf(a + b*x)*x**2,x)*b*d**2 - 6*sqrt(pi 
)*e**(a**2 + 2*a*b*x + b**2*x**2)*int(erf(a + b*x)*x,x)*b*c*d + 3*sqrt(pi) 
*e**(a**2 + 2*a*b*x + b**2*x**2)*b*c**2*x + 3*sqrt(pi)*e**(a**2 + 2*a*b*x 
+ b**2*x**2)*b*c*d*x**2 + sqrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*b*d**2* 
x**3 - 3*c**2)/(3*sqrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*b)