Integrand size = 14, antiderivative size = 188 \[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=\frac {d e^{-2 (a+b x)^2}}{2 b^2 \pi }+\frac {2 (b c-a d) e^{-(a+b x)^2} \text {erf}(a+b x)}{b^2 \sqrt {\pi }}+\frac {d e^{-(a+b x)^2} (a+b x) \text {erf}(a+b x)}{b^2 \sqrt {\pi }}-\frac {d \text {erf}(a+b x)^2}{4 b^2}+\frac {(b c-a d) (a+b x) \text {erf}(a+b x)^2}{b^2}+\frac {d (a+b x)^2 \text {erf}(a+b x)^2}{2 b^2}-\frac {(b c-a d) \sqrt {\frac {2}{\pi }} \text {erf}\left (\sqrt {2} (a+b x)\right )}{b^2} \] Output:
1/2*d/b^2/exp(2*(b*x+a)^2)/Pi+2*(-a*d+b*c)*erf(b*x+a)/b^2/exp((b*x+a)^2)/P i^(1/2)+d*(b*x+a)*erf(b*x+a)/b^2/exp((b*x+a)^2)/Pi^(1/2)-1/4*d*erf(b*x+a)^ 2/b^2+(-a*d+b*c)*(b*x+a)*erf(b*x+a)^2/b^2+1/2*d*(b*x+a)^2*erf(b*x+a)^2/b^2 -(-a*d+b*c)*2^(1/2)/Pi^(1/2)*erf(2^(1/2)*(b*x+a))/b^2
Time = 0.29 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.70 \[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=\frac {2 d e^{-2 (a+b x)^2}+4 e^{-(a+b x)^2} \sqrt {\pi } (2 b c-a d+b d x) \text {erf}(a+b x)+\pi \left (4 a b c-d-2 a^2 d+4 b^2 c x+2 b^2 d x^2\right ) \text {erf}(a+b x)^2+4 (-b c+a d) \sqrt {2 \pi } \text {erf}\left (\sqrt {2} (a+b x)\right )}{4 b^2 \pi } \] Input:
Integrate[(c + d*x)*Erf[a + b*x]^2,x]
Output:
((2*d)/E^(2*(a + b*x)^2) + (4*Sqrt[Pi]*(2*b*c - a*d + b*d*x)*Erf[a + b*x]) /E^(a + b*x)^2 + Pi*(4*a*b*c - d - 2*a^2*d + 4*b^2*c*x + 2*b^2*d*x^2)*Erf[ a + b*x]^2 + 4*(-(b*c) + a*d)*Sqrt[2*Pi]*Erf[Sqrt[2]*(a + b*x)])/(4*b^2*Pi )
Time = 0.39 (sec) , antiderivative size = 171, 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.143, Rules used = {6921, 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) \text {erf}(a+b x)^2 \, dx\) |
\(\Big \downarrow \) 6921 |
\(\displaystyle \frac {\int \left ((b c-a d) \text {erf}(a+b x)^2+d (a+b x) \text {erf}(a+b x)^2\right )d(a+b x)}{b^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(a+b x) (b c-a d) \text {erf}(a+b x)^2+\frac {2 e^{-(a+b x)^2} (b c-a d) \text {erf}(a+b x)}{\sqrt {\pi }}-\sqrt {\frac {2}{\pi }} (b c-a d) \text {erf}\left (\sqrt {2} (a+b x)\right )+\frac {1}{2} d (a+b x)^2 \text {erf}(a+b x)^2-\frac {1}{4} d \text {erf}(a+b x)^2+\frac {d e^{-(a+b x)^2} (a+b x) \text {erf}(a+b x)}{\sqrt {\pi }}+\frac {d e^{-2 (a+b x)^2}}{2 \pi }}{b^2}\) |
Input:
Int[(c + d*x)*Erf[a + b*x]^2,x]
Output:
(d/(2*E^(2*(a + b*x)^2)*Pi) + (2*(b*c - a*d)*Erf[a + b*x])/(E^(a + b*x)^2* Sqrt[Pi]) + (d*(a + b*x)*Erf[a + b*x])/(E^(a + b*x)^2*Sqrt[Pi]) - (d*Erf[a + b*x]^2)/4 + (b*c - a*d)*(a + b*x)*Erf[a + b*x]^2 + (d*(a + b*x)^2*Erf[a + b*x]^2)/2 - (b*c - a*d)*Sqrt[2/Pi]*Erf[Sqrt[2]*(a + b*x)])/b^2
Int[Erf[(a_) + (b_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[ 1/b^(m + 1) Subst[Int[ExpandIntegrand[Erf[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 ) \operatorname {erf}\left (b x +a \right )^{2}d x\]
Input:
int((d*x+c)*erf(b*x+a)^2,x)
Output:
int((d*x+c)*erf(b*x+a)^2,x)
Time = 0.09 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.91 \[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=-\frac {4 \, \sqrt {2} \sqrt {\pi } \sqrt {b^{2}} {\left (b c - a d\right )} \operatorname {erf}\left (\frac {\sqrt {2} \sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) - 4 \, \sqrt {\pi } {\left (b^{2} d x + 2 \, b^{2} c - a b d\right )} \operatorname {erf}\left (b x + a\right ) e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )} - {\left (2 \, \pi b^{3} d x^{2} + 4 \, \pi b^{3} c x + \pi {\left (4 \, a b^{2} c - {\left (2 \, a^{2} + 1\right )} b d\right )}\right )} \operatorname {erf}\left (b x + a\right )^{2} - 2 \, b d e^{\left (-2 \, b^{2} x^{2} - 4 \, a b x - 2 \, a^{2}\right )}}{4 \, \pi b^{3}} \] Input:
integrate((d*x+c)*erf(b*x+a)^2,x, algorithm="fricas")
Output:
-1/4*(4*sqrt(2)*sqrt(pi)*sqrt(b^2)*(b*c - a*d)*erf(sqrt(2)*sqrt(b^2)*(b*x + a)/b) - 4*sqrt(pi)*(b^2*d*x + 2*b^2*c - a*b*d)*erf(b*x + a)*e^(-b^2*x^2 - 2*a*b*x - a^2) - (2*pi*b^3*d*x^2 + 4*pi*b^3*c*x + pi*(4*a*b^2*c - (2*a^2 + 1)*b*d))*erf(b*x + a)^2 - 2*b*d*e^(-2*b^2*x^2 - 4*a*b*x - 2*a^2))/(pi*b ^3)
\[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=\int \left (c + d x\right ) \operatorname {erf}^{2}{\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)*erf(b*x+a)**2,x)
Output:
Integral((c + d*x)*erf(a + b*x)**2, x)
\[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=\int { {\left (d x + c\right )} \operatorname {erf}\left (b x + a\right )^{2} \,d x } \] Input:
integrate((d*x+c)*erf(b*x+a)^2,x, algorithm="maxima")
Output:
1/2*(d*x^2 + 2*c*x)*erf(b*x + a)^2 - integrate(2*(b*d*x^2 + 2*b*c*x)*erf(b *x + a)*e^(-b^2*x^2 - 2*a*b*x - a^2), x)/sqrt(pi)
\[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=\int { {\left (d x + c\right )} \operatorname {erf}\left (b x + a\right )^{2} \,d x } \] Input:
integrate((d*x+c)*erf(b*x+a)^2,x, algorithm="giac")
Output:
integrate((d*x + c)*erf(b*x + a)^2, x)
Time = 3.91 (sec) , antiderivative size = 186, normalized size of antiderivative = 0.99 \[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=\frac {d\,x^2\,{\mathrm {erf}\left (a+b\,x\right )}^2}{2}-\frac {{\mathrm {erf}\left (a+b\,x\right )}^2\,\left (2\,d\,a^2-4\,b\,c\,a+d\right )}{4\,b^2}+c\,x\,{\mathrm {erf}\left (a+b\,x\right )}^2+\frac {d\,{\mathrm {e}}^{-2\,a^2-4\,a\,b\,x-2\,b^2\,x^2}}{2\,b^2\,\pi }-\frac {\mathrm {erf}\left (a+b\,x\right )\,{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}\,\left (a\,d-2\,b\,c\right )}{b^2\,\sqrt {\pi }}+\frac {\sqrt {2}\,\mathrm {erf}\left (\sqrt {2}\,\left (a+b\,x\right )\right )\,\left (a\,d-b\,c\right )}{b^2\,\sqrt {\pi }}+\frac {d\,x\,\mathrm {erf}\left (a+b\,x\right )\,{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}}{b\,\sqrt {\pi }} \] Input:
int(erf(a + b*x)^2*(c + d*x),x)
Output:
(d*x^2*erf(a + b*x)^2)/2 - (erf(a + b*x)^2*(d + 2*a^2*d - 4*a*b*c))/(4*b^2 ) + c*x*erf(a + b*x)^2 + (d*exp(- 2*a^2 - 2*b^2*x^2 - 4*a*b*x))/(2*b^2*pi) - (erf(a + b*x)*exp(- a^2 - b^2*x^2 - 2*a*b*x)*(a*d - 2*b*c))/(b^2*pi^(1/ 2)) + (2^(1/2)*erf(2^(1/2)*(a + b*x))*(a*d - b*c))/(b^2*pi^(1/2)) + (d*x*e rf(a + b*x)*exp(- a^2 - b^2*x^2 - 2*a*b*x))/(b*pi^(1/2))
\[ \int (c+d x) \text {erf}(a+b x)^2 \, dx=\left (\int \mathrm {erf}\left (b x +a \right )^{2}d x \right ) c +\left (\int \mathrm {erf}\left (b x +a \right )^{2} x d x \right ) d \] Input:
int((d*x+c)*erf(b*x+a)^2,x)
Output:
int(erf(a + b*x)**2,x)*c + int(erf(a + b*x)**2*x,x)*d