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

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

Optimal result

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

d^2*(-a*d+b*c)*exp((b*x+a)^2)/b^4/Pi^(1/2)-(-a*d+b*c)^3*exp((b*x+a)^2)/b^4 
/Pi^(1/2)+3/8*d^3*exp((b*x+a)^2)*(b*x+a)/b^4/Pi^(1/2)-3/2*d*(-a*d+b*c)^2*e 
xp((b*x+a)^2)*(b*x+a)/b^4/Pi^(1/2)-d^2*(-a*d+b*c)*exp((b*x+a)^2)*(b*x+a)^2 
/b^4/Pi^(1/2)-1/4*d^3*exp((b*x+a)^2)*(b*x+a)^3/b^4/Pi^(1/2)-3/16*d^3*erfi( 
b*x+a)/b^4+3/4*d*(-a*d+b*c)^2*erfi(b*x+a)/b^4-1/4*(-a*d+b*c)^4*erfi(b*x+a) 
/b^4/d+1/4*(d*x+c)^4*erfi(b*x+a)/d
 

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 237, normalized size of antiderivative = 0.85 \[ \int (c+d x)^3 \text {erfi}(a+b x) \, dx=\frac {-2 e^{(a+b x)^2} \left (a \left (5-2 a^2\right ) d^3+b d^2 \left (8 \left (-1+a^2\right ) c+\left (-3+2 a^2\right ) d x\right )-2 a b^2 d \left (6 c^2+4 c d x+d^2 x^2\right )+2 b^3 \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )\right )+\sqrt {\pi } \left (12 b^2 c^2 d+16 a^3 b c d^2-3 d^3-4 a^4 d^3+12 a^2 d \left (-2 b^2 c^2+d^2\right )+8 a \left (2 b^3 c^3-3 b c d^2\right )+4 b^4 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )\right ) \text {erfi}(a+b x)}{16 b^4 \sqrt {\pi }} \] Input:

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

Output:

(-2*E^(a + b*x)^2*(a*(5 - 2*a^2)*d^3 + b*d^2*(8*(-1 + a^2)*c + (-3 + 2*a^2 
)*d*x) - 2*a*b^2*d*(6*c^2 + 4*c*d*x + d^2*x^2) + 2*b^3*(4*c^3 + 6*c^2*d*x 
+ 4*c*d^2*x^2 + d^3*x^3)) + Sqrt[Pi]*(12*b^2*c^2*d + 16*a^3*b*c*d^2 - 3*d^ 
3 - 4*a^4*d^3 + 12*a^2*d*(-2*b^2*c^2 + d^2) + 8*a*(2*b^3*c^3 - 3*b*c*d^2) 
+ 4*b^4*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3))*Erfi[a + b*x])/(16* 
b^4*Sqrt[Pi])
 

Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 279, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, 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)^3 \text {erfi}(a+b x) \, dx\)

\(\Big \downarrow \) 6917

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

\(\Big \downarrow \) 2656

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

\(\Big \downarrow \) 2009

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

Input:

Int[(c + d*x)^3*Erfi[a + b*x],x]
 

Output:

((c + d*x)^4*Erfi[a + b*x])/(4*d) - (b*((-2*d^3*(b*c - a*d)*E^(a + b*x)^2) 
/b^5 + (2*d*(b*c - a*d)^3*E^(a + b*x)^2)/b^5 - (3*d^4*E^(a + b*x)^2*(a + b 
*x))/(4*b^5) + (3*d^2*(b*c - a*d)^2*E^(a + b*x)^2*(a + b*x))/b^5 + (2*d^3* 
(b*c - a*d)*E^(a + b*x)^2*(a + b*x)^2)/b^5 + (d^4*E^(a + b*x)^2*(a + b*x)^ 
3)/(2*b^5) + (3*d^4*Sqrt[Pi]*Erfi[a + b*x])/(8*b^5) - (3*d^2*(b*c - a*d)^2 
*Sqrt[Pi]*Erfi[a + b*x])/(2*b^5) + ((b*c - a*d)^4*Sqrt[Pi]*Erfi[a + b*x])/ 
(2*b^5)))/(2*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 = 1.04 (sec) , antiderivative size = 457, normalized size of antiderivative = 1.64

method result size
parallelrisch \(\frac {-24 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a b c \,d^{2}+16 x \,{\mathrm e}^{\left (b x +a \right )^{2}} a \,b^{2} c \,d^{2}+16 d^{2} c \,\operatorname {erfi}\left (b x +a \right ) x^{3} \sqrt {\pi }\, b^{4}+24 c^{2} d \,\operatorname {erfi}\left (b x +a \right ) x^{2} \sqrt {\pi }\, b^{4}+16 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a^{3} b c \,d^{2}-24 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a^{2} b^{2} c^{2} d -16 \,{\mathrm e}^{\left (b x +a \right )^{2}} b^{3} c^{3}-10 \,{\mathrm e}^{\left (b x +a \right )^{2}} a \,d^{3}-3 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) d^{3}-4 x \,{\mathrm e}^{\left (b x +a \right )^{2}} a^{2} b \,d^{3}-24 x \,{\mathrm e}^{\left (b x +a \right )^{2}} b^{3} c^{2} d +4 x^{2} {\mathrm e}^{\left (b x +a \right )^{2}} a \,b^{2} d^{3}-16 x^{2} {\mathrm e}^{\left (b x +a \right )^{2}} b^{3} c \,d^{2}-16 \,{\mathrm e}^{\left (b x +a \right )^{2}} a^{2} b c \,d^{2}+24 \,{\mathrm e}^{\left (b x +a \right )^{2}} a \,b^{2} c^{2} d +4 d^{3} \operatorname {erfi}\left (b x +a \right ) x^{4} \sqrt {\pi }\, b^{4}+16 x \,\operatorname {erfi}\left (b x +a \right ) c^{3} \sqrt {\pi }\, b^{4}+16 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a \,b^{3} c^{3}+12 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) b^{2} c^{2} d +4 \,{\mathrm e}^{\left (b x +a \right )^{2}} a^{3} d^{3}-4 d^{3} {\mathrm e}^{\left (b x +a \right )^{2}} x^{3} b^{3}+6 x \,{\mathrm e}^{\left (b x +a \right )^{2}} b \,d^{3}+16 \,{\mathrm e}^{\left (b x +a \right )^{2}} b c \,d^{2}-4 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a^{4} d^{3}+12 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right ) a^{2} d^{3}}{16 \sqrt {\pi }\, b^{4}}\) \(457\)
derivativedivides \(\frac {\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) a^{4}}{4 b^{3}}-\frac {d^{2} \operatorname {erfi}\left (b x +a \right ) a^{3} c}{b^{2}}-\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) a^{3} \left (b x +a \right )}{b^{3}}+\frac {3 d \,\operatorname {erfi}\left (b x +a \right ) a^{2} c^{2}}{2 b}+\frac {3 d^{2} \operatorname {erfi}\left (b x +a \right ) a^{2} c \left (b x +a \right )}{b^{2}}+\frac {3 d^{3} \operatorname {erfi}\left (b x +a \right ) a^{2} \left (b x +a \right )^{2}}{2 b^{3}}-\operatorname {erfi}\left (b x +a \right ) a \,c^{3}-\frac {3 d \,\operatorname {erfi}\left (b x +a \right ) a \,c^{2} \left (b x +a \right )}{b}-\frac {3 d^{2} \operatorname {erfi}\left (b x +a \right ) a c \left (b x +a \right )^{2}}{b^{2}}-\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) a \left (b x +a \right )^{3}}{b^{3}}+\frac {b \,\operatorname {erfi}\left (b x +a \right ) c^{4}}{4 d}+\operatorname {erfi}\left (b x +a \right ) c^{3} \left (b x +a \right )+\frac {3 d \,\operatorname {erfi}\left (b x +a \right ) c^{2} \left (b x +a \right )^{2}}{2 b}+\frac {d^{2} \operatorname {erfi}\left (b x +a \right ) c \left (b x +a \right )^{3}}{b^{2}}+\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) \left (b x +a \right )^{4}}{4 b^{3}}-\frac {\frac {a^{4} d^{4} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{2}+\frac {b^{4} c^{4} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{2}+d^{4} \left (\frac {{\mathrm e}^{\left (b x +a \right )^{2}} \left (b x +a \right )^{3}}{2}-\frac {3 \left (b x +a \right ) {\mathrm e}^{\left (b x +a \right )^{2}}}{4}+\frac {3 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{8}\right )-4 a \,d^{4} \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 )+6 a^{2} d^{4} \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 )-2 a^{3} d^{4} {\mathrm e}^{\left (b x +a \right )^{2}}-2 a \,b^{3} c^{3} d \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )+3 a^{2} b^{2} c^{2} d^{2} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )-2 a^{3} b c \,d^{3} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )+4 b c \,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 )+6 b^{2} c^{2} d^{2} \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 )+2 b^{3} c^{3} d \,{\mathrm e}^{\left (b x +a \right )^{2}}-12 a b c \,d^{3} \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 )-6 a \,b^{2} c^{2} d^{2} {\mathrm e}^{\left (b x +a \right )^{2}}+6 a^{2} b c \,d^{3} {\mathrm e}^{\left (b x +a \right )^{2}}}{2 b^{3} d \sqrt {\pi }}}{b}\) \(703\)
default \(\frac {\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) a^{4}}{4 b^{3}}-\frac {d^{2} \operatorname {erfi}\left (b x +a \right ) a^{3} c}{b^{2}}-\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) a^{3} \left (b x +a \right )}{b^{3}}+\frac {3 d \,\operatorname {erfi}\left (b x +a \right ) a^{2} c^{2}}{2 b}+\frac {3 d^{2} \operatorname {erfi}\left (b x +a \right ) a^{2} c \left (b x +a \right )}{b^{2}}+\frac {3 d^{3} \operatorname {erfi}\left (b x +a \right ) a^{2} \left (b x +a \right )^{2}}{2 b^{3}}-\operatorname {erfi}\left (b x +a \right ) a \,c^{3}-\frac {3 d \,\operatorname {erfi}\left (b x +a \right ) a \,c^{2} \left (b x +a \right )}{b}-\frac {3 d^{2} \operatorname {erfi}\left (b x +a \right ) a c \left (b x +a \right )^{2}}{b^{2}}-\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) a \left (b x +a \right )^{3}}{b^{3}}+\frac {b \,\operatorname {erfi}\left (b x +a \right ) c^{4}}{4 d}+\operatorname {erfi}\left (b x +a \right ) c^{3} \left (b x +a \right )+\frac {3 d \,\operatorname {erfi}\left (b x +a \right ) c^{2} \left (b x +a \right )^{2}}{2 b}+\frac {d^{2} \operatorname {erfi}\left (b x +a \right ) c \left (b x +a \right )^{3}}{b^{2}}+\frac {d^{3} \operatorname {erfi}\left (b x +a \right ) \left (b x +a \right )^{4}}{4 b^{3}}-\frac {\frac {a^{4} d^{4} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{2}+\frac {b^{4} c^{4} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{2}+d^{4} \left (\frac {{\mathrm e}^{\left (b x +a \right )^{2}} \left (b x +a \right )^{3}}{2}-\frac {3 \left (b x +a \right ) {\mathrm e}^{\left (b x +a \right )^{2}}}{4}+\frac {3 \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )}{8}\right )-4 a \,d^{4} \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 )+6 a^{2} d^{4} \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 )-2 a^{3} d^{4} {\mathrm e}^{\left (b x +a \right )^{2}}-2 a \,b^{3} c^{3} d \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )+3 a^{2} b^{2} c^{2} d^{2} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )-2 a^{3} b c \,d^{3} \sqrt {\pi }\, \operatorname {erfi}\left (b x +a \right )+4 b c \,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 )+6 b^{2} c^{2} d^{2} \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 )+2 b^{3} c^{3} d \,{\mathrm e}^{\left (b x +a \right )^{2}}-12 a b c \,d^{3} \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 )-6 a \,b^{2} c^{2} d^{2} {\mathrm e}^{\left (b x +a \right )^{2}}+6 a^{2} b c \,d^{3} {\mathrm e}^{\left (b x +a \right )^{2}}}{2 b^{3} d \sqrt {\pi }}}{b}\) \(703\)
parts \(\frac {\operatorname {erfi}\left (b x +a \right ) d^{3} x^{4}}{4}+\operatorname {erfi}\left (b x +a \right ) d^{2} c \,x^{3}+\frac {3 \,\operatorname {erfi}\left (b x +a \right ) d \,c^{2} x^{2}}{2}+\operatorname {erfi}\left (b x +a \right ) c^{3} x +\frac {\operatorname {erfi}\left (b x +a \right ) c^{4}}{4 d}-\frac {b \left (-\frac {i {\mathrm e}^{a^{2}} c^{4} \sqrt {\pi }\, {\mathrm e}^{-a^{2}} \operatorname {erf}\left (i b x +i a \right )}{2 b}+{\mathrm e}^{a^{2}} d^{4} \left (\frac {x^{3} {\mathrm e}^{b^{2} x^{2}+2 b x a}}{2 b^{2}}-\frac {a \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 {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 )}{b}-\frac {\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}}}{b^{2}}\right )}{b}-\frac {3 \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 b^{2}}\right )+4 \,{\mathrm e}^{a^{2}} c \,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 {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 )}{b}-\frac {\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}}}{b^{2}}\right )+6 \,{\mathrm e}^{a^{2}} c^{2} 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 {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 )+4 \,{\mathrm e}^{a^{2}} c^{3} d \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 )}{2 d \sqrt {\pi }}\) \(796\)

Input:

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

Output:

1/16*(-24*Pi^(1/2)*erfi(b*x+a)*a*b*c*d^2+16*x*exp((b*x+a)^2)*a*b^2*c*d^2+1 
6*d^2*c*erfi(b*x+a)*x^3*Pi^(1/2)*b^4+24*c^2*d*erfi(b*x+a)*x^2*Pi^(1/2)*b^4 
+16*Pi^(1/2)*erfi(b*x+a)*a^3*b*c*d^2-24*Pi^(1/2)*erfi(b*x+a)*a^2*b^2*c^2*d 
-16*exp((b*x+a)^2)*b^3*c^3-10*exp((b*x+a)^2)*a*d^3-3*Pi^(1/2)*erfi(b*x+a)* 
d^3-4*x*exp((b*x+a)^2)*a^2*b*d^3-24*x*exp((b*x+a)^2)*b^3*c^2*d+4*x^2*exp(( 
b*x+a)^2)*a*b^2*d^3-16*x^2*exp((b*x+a)^2)*b^3*c*d^2-16*exp((b*x+a)^2)*a^2* 
b*c*d^2+24*exp((b*x+a)^2)*a*b^2*c^2*d+4*d^3*erfi(b*x+a)*x^4*Pi^(1/2)*b^4+1 
6*x*erfi(b*x+a)*c^3*Pi^(1/2)*b^4+16*Pi^(1/2)*erfi(b*x+a)*a*b^3*c^3+12*Pi^( 
1/2)*erfi(b*x+a)*b^2*c^2*d+4*exp((b*x+a)^2)*a^3*d^3-4*d^3*exp((b*x+a)^2)*x 
^3*b^3+6*x*exp((b*x+a)^2)*b*d^3+16*exp((b*x+a)^2)*b*c*d^2-4*Pi^(1/2)*erfi( 
b*x+a)*a^4*d^3+12*Pi^(1/2)*erfi(b*x+a)*a^2*d^3)/Pi^(1/2)/b^4
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.94 \[ \int (c+d x)^3 \text {erfi}(a+b x) \, dx=-\frac {2 \, \sqrt {\pi } {\left (2 \, b^{3} d^{3} x^{3} + 8 \, b^{3} c^{3} - 12 \, a b^{2} c^{2} d + 8 \, {\left (a^{2} - 1\right )} b c d^{2} - {\left (2 \, a^{3} - 5 \, a\right )} d^{3} + 2 \, {\left (4 \, b^{3} c d^{2} - a b^{2} d^{3}\right )} x^{2} + {\left (12 \, b^{3} c^{2} d - 8 \, a b^{2} c d^{2} + {\left (2 \, a^{2} - 3\right )} b d^{3}\right )} x\right )} e^{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} - {\left (4 \, \pi b^{4} d^{3} x^{4} + 16 \, \pi b^{4} c d^{2} x^{3} + 24 \, \pi b^{4} c^{2} d x^{2} + 16 \, \pi b^{4} c^{3} x + \pi {\left (16 \, a b^{3} c^{3} - 12 \, {\left (2 \, a^{2} - 1\right )} b^{2} c^{2} d + 8 \, {\left (2 \, a^{3} - 3 \, a\right )} b c d^{2} - {\left (4 \, a^{4} - 12 \, a^{2} + 3\right )} d^{3}\right )}\right )} \operatorname {erfi}\left (b x + a\right )}{16 \, \pi b^{4}} \] Input:

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

Output:

-1/16*(2*sqrt(pi)*(2*b^3*d^3*x^3 + 8*b^3*c^3 - 12*a*b^2*c^2*d + 8*(a^2 - 1 
)*b*c*d^2 - (2*a^3 - 5*a)*d^3 + 2*(4*b^3*c*d^2 - a*b^2*d^3)*x^2 + (12*b^3* 
c^2*d - 8*a*b^2*c*d^2 + (2*a^2 - 3)*b*d^3)*x)*e^(b^2*x^2 + 2*a*b*x + a^2) 
- (4*pi*b^4*d^3*x^4 + 16*pi*b^4*c*d^2*x^3 + 24*pi*b^4*c^2*d*x^2 + 16*pi*b^ 
4*c^3*x + pi*(16*a*b^3*c^3 - 12*(2*a^2 - 1)*b^2*c^2*d + 8*(2*a^3 - 3*a)*b* 
c*d^2 - (4*a^4 - 12*a^2 + 3)*d^3))*erfi(b*x + a))/(pi*b^4)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 746 vs. \(2 (258) = 516\).

Time = 1.88 (sec) , antiderivative size = 746, normalized size of antiderivative = 2.67 \[ \int (c+d x)^3 \text {erfi}(a+b x) \, dx =\text {Too large to display} \] Input:

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

Output:

Piecewise((-a**4*d**3*erfi(a + b*x)/(4*b**4) + a**3*c*d**2*erfi(a + b*x)/b 
**3 + a**3*d**3*exp(a**2)*exp(b**2*x**2)*exp(2*a*b*x)/(4*sqrt(pi)*b**4) - 
3*a**2*c**2*d*erfi(a + b*x)/(2*b**2) - a**2*c*d**2*exp(a**2)*exp(b**2*x**2 
)*exp(2*a*b*x)/(sqrt(pi)*b**3) - a**2*d**3*x*exp(a**2)*exp(b**2*x**2)*exp( 
2*a*b*x)/(4*sqrt(pi)*b**3) + 3*a**2*d**3*erfi(a + b*x)/(4*b**4) + a*c**3*e 
rfi(a + b*x)/b + 3*a*c**2*d*exp(a**2)*exp(b**2*x**2)*exp(2*a*b*x)/(2*sqrt( 
pi)*b**2) + a*c*d**2*x*exp(a**2)*exp(b**2*x**2)*exp(2*a*b*x)/(sqrt(pi)*b** 
2) + a*d**3*x**2*exp(a**2)*exp(b**2*x**2)*exp(2*a*b*x)/(4*sqrt(pi)*b**2) - 
 3*a*c*d**2*erfi(a + b*x)/(2*b**3) - 5*a*d**3*exp(a**2)*exp(b**2*x**2)*exp 
(2*a*b*x)/(8*sqrt(pi)*b**4) + c**3*x*erfi(a + b*x) + 3*c**2*d*x**2*erfi(a 
+ b*x)/2 + c*d**2*x**3*erfi(a + b*x) + d**3*x**4*erfi(a + b*x)/4 - c**3*ex 
p(a**2)*exp(b**2*x**2)*exp(2*a*b*x)/(sqrt(pi)*b) - 3*c**2*d*x*exp(a**2)*ex 
p(b**2*x**2)*exp(2*a*b*x)/(2*sqrt(pi)*b) - c*d**2*x**2*exp(a**2)*exp(b**2* 
x**2)*exp(2*a*b*x)/(sqrt(pi)*b) - d**3*x**3*exp(a**2)*exp(b**2*x**2)*exp(2 
*a*b*x)/(4*sqrt(pi)*b) + 3*c**2*d*erfi(a + b*x)/(4*b**2) + c*d**2*exp(a**2 
)*exp(b**2*x**2)*exp(2*a*b*x)/(sqrt(pi)*b**3) + 3*d**3*x*exp(a**2)*exp(b** 
2*x**2)*exp(2*a*b*x)/(8*sqrt(pi)*b**3) - 3*d**3*erfi(a + b*x)/(16*b**4), N 
e(b, 0)), ((c**3*x + 3*c**2*d*x**2/2 + c*d**2*x**3 + d**3*x**4/4)*erfi(a), 
 True))
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 4.21 (sec) , antiderivative size = 357, normalized size of antiderivative = 1.28 \[ \int (c+d x)^3 \text {erfi}(a+b x) \, dx=\mathrm {erfi}\left (a+b\,x\right )\,\left (c^3\,x+\frac {3\,c^2\,d\,x^2}{2}+c\,d^2\,x^3+\frac {d^3\,x^4}{4}\right )-\frac {\frac {{\mathrm {e}}^{a^2+2\,a\,b\,x+b^2\,x^2}\,\left (-2\,a^3\,d^3+8\,a^2\,b\,c\,d^2-12\,a\,b^2\,c^2\,d+5\,a\,d^3+8\,b^3\,c^3-8\,b\,c\,d^2\right )}{4\,b^4}+\frac {d^3\,x^3\,{\mathrm {e}}^{a^2+2\,a\,b\,x+b^2\,x^2}}{2\,b}-\frac {x^2\,{\mathrm {e}}^{a^2+2\,a\,b\,x+b^2\,x^2}\,\left (a\,d^3-4\,b\,c\,d^2\right )}{2\,b^2}-\frac {x\,{\mathrm {e}}^{a^2+2\,a\,b\,x+b^2\,x^2}\,\left (b^2\,\left (12\,c^2\,d-72\,a^2\,c^2\,d\right )+b\,\left (48\,a^3\,c\,d^2-8\,a\,c\,d^2\right )-3\,d^3+20\,a^2\,d^3-12\,a^4\,d^3\right )}{b^3\,\left (24\,a^2-4\right )}}{2\,\sqrt {\pi }}-\frac {\mathrm {erfi}\left (a+b\,x\right )\,\left (4\,a^4\,d^3-16\,a^3\,b\,c\,d^2+24\,a^2\,b^2\,c^2\,d-12\,a^2\,d^3-16\,a\,b^3\,c^3+24\,a\,b\,c\,d^2-12\,b^2\,c^2\,d+3\,d^3\right )}{16\,b^4} \] Input:

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

Output:

erfi(a + b*x)*(c^3*x + (d^3*x^4)/4 + (3*c^2*d*x^2)/2 + c*d^2*x^3) - ((exp( 
a^2 + b^2*x^2 + 2*a*b*x)*(5*a*d^3 - 2*a^3*d^3 + 8*b^3*c^3 - 8*b*c*d^2 - 12 
*a*b^2*c^2*d + 8*a^2*b*c*d^2))/(4*b^4) + (d^3*x^3*exp(a^2 + b^2*x^2 + 2*a* 
b*x))/(2*b) - (x^2*exp(a^2 + b^2*x^2 + 2*a*b*x)*(a*d^3 - 4*b*c*d^2))/(2*b^ 
2) - (x*exp(a^2 + b^2*x^2 + 2*a*b*x)*(b^2*(12*c^2*d - 72*a^2*c^2*d) + b*(4 
8*a^3*c*d^2 - 8*a*c*d^2) - 3*d^3 + 20*a^2*d^3 - 12*a^4*d^3))/(b^3*(24*a^2 
- 4)))/(2*pi^(1/2)) - (erfi(a + b*x)*(3*d^3 - 12*a^2*d^3 + 4*a^4*d^3 - 16* 
a*b^3*c^3 - 12*b^2*c^2*d + 24*a^2*b^2*c^2*d + 24*a*b*c*d^2 - 16*a^3*b*c*d^ 
2))/(16*b^4)
 

Reduce [F]

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

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

Output:

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