Integrand size = 12, antiderivative size = 118 \[ \int (c+d x) \text {erf}(a+b x) \, dx=\frac {(b c-a d) e^{-(a+b x)^2}}{b^2 \sqrt {\pi }}+\frac {d e^{-(a+b x)^2} (a+b x)}{2 b^2 \sqrt {\pi }}-\frac {d \text {erf}(a+b x)}{4 b^2}-\frac {(b c-a d)^2 \text {erf}(a+b x)}{2 b^2 d}+\frac {(c+d x)^2 \text {erf}(a+b x)}{2 d} \] Output:
(-a*d+b*c)/b^2/exp((b*x+a)^2)/Pi^(1/2)+1/2*d*(b*x+a)/b^2/exp((b*x+a)^2)/Pi ^(1/2)-1/4*d*erf(b*x+a)/b^2-1/2*(-a*d+b*c)^2*erf(b*x+a)/b^2/d+1/2*(d*x+c)^ 2*erf(b*x+a)/d
Time = 0.08 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.75 \[ \int (c+d x) \text {erf}(a+b x) \, dx=\frac {e^{-(a+b x)^2} \left (4 b c-2 a d+2 b d x-e^{(a+b x)^2} \sqrt {\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)\right )}{4 b^2 \sqrt {\pi }} \] Input:
Integrate[(c + d*x)*Erf[a + b*x],x]
Output:
(4*b*c - 2*a*d + 2*b*d*x - E^(a + b*x)^2*Sqrt[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])/(4*b^2*E^(a + b*x)^2*Sqrt[Pi])
Time = 0.42 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.13, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6915, 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) \text {erf}(a+b x) \, dx\) |
\(\Big \downarrow \) 6915 |
\(\displaystyle \frac {(c+d x)^2 \text {erf}(a+b x)}{2 d}-\frac {b \int e^{-(a+b x)^2} (c+d x)^2dx}{\sqrt {\pi } d}\) |
\(\Big \downarrow \) 2656 |
\(\displaystyle \frac {(c+d x)^2 \text {erf}(a+b x)}{2 d}-\frac {b \int \left (\frac {e^{-(a+b x)^2} (b c-a d)^2}{b^2}+\frac {2 d e^{-(a+b x)^2} (a+b x) (b c-a d)}{b^2}+\frac {d^2 e^{-(a+b x)^2} (a+b x)^2}{b^2}\right )dx}{\sqrt {\pi } d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(c+d x)^2 \text {erf}(a+b x)}{2 d}-\frac {b \left (\frac {\sqrt {\pi } (b c-a d)^2 \text {erf}(a+b x)}{2 b^3}-\frac {d e^{-(a+b x)^2} (b c-a d)}{b^3}+\frac {\sqrt {\pi } d^2 \text {erf}(a+b x)}{4 b^3}-\frac {d^2 e^{-(a+b x)^2} (a+b x)}{2 b^3}\right )}{\sqrt {\pi } d}\) |
Input:
Int[(c + d*x)*Erf[a + b*x],x]
Output:
((c + d*x)^2*Erf[a + b*x])/(2*d) - (b*(-((d*(b*c - a*d))/(b^3*E^(a + b*x)^ 2)) - (d^2*(a + b*x))/(2*b^3*E^(a + b*x)^2) + (d^2*Sqrt[Pi]*Erf[a + b*x])/ (4*b^3) + ((b*c - a*d)^2*Sqrt[Pi]*Erf[a + b*x])/(2*b^3)))/(d*Sqrt[Pi])
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]
Int[Erf[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[( c + d*x)^(m + 1)*(Erf[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]
Time = 0.69 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.95
method | result | size |
derivativedivides | \(\frac {-\frac {\operatorname {erf}\left (b x +a \right ) \left (d a \left (b x +a \right )-c b \left (b x +a \right )-\frac {d \left (b x +a \right )^{2}}{2}\right )}{b}+\frac {-d \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 )+{\mathrm e}^{-\left (b x +a \right )^{2}} b c -{\mathrm e}^{-\left (b x +a \right )^{2}} a d}{\sqrt {\pi }\, b}}{b}\) | \(112\) |
default | \(\frac {-\frac {\operatorname {erf}\left (b x +a \right ) \left (d a \left (b x +a \right )-c b \left (b x +a \right )-\frac {d \left (b x +a \right )^{2}}{2}\right )}{b}+\frac {-d \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 )+{\mathrm e}^{-\left (b x +a \right )^{2}} b c -{\mathrm e}^{-\left (b x +a \right )^{2}} a d}{\sqrt {\pi }\, b}}{b}\) | \(112\) |
parallelrisch | \(\frac {2 d \,x^{2} \operatorname {erf}\left (b x +a \right ) \sqrt {\pi }\, b^{2}+4 x \,\operatorname {erf}\left (b x +a \right ) c \sqrt {\pi }\, b^{2}-2 \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right ) a^{2} d +4 \sqrt {\pi }\, \operatorname {erf}\left (b x +a \right ) a b c +2 \,{\mathrm e}^{-\left (b x +a \right )^{2}} b d x -\operatorname {erf}\left (b x +a \right ) d \sqrt {\pi }-2 \,{\mathrm e}^{-\left (b x +a \right )^{2}} a d +4 \,{\mathrm e}^{-\left (b x +a \right )^{2}} b c}{4 \sqrt {\pi }\, b^{2}}\) | \(128\) |
orering | \(-\frac {\left (-2 b^{3} d^{2} x^{3}-6 b^{3} c d \,x^{2}+2 a^{2} b \,d^{2} x -4 a \,b^{2} c d x -4 b^{3} c^{2} x +2 a^{2} b c d -4 a \,b^{2} c^{2}+2 b \,d^{2} x -a \,d^{2}+3 b c d \right ) \operatorname {erf}\left (b x +a \right )}{4 b^{3} \left (d x +c \right )}-\frac {\left (-x b d +a d -2 c b \right ) \left (\operatorname {erf}\left (b x +a \right ) d +\frac {2 \left (d x +c \right ) {\mathrm e}^{-\left (b x +a \right )^{2}} b}{\sqrt {\pi }}\right )}{4 b^{3} \left (d x +c \right )}\) | \(160\) |
parts | \(\frac {\operatorname {erf}\left (b x +a \right ) d \,x^{2}}{2}+\operatorname {erf}\left (b x +a \right ) c x -\frac {b \left ({\mathrm e}^{-a^{2}} d \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 )+2 \,{\mathrm e}^{-a^{2}} c \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 )}{\sqrt {\pi }}\) | \(173\) |
Input:
int((d*x+c)*erf(b*x+a),x,method=_RETURNVERBOSE)
Output:
1/b*(-erf(b*x+a)/b*(d*a*(b*x+a)-c*b*(b*x+a)-1/2*d*(b*x+a)^2)+1/Pi^(1/2)/b* (-d*(-1/2*(b*x+a)/exp((b*x+a)^2)+1/4*Pi^(1/2)*erf(b*x+a))+c*b/exp((b*x+a)^ 2)-d*a/exp((b*x+a)^2)))
Time = 0.10 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.77 \[ \int (c+d x) \text {erf}(a+b x) \, dx=\frac {2 \, \sqrt {\pi } {\left (b d x + 2 \, b c - a d\right )} e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )} + {\left (2 \, \pi b^{2} d x^{2} + 4 \, \pi b^{2} c x + \pi {\left (4 \, a b c - {\left (2 \, a^{2} + 1\right )} d\right )}\right )} \operatorname {erf}\left (b x + a\right )}{4 \, \pi b^{2}} \] Input:
integrate((d*x+c)*erf(b*x+a),x, algorithm="fricas")
Output:
1/4*(2*sqrt(pi)*(b*d*x + 2*b*c - a*d)*e^(-b^2*x^2 - 2*a*b*x - a^2) + (2*pi *b^2*d*x^2 + 4*pi*b^2*c*x + pi*(4*a*b*c - (2*a^2 + 1)*d))*erf(b*x + a))/(p i*b^2)
Time = 0.57 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.51 \[ \int (c+d x) \text {erf}(a+b x) \, dx=\begin {cases} - \frac {a^{2} d \operatorname {erf}{\left (a + b x \right )}}{2 b^{2}} + \frac {a c \operatorname {erf}{\left (a + b x \right )}}{b} - \frac {a d e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{2 \sqrt {\pi } b^{2}} + c x \operatorname {erf}{\left (a + b x \right )} + \frac {d x^{2} \operatorname {erf}{\left (a + b x \right )}}{2} + \frac {c e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{\sqrt {\pi } b} + \frac {d x e^{- a^{2}} e^{- b^{2} x^{2}} e^{- 2 a b x}}{2 \sqrt {\pi } b} - \frac {d \operatorname {erf}{\left (a + b x \right )}}{4 b^{2}} & \text {for}\: b \neq 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \operatorname {erf}{\left (a \right )} & \text {otherwise} \end {cases} \] Input:
integrate((d*x+c)*erf(b*x+a),x)
Output:
Piecewise((-a**2*d*erf(a + b*x)/(2*b**2) + a*c*erf(a + b*x)/b - a*d*exp(-a **2)*exp(-b**2*x**2)*exp(-2*a*b*x)/(2*sqrt(pi)*b**2) + c*x*erf(a + b*x) + d*x**2*erf(a + b*x)/2 + c*exp(-a**2)*exp(-b**2*x**2)*exp(-2*a*b*x)/(sqrt(p i)*b) + d*x*exp(-a**2)*exp(-b**2*x**2)*exp(-2*a*b*x)/(2*sqrt(pi)*b) - d*er f(a + b*x)/(4*b**2), Ne(b, 0)), ((c*x + d*x**2/2)*erf(a), True))
\[ \int (c+d x) \text {erf}(a+b x) \, dx=\int { {\left (d x + c\right )} \operatorname {erf}\left (b x + a\right ) \,d x } \] Input:
integrate((d*x+c)*erf(b*x+a),x, algorithm="maxima")
Output:
1/2*(d*x^2 + 2*c*x)*erf(b*x + a) - integrate((b*d*x^2 + 2*b*c*x)*e^(-b^2*x ^2 - 2*a*b*x - a^2), x)/sqrt(pi)
Time = 0.13 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.26 \[ \int (c+d x) \text {erf}(a+b x) \, dx=\frac {1}{2} \, {\left (d x^{2} + 2 \, c x\right )} \operatorname {erf}\left (b x + a\right ) - \frac {4 \, \sqrt {\pi } {\left (\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}\right )} c - \frac {\sqrt {\pi } {\left (\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}\right )} d}{b}}{4 \, \pi } \] Input:
integrate((d*x+c)*erf(b*x+a),x, algorithm="giac")
Output:
1/2*(d*x^2 + 2*c*x)*erf(b*x + a) - 1/4*(4*sqrt(pi)*(sqrt(pi)*a*erf(-b*(x + a/b))/b - e^(-b^2*x^2 - 2*a*b*x - a^2)/b)*c - sqrt(pi)*(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)*d/b)/pi
Time = 0.47 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.07 \[ \int (c+d x) \text {erf}(a+b x) \, dx=\mathrm {erf}\left (a+b\,x\right )\,\left (\frac {d\,x^2}{2}+c\,x\right )-\frac {\frac {{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}\,\left (\frac {a\,d}{2}-b\,c\right )}{b^2}-\frac {d\,x\,{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}}{2\,b}}{\sqrt {\pi }}+\frac {\sqrt {\pi }\,\mathrm {erfi}\left (a\,1{}\mathrm {i}+b\,x\,1{}\mathrm {i}\right )\,\left (\frac {2\,d\,a^2+d}{2\,\sqrt {\pi }}-\frac {2\,a\,b\,c}{\sqrt {\pi }}\right )\,1{}\mathrm {i}}{2\,b^2} \] Input:
int(erf(a + b*x)*(c + d*x),x)
Output:
erf(a + b*x)*(c*x + (d*x^2)/2) - ((exp(- a^2 - b^2*x^2 - 2*a*b*x)*((a*d)/2 - b*c))/b^2 - (d*x*exp(- a^2 - b^2*x^2 - 2*a*b*x))/(2*b))/pi^(1/2) + (pi^ (1/2)*erfi(a*1i + b*x*1i)*((d + 2*a^2*d)/(2*pi^(1/2)) - (2*a*b*c)/pi^(1/2) )*1i)/(2*b^2)
\[ \int (c+d x) \text {erf}(a+b x) \, dx=\frac {\sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \mathrm {erf}\left (b x +a \right ) a c +\sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} \mathrm {erf}\left (b x +a \right ) b c x +\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 d +c}{\sqrt {\pi }\, e^{b^{2} x^{2}+2 a b x +a^{2}} b} \] Input:
int((d*x+c)*erf(b*x+a),x)
Output:
(sqrt(pi)*e**(a**2 + 2*a*b*x + b**2*x**2)*erf(a + b*x)*a*c + sqrt(pi)*e**( a**2 + 2*a*b*x + b**2*x**2)*erf(a + b*x)*b*c*x + sqrt(pi)*e**(a**2 + 2*a*b *x + b**2*x**2)*int(erf(a + b*x)*x,x)*b*d + c)/(sqrt(pi)*e**(a**2 + 2*a*b* x + b**2*x**2)*b)