\(\int (c+d x) \text {erfi}(a+b x) \, dx\) [223]

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

Optimal result

Integrand size = 12, antiderivative size = 115 \[ \int (c+d x) \text {erfi}(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 {erfi}(a+b x)}{4 b^2}-\frac {(b c-a d)^2 \text {erfi}(a+b x)}{2 b^2 d}+\frac {(c+d x)^2 \text {erfi}(a+b x)}{2 d} \] Output:

-(-a*d+b*c)*exp((b*x+a)^2)/b^2/Pi^(1/2)-1/2*d*exp((b*x+a)^2)*(b*x+a)/b^2/P 
i^(1/2)+1/4*d*erfi(b*x+a)/b^2-1/2*(-a*d+b*c)^2*erfi(b*x+a)/b^2/d+1/2*(d*x+ 
c)^2*erfi(b*x+a)/d
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.68 \[ \int (c+d x) \text {erfi}(a+b x) \, dx=\frac {-2 e^{(a+b x)^2} (2 b c-a d+b d x)+\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 {erfi}(a+b x)}{4 b^2 \sqrt {\pi }} \] Input:

Integrate[(c + d*x)*Erfi[a + b*x],x]
 

Output:

(-2*E^(a + b*x)^2*(2*b*c - a*d + b*d*x) + Sqrt[Pi]*(4*a*b*c + d - 2*a^2*d 
+ 4*b^2*c*x + 2*b^2*d*x^2)*Erfi[a + b*x])/(4*b^2*Sqrt[Pi])
 

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.11, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6917, 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 {erfi}(a+b x) \, dx\)

\(\Big \downarrow \) 6917

\(\displaystyle \frac {(c+d x)^2 \text {erfi}(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 {erfi}(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 {erfi}(a+b x)}{2 d}-\frac {b \left (\frac {\sqrt {\pi } (b c-a d)^2 \text {erfi}(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 {erfi}(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)*Erfi[a + b*x],x]
 

Output:

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

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 6917
Int[Erfi[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[ 
(c + d*x)^(m + 1)*(Erfi[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] (verified)

Time = 0.34 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.02

method result size
derivativedivides \(\frac {-\frac {\operatorname {erfi}\left (b x +a \right ) d a \left (b x +a \right )}{b}+\operatorname {erfi}\left (b x +a \right ) c \left (b x +a \right )+\frac {\operatorname {erfi}\left (b x +a \right ) d \left (b x +a \right )^{2}}{2 b}+\frac {-d \left (\frac {\left (b x +a \right ) {\mathrm e}^{\left (b x +a \right )^{2}}}{2}-\frac {\sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{4}\right )-{\mathrm e}^{\left (b x +a \right )^{2}} b c +d a \,{\mathrm e}^{\left (b x +a \right )^{2}}}{b \sqrt {\pi }}}{b}\) \(117\)
default \(\frac {-\frac {\operatorname {erfi}\left (b x +a \right ) d a \left (b x +a \right )}{b}+\operatorname {erfi}\left (b x +a \right ) c \left (b x +a \right )+\frac {\operatorname {erfi}\left (b x +a \right ) d \left (b x +a \right )^{2}}{2 b}+\frac {-d \left (\frac {\left (b x +a \right ) {\mathrm e}^{\left (b x +a \right )^{2}}}{2}-\frac {\sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{4}\right )-{\mathrm e}^{\left (b x +a \right )^{2}} b c +d a \,{\mathrm e}^{\left (b x +a \right )^{2}}}{b \sqrt {\pi }}}{b}\) \(117\)
parallelrisch \(\frac {2 d \,x^{2} \operatorname {erfi}\left (b x +a \right ) \sqrt {\pi }\, b^{2}+4 c x \,\operatorname {erfi}\left (b x +a \right ) \sqrt {\pi }\, b^{2}-2 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a^{2} d +4 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a b c -2 \,{\mathrm e}^{\left (b x +a \right )^{2}} b d x +\operatorname {erfi}\left (b x +a \right ) d \sqrt {\pi }+2 d a \,{\mathrm e}^{\left (b x +a \right )^{2}}-4 \,{\mathrm e}^{\left (b x +a \right )^{2}} b c}{4 \sqrt {\pi }\, b^{2}}\) \(121\)
parts \(\frac {\operatorname {erfi}\left (b x +a \right ) d \,x^{2}}{2}+\operatorname {erfi}\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 {i a \sqrt {\pi }\, {\mathrm e}^{-a^{2}} \operatorname {erf}\left (i b x +i a \right )}{2 b^{2}}\right )}{b}+\frac {i \sqrt {\pi }\, {\mathrm e}^{-a^{2}} \operatorname {erf}\left (i b x +i 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 {i a \sqrt {\pi }\, {\mathrm e}^{-a^{2}} \operatorname {erf}\left (i b x +i a \right )}{2 b^{2}}\right )\right )}{\sqrt {\pi }}\) \(190\)

Input:

int((d*x+c)*erfi(b*x+a),x,method=_RETURNVERBOSE)
 

Output:

1/b*(-1/b*erfi(b*x+a)*d*a*(b*x+a)+erfi(b*x+a)*c*(b*x+a)+1/2/b*erfi(b*x+a)* 
d*(b*x+a)^2+1/b/Pi^(1/2)*(-d*(1/2*(b*x+a)*exp((b*x+a)^2)-1/4*Pi^(1/2)*erfi 
(b*x+a))-exp((b*x+a)^2)*b*c+d*a*exp((b*x+a)^2)))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.77 \[ \int (c+d x) \text {erfi}(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 {erfi}\left (b x + a\right )}{4 \, \pi b^{2}} \] Input:

integrate((d*x+c)*erfi(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))*erfi(b*x + a))/( 
pi*b^2)
 

Sympy [A] (verification not implemented)

Time = 0.47 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.55 \[ \int (c+d x) \text {erfi}(a+b x) \, dx=\begin {cases} - \frac {a^{2} d \operatorname {erfi}{\left (a + b x \right )}}{2 b^{2}} + \frac {a c \operatorname {erfi}{\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 {erfi}{\left (a + b x \right )} + \frac {d x^{2} \operatorname {erfi}{\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 {erfi}{\left (a + b x \right )}}{4 b^{2}} & \text {for}\: b \neq 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \operatorname {erfi}{\left (a \right )} & \text {otherwise} \end {cases} \] Input:

integrate((d*x+c)*erfi(b*x+a),x)
 

Output:

Piecewise((-a**2*d*erfi(a + b*x)/(2*b**2) + a*c*erfi(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*erfi(a + b*x) + 
d*x**2*erfi(a + b*x)/2 - c*exp(a**2)*exp(b**2*x**2)*exp(2*a*b*x)/(sqrt(pi) 
*b) - d*x*exp(a**2)*exp(b**2*x**2)*exp(2*a*b*x)/(2*sqrt(pi)*b) + d*erfi(a 
+ b*x)/(4*b**2), Ne(b, 0)), ((c*x + d*x**2/2)*erfi(a), True))
 

Maxima [F]

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

integrate((d*x+c)*erfi(b*x+a),x, algorithm="maxima")
 

Output:

integrate((d*x + c)*erfi(b*x + a), x)
 

Giac [F]

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

integrate((d*x+c)*erfi(b*x+a),x, algorithm="giac")
 

Output:

integrate((d*x + c)*erfi(b*x + a), x)
 

Mupad [B] (verification not implemented)

Time = 3.91 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.92 \[ \int (c+d x) \text {erfi}(a+b x) \, dx=\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 }}+\mathrm {erfi}\left (a+b\,x\right )\,\left (\frac {d\,x^2}{2}+c\,x\right )+\frac {\mathrm {erfi}\left (a+b\,x\right )\,\left (-2\,d\,a^2\,b+4\,c\,a\,b^2+d\,b\right )}{4\,b^3} \] Input:

int(erfi(a + b*x)*(c + d*x),x)
 

Output:

((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) + erfi(a + b*x)*(c*x + (d*x^2)/2) + (erfi(a 
 + b*x)*(b*d + 4*a*b^2*c - 2*a^2*b*d))/(4*b^3)
 

Reduce [F]

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

int((d*x+c)*erfi(b*x+a),x)
 

Output:

( - (sqrt(pi)*erf(a*i + b*i*x)*a*c*i + sqrt(pi)*erf(a*i + b*i*x)*b*c*i*x + 
 e**(a**2 + 2*a*b*x + b**2*x**2)*c + sqrt(pi)*int(erf(a*i + b*i*x)*x,x)*b* 
d*i))/(sqrt(pi)*b)