Integrand size = 16, antiderivative size = 375 \[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\frac {d (b c-a d) e^{-2 (a+b x)^2}}{b^3 \pi }+\frac {d^2 e^{-2 (a+b x)^2} (a+b x)}{3 b^3 \pi }-\frac {(b c-a d)^2 \sqrt {\frac {2}{\pi }} \text {erf}\left (\sqrt {2} (a+b x)\right )}{b^3}-\frac {5 d^2 \text {erf}\left (\sqrt {2} (a+b x)\right )}{6 b^3 \sqrt {2 \pi }}-\frac {2 d^2 e^{-(a+b x)^2} \text {erfc}(a+b x)}{3 b^3 \sqrt {\pi }}-\frac {2 (b c-a d)^2 e^{-(a+b x)^2} \text {erfc}(a+b x)}{b^3 \sqrt {\pi }}-\frac {2 d (b c-a d) e^{-(a+b x)^2} (a+b x) \text {erfc}(a+b x)}{b^3 \sqrt {\pi }}-\frac {2 d^2 e^{-(a+b x)^2} (a+b x)^2 \text {erfc}(a+b x)}{3 b^3 \sqrt {\pi }}-\frac {d (b c-a d) \text {erfc}(a+b x)^2}{2 b^3}+\frac {(b c-a d)^2 (a+b x) \text {erfc}(a+b x)^2}{b^3}+\frac {d (b c-a d) (a+b x)^2 \text {erfc}(a+b x)^2}{b^3}+\frac {d^2 (a+b x)^3 \text {erfc}(a+b x)^2}{3 b^3} \] Output:
d*(-a*d+b*c)/b^3/exp(2*(b*x+a)^2)/Pi+1/3*d^2*(b*x+a)/b^3/exp(2*(b*x+a)^2)/ Pi-(-a*d+b*c)^2*2^(1/2)/Pi^(1/2)*erf(2^(1/2)*(b*x+a))/b^3-5/12*d^2*erf(2^( 1/2)*(b*x+a))/b^3*2^(1/2)/Pi^(1/2)-2/3*d^2*erfc(b*x+a)/b^3/exp((b*x+a)^2)/ Pi^(1/2)-2*(-a*d+b*c)^2*erfc(b*x+a)/b^3/exp((b*x+a)^2)/Pi^(1/2)-2*d*(-a*d+ b*c)*(b*x+a)*erfc(b*x+a)/b^3/exp((b*x+a)^2)/Pi^(1/2)-2/3*d^2*(b*x+a)^2*erf c(b*x+a)/b^3/exp((b*x+a)^2)/Pi^(1/2)-1/2*d*(-a*d+b*c)*erfc(b*x+a)^2/b^3+(- a*d+b*c)^2*(b*x+a)*erfc(b*x+a)^2/b^3+d*(-a*d+b*c)*(b*x+a)^2*erfc(b*x+a)^2/ b^3+1/3*d^2*(b*x+a)^3*erfc(b*x+a)^2/b^3
Time = 3.35 (sec) , antiderivative size = 610, normalized size of antiderivative = 1.63 \[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\frac {-12 b^2 \sqrt {\pi } (c+d x)^2 \left (\sqrt {2} \text {erf}\left (\sqrt {2} (a+b x)\right )+\text {erfc}(a+b x) \left (2 e^{-(a+b x)^2}-\sqrt {\pi } (a+b x) \text {erfc}(a+b x)\right )\right )+6 b d (c+d x) \left (2 e^{-2 (a+b x)^2}+4 e^{-(a+b x)^2} \sqrt {\pi } (a+b x)-2 \pi (a+b x)^2-2 \pi \text {erf}(a+b x)-4 e^{-(a+b x)^2} \sqrt {\pi } (a+b x) \text {erf}(a+b x)+4 \pi (a+b x)^2 \text {erf}(a+b x)+\pi \text {erf}(a+b x)^2-2 \pi (a+b x)^2 \text {erf}(a+b x)^2+4 a \sqrt {2 \pi } \text {erf}\left (\sqrt {2} (a+b x)\right )+4 b \sqrt {2 \pi } x \text {erf}\left (\sqrt {2} (a+b x)\right )+2 \pi (2+\text {erfc}(-a-b x) \text {erfc}(a+b x))-4 \sqrt {\pi } (a+b x) \operatorname {ExpIntegralE}\left (\frac {1}{2},(a+b x)^2\right )\right )+d^2 \left (24 e^{-(a+b x)^2} \sqrt {\pi }-36 b \pi x+12 a^2 b \pi x+12 a b^2 \pi x^2+4 b^3 \pi x^3-8 e^{-2 (a+b x)^2} (a+b x)-8 e^{-(a+b x)^2} \sqrt {\pi } \left (1+(a+b x)^2\right )+12 a \pi \text {erf}(a+b x)+12 b \pi x \text {erf}(a+b x)-8 \pi (a+b x)^3 \text {erf}(a+b x)+8 e^{-(a+b x)^2} \sqrt {\pi } \left (1+(a+b x)^2\right ) \text {erf}(a+b x)+6 \pi (a+b x) \text {erf}(a+b x)^2+4 \pi (a+b x)^3 \text {erf}(a+b x)^2-5 \sqrt {2 \pi } \text {erf}\left (\sqrt {2} (a+b x)\right )-12 a^2 \sqrt {2 \pi } \text {erf}\left (\sqrt {2} (a+b x)\right )-12 b \sqrt {2 \pi } x (2 a+b x) \text {erf}\left (\sqrt {2} (a+b x)\right )-12 \sqrt {\pi } \operatorname {ExpIntegralE}\left (\frac {3}{2},(a+b x)^2\right )\right )}{12 b^3 \pi } \] Input:
Integrate[(c + d*x)^2*Erfc[a + b*x]^2,x]
Output:
(-12*b^2*Sqrt[Pi]*(c + d*x)^2*(Sqrt[2]*Erf[Sqrt[2]*(a + b*x)] + Erfc[a + b *x]*(2/E^(a + b*x)^2 - Sqrt[Pi]*(a + b*x)*Erfc[a + b*x])) + 6*b*d*(c + d*x )*(2/E^(2*(a + b*x)^2) + (4*Sqrt[Pi]*(a + b*x))/E^(a + b*x)^2 - 2*Pi*(a + b*x)^2 - 2*Pi*Erf[a + b*x] - (4*Sqrt[Pi]*(a + b*x)*Erf[a + b*x])/E^(a + b* x)^2 + 4*Pi*(a + b*x)^2*Erf[a + b*x] + Pi*Erf[a + b*x]^2 - 2*Pi*(a + b*x)^ 2*Erf[a + b*x]^2 + 4*a*Sqrt[2*Pi]*Erf[Sqrt[2]*(a + b*x)] + 4*b*Sqrt[2*Pi]* x*Erf[Sqrt[2]*(a + b*x)] + 2*Pi*(2 + Erfc[-a - b*x]*Erfc[a + b*x]) - 4*Sqr t[Pi]*(a + b*x)*ExpIntegralE[1/2, (a + b*x)^2]) + d^2*((24*Sqrt[Pi])/E^(a + b*x)^2 - 36*b*Pi*x + 12*a^2*b*Pi*x + 12*a*b^2*Pi*x^2 + 4*b^3*Pi*x^3 - (8 *(a + b*x))/E^(2*(a + b*x)^2) - (8*Sqrt[Pi]*(1 + (a + b*x)^2))/E^(a + b*x) ^2 + 12*a*Pi*Erf[a + b*x] + 12*b*Pi*x*Erf[a + b*x] - 8*Pi*(a + b*x)^3*Erf[ a + b*x] + (8*Sqrt[Pi]*(1 + (a + b*x)^2)*Erf[a + b*x])/E^(a + b*x)^2 + 6*P i*(a + b*x)*Erf[a + b*x]^2 + 4*Pi*(a + b*x)^3*Erf[a + b*x]^2 - 5*Sqrt[2*Pi ]*Erf[Sqrt[2]*(a + b*x)] - 12*a^2*Sqrt[2*Pi]*Erf[Sqrt[2]*(a + b*x)] - 12*b *Sqrt[2*Pi]*x*(2*a + b*x)*Erf[Sqrt[2]*(a + b*x)] - 12*Sqrt[Pi]*ExpIntegral E[3/2, (a + b*x)^2]))/(12*b^3*Pi)
Time = 0.57 (sec) , antiderivative size = 343, normalized size of antiderivative = 0.91, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6922, 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)^2 \, dx\) |
\(\Big \downarrow \) 6922 |
\(\displaystyle \frac {\int \left ((b c-a d)^2 \text {erfc}(a+b x)^2+d^2 (a+b x)^2 \text {erfc}(a+b x)^2+2 d (b c-a d) (a+b x) \text {erfc}(a+b x)^2\right )d(a+b x)}{b^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {-\sqrt {\frac {2}{\pi }} (b c-a d)^2 \text {erf}\left (\sqrt {2} (a+b x)\right )+d (a+b x)^2 (b c-a d) \text {erfc}(a+b x)^2+(a+b x) (b c-a d)^2 \text {erfc}(a+b x)^2-\frac {2 d e^{-(a+b x)^2} (a+b x) (b c-a d) \text {erfc}(a+b x)}{\sqrt {\pi }}-\frac {1}{2} d (b c-a d) \text {erfc}(a+b x)^2-\frac {2 e^{-(a+b x)^2} (b c-a d)^2 \text {erfc}(a+b x)}{\sqrt {\pi }}+\frac {d e^{-2 (a+b x)^2} (b c-a d)}{\pi }-\frac {5 d^2 \text {erf}\left (\sqrt {2} (a+b x)\right )}{6 \sqrt {2 \pi }}+\frac {1}{3} d^2 (a+b x)^3 \text {erfc}(a+b x)^2-\frac {2 d^2 e^{-(a+b x)^2} (a+b x)^2 \text {erfc}(a+b x)}{3 \sqrt {\pi }}-\frac {2 d^2 e^{-(a+b x)^2} \text {erfc}(a+b x)}{3 \sqrt {\pi }}+\frac {d^2 e^{-2 (a+b x)^2} (a+b x)}{3 \pi }}{b^3}\) |
Input:
Int[(c + d*x)^2*Erfc[a + b*x]^2,x]
Output:
((d*(b*c - a*d))/(E^(2*(a + b*x)^2)*Pi) + (d^2*(a + b*x))/(3*E^(2*(a + b*x )^2)*Pi) - (b*c - a*d)^2*Sqrt[2/Pi]*Erf[Sqrt[2]*(a + b*x)] - (5*d^2*Erf[Sq rt[2]*(a + b*x)])/(6*Sqrt[2*Pi]) - (2*d^2*Erfc[a + b*x])/(3*E^(a + b*x)^2* Sqrt[Pi]) - (2*(b*c - a*d)^2*Erfc[a + b*x])/(E^(a + b*x)^2*Sqrt[Pi]) - (2* d*(b*c - a*d)*(a + b*x)*Erfc[a + b*x])/(E^(a + b*x)^2*Sqrt[Pi]) - (2*d^2*( a + b*x)^2*Erfc[a + b*x])/(3*E^(a + b*x)^2*Sqrt[Pi]) - (d*(b*c - a*d)*Erfc [a + b*x]^2)/2 + (b*c - a*d)^2*(a + b*x)*Erfc[a + b*x]^2 + d*(b*c - a*d)*( a + b*x)^2*Erfc[a + b*x]^2 + (d^2*(a + b*x)^3*Erfc[a + b*x]^2)/3)/b^3
Int[Erfc[(a_) + (b_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [1/b^(m + 1) Subst[Int[ExpandIntegrand[Erfc[x]^2, (b*c - a*d + d*x)^m, x] , x], x, a + b*x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0]
\[\int \left (d x +c \right )^{2} \operatorname {erfc}\left (b x +a \right )^{2}d x\]
Input:
int((d*x+c)^2*erfc(b*x+a)^2,x)
Output:
int((d*x+c)^2*erfc(b*x+a)^2,x)
Time = 0.12 (sec) , antiderivative size = 472, normalized size of antiderivative = 1.26 \[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\frac {4 \, \pi b^{4} d^{2} x^{3} + 12 \, \pi b^{4} c d x^{2} + 12 \, \pi b^{4} c^{2} x - \sqrt {2} \sqrt {\pi } {\left (12 \, b^{2} c^{2} - 24 \, a b c d + {\left (12 \, a^{2} + 5\right )} d^{2}\right )} \sqrt {b^{2}} \operatorname {erf}\left (\frac {\sqrt {2} \sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) - 4 \, \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 )} \sqrt {b^{2}} \operatorname {erf}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) + 2 \, {\left (2 \, \pi b^{4} d^{2} x^{3} + 6 \, \pi b^{4} c d x^{2} + 6 \, \pi b^{4} c^{2} x + \pi {\left (6 \, a b^{3} c^{2} - 3 \, {\left (2 \, a^{2} + 1\right )} b^{2} c d + {\left (2 \, a^{3} + 3 \, a\right )} b d^{2}\right )}\right )} \operatorname {erf}\left (b x + a\right )^{2} - 8 \, \sqrt {\pi } {\left (b^{3} d^{2} x^{2} + 3 \, b^{3} c^{2} - 3 \, a b^{2} c d + {\left (a^{2} + 1\right )} b d^{2} + {\left (3 \, b^{3} c d - a b^{2} d^{2}\right )} x - {\left (b^{3} d^{2} x^{2} + 3 \, b^{3} c^{2} - 3 \, a b^{2} c d + {\left (a^{2} + 1\right )} b d^{2} + {\left (3 \, b^{3} c d - a b^{2} d^{2}\right )} x\right )} \operatorname {erf}\left (b x + a\right )\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )} - 8 \, {\left (\pi b^{4} d^{2} x^{3} + 3 \, \pi b^{4} c d x^{2} + 3 \, \pi b^{4} c^{2} x\right )} \operatorname {erf}\left (b x + a\right ) + 4 \, {\left (b^{2} d^{2} x + 3 \, b^{2} c d - 2 \, a b d^{2}\right )} e^{\left (-2 \, b^{2} x^{2} - 4 \, a b x - 2 \, a^{2}\right )}}{12 \, \pi b^{4}} \] Input:
integrate((d*x+c)^2*erfc(b*x+a)^2,x, algorithm="fricas")
Output:
1/12*(4*pi*b^4*d^2*x^3 + 12*pi*b^4*c*d*x^2 + 12*pi*b^4*c^2*x - sqrt(2)*sqr t(pi)*(12*b^2*c^2 - 24*a*b*c*d + (12*a^2 + 5)*d^2)*sqrt(b^2)*erf(sqrt(2)*s qrt(b^2)*(b*x + a)/b) - 4*pi*(6*a*b^2*c^2 - 3*(2*a^2 + 1)*b*c*d + (2*a^3 + 3*a)*d^2)*sqrt(b^2)*erf(sqrt(b^2)*(b*x + a)/b) + 2*(2*pi*b^4*d^2*x^3 + 6* pi*b^4*c*d*x^2 + 6*pi*b^4*c^2*x + pi*(6*a*b^3*c^2 - 3*(2*a^2 + 1)*b^2*c*d + (2*a^3 + 3*a)*b*d^2))*erf(b*x + a)^2 - 8*sqrt(pi)*(b^3*d^2*x^2 + 3*b^3*c ^2 - 3*a*b^2*c*d + (a^2 + 1)*b*d^2 + (3*b^3*c*d - a*b^2*d^2)*x - (b^3*d^2* x^2 + 3*b^3*c^2 - 3*a*b^2*c*d + (a^2 + 1)*b*d^2 + (3*b^3*c*d - a*b^2*d^2)* x)*erf(b*x + a))*e^(-b^2*x^2 - 2*a*b*x - a^2) - 8*(pi*b^4*d^2*x^3 + 3*pi*b ^4*c*d*x^2 + 3*pi*b^4*c^2*x)*erf(b*x + a) + 4*(b^2*d^2*x + 3*b^2*c*d - 2*a *b*d^2)*e^(-2*b^2*x^2 - 4*a*b*x - 2*a^2))/(pi*b^4)
\[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\int \left (c + d x\right )^{2} \operatorname {erfc}^{2}{\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)**2*erfc(b*x+a)**2,x)
Output:
Integral((c + d*x)**2*erfc(a + b*x)**2, x)
\[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\int { {\left (d x + c\right )}^{2} \operatorname {erfc}\left (b x + a\right )^{2} \,d x } \] Input:
integrate((d*x+c)^2*erfc(b*x+a)^2,x, algorithm="maxima")
Output:
integrate((d*x + c)^2*erfc(b*x + a)^2, x)
\[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\int { {\left (d x + c\right )}^{2} \operatorname {erfc}\left (b x + a\right )^{2} \,d x } \] Input:
integrate((d*x+c)^2*erfc(b*x+a)^2,x, algorithm="giac")
Output:
integrate((d*x + c)^2*erfc(b*x + a)^2, x)
Timed out. \[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\int {\mathrm {erfc}\left (a+b\,x\right )}^2\,{\left (c+d\,x\right )}^2 \,d x \] Input:
int(erfc(a + b*x)^2*(c + d*x)^2,x)
Output:
int(erfc(a + b*x)^2*(c + d*x)^2, x)
\[ \int (c+d x)^2 \text {erfc}(a+b x)^2 \, dx=\frac {-6 \sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \mathrm {erf}\left (b x +a \right ) a \,c^{2}-6 \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 )^{2}d x \right ) b \,c^{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^{2}d x \right ) b \,d^{2}-12 \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}} \left (\int \mathrm {erf}\left (b x +a \right )^{2} 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 )^{2} 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}-6 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)^2,x)
Output:
( - 6*sqrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*erf(a + b*x)*a*c**2 - 6*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)**2,x)*b*c**2 - 6*sqrt(pi)* e**(a**2 + 2*a*b*x + b**2*x**2)*int(erf(a + b*x)*x**2,x)*b*d**2 - 12*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(p i)*e**(a**2 + 2*a*b*x + b**2*x**2)*int(erf(a + b*x)**2*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)**2*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 - 6*c**2)/(3*sqrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*b)