3.5.40 \(\int e^{(a+b x) (c+d x)} x \, dx\) [440]

Optimal. Leaf size=107 \[ \frac {e^{a c+(b c+a d) x+b d x^2}}{2 b d}-\frac {(b c+a d) e^{-\frac {(b c-a d)^2}{4 b d}} \sqrt {\pi } \text {erfi}\left (\frac {b c+a d+2 b d x}{2 \sqrt {b} \sqrt {d}}\right )}{4 b^{3/2} d^{3/2}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2276, 2272, 2266, 2235} \begin {gather*} \frac {e^{x (a d+b c)+a c+b d x^2}}{2 b d}-\frac {\sqrt {\pi } (a d+b c) e^{-\frac {(b c-a d)^2}{4 b d}} \text {Erfi}\left (\frac {a d+b c+2 b d x}{2 \sqrt {b} \sqrt {d}}\right )}{4 b^{3/2} d^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2266

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2272

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[e*(F^(a + b*x + c*x^2)/(2
*c*Log[F])), x] - Dist[(b*e - 2*c*d)/(2*c), Int[F^(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e}, x] &&
 NeQ[b*e - 2*c*d, 0]

Rule 2276

Int[(F_)^(v_)*(u_)^(m_.), x_Symbol] :> Int[ExpandToSum[u, x]^m*F^ExpandToSum[v, x], x] /; FreeQ[{F, m}, x] &&
LinearQ[u, x] && QuadraticQ[v, x] &&  !(LinearMatchQ[u, x] && QuadraticMatchQ[v, x])

Rubi steps

\begin {align*} \int e^{(a+b x) (c+d x)} x \, dx &=\int e^{a c+(b c+a d) x+b d x^2} x \, dx\\ &=\frac {e^{a c+(b c+a d) x+b d x^2}}{2 b d}-\frac {(b c+a d) \int e^{a c+(b c+a d) x+b d x^2} \, dx}{2 b d}\\ &=\frac {e^{a c+(b c+a d) x+b d x^2}}{2 b d}-\frac {\left ((b c+a d) e^{-\frac {(b c-a d)^2}{4 b d}}\right ) \int e^{\frac {(b c+a d+2 b d x)^2}{4 b d}} \, dx}{2 b d}\\ &=\frac {e^{a c+(b c+a d) x+b d x^2}}{2 b d}-\frac {(b c+a d) e^{-\frac {(b c-a d)^2}{4 b d}} \sqrt {\pi } \text {erfi}\left (\frac {b c+a d+2 b d x}{2 \sqrt {b} \sqrt {d}}\right )}{4 b^{3/2} d^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.16, size = 116, normalized size = 1.08 \begin {gather*} \frac {e^{-\frac {(b c-a d)^2}{4 b d}} \left (2 \sqrt {b} \sqrt {d} e^{\frac {(a d+b (c+2 d x))^2}{4 b d}}-(b c+a d) \sqrt {\pi } \text {erfi}\left (\frac {a d+b (c+2 d x)}{2 \sqrt {b} \sqrt {d}}\right )\right )}{4 b^{3/2} d^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 102, normalized size = 0.95

method result size
default \(\frac {{\mathrm e}^{c a +\left (a d +c b \right ) x +b d \,x^{2}}}{2 b d}+\frac {\left (a d +c b \right ) \sqrt {\pi }\, {\mathrm e}^{c a -\frac {\left (a d +c b \right )^{2}}{4 b d}} \erf \left (-\sqrt {-b d}\, x +\frac {a d +c b}{2 \sqrt {-b d}}\right )}{4 b d \sqrt {-b d}}\) \(102\)
risch \(\frac {{\mathrm e}^{\left (b x +a \right ) \left (d x +c \right )}}{2 b d}+\frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {\left (a d -c b \right )^{2}}{4 b d}} \erf \left (-\sqrt {-b d}\, x +\frac {a d +c b}{2 \sqrt {-b d}}\right ) a}{4 b \sqrt {-b d}}+\frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {\left (a d -c b \right )^{2}}{4 b d}} \erf \left (-\sqrt {-b d}\, x +\frac {a d +c b}{2 \sqrt {-b d}}\right ) c}{4 d \sqrt {-b d}}\) \(142\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.35, size = 143, normalized size = 1.34 \begin {gather*} -\frac {{\left (\frac {\sqrt {\pi } {\left (2 \, b d x + b c + a d\right )} {\left (b c + a d\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {-\frac {{\left (2 \, b d x + b c + a d\right )}^{2}}{b d}}\right ) - 1\right )}}{\left (b d\right )^{\frac {3}{2}} \sqrt {-\frac {{\left (2 \, b d x + b c + a d\right )}^{2}}{b d}}} - \frac {2 \, b d e^{\left (\frac {{\left (2 \, b d x + b c + a d\right )}^{2}}{4 \, b d}\right )}}{\left (b d\right )^{\frac {3}{2}}}\right )} e^{\left (a c - \frac {{\left (b c + a d\right )}^{2}}{4 \, b d}\right )}}{4 \, \sqrt {b d}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*(sqrt(pi)*(2*b*d*x + b*c + a*d)*(b*c + a*d)*(erf(1/2*sqrt(-(2*b*d*x + b*c + a*d)^2/(b*d))) - 1)/((b*d)^(3
/2)*sqrt(-(2*b*d*x + b*c + a*d)^2/(b*d))) - 2*b*d*e^(1/4*(2*b*d*x + b*c + a*d)^2/(b*d))/(b*d)^(3/2))*e^(a*c -
1/4*(b*c + a*d)^2/(b*d))/sqrt(b*d)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 107, normalized size = 1.00 \begin {gather*} \frac {\sqrt {\pi } {\left (b c + a d\right )} \sqrt {-b d} \operatorname {erf}\left (\frac {{\left (2 \, b d x + b c + a d\right )} \sqrt {-b d}}{2 \, b d}\right ) e^{\left (-\frac {b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}}{4 \, b d}\right )} + 2 \, b d e^{\left (b d x^{2} + a c + {\left (b c + a d\right )} x\right )}}{4 \, b^{2} d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp((b*x+a)*(d*x+c))*x,x, algorithm="fricas")

[Out]

1/4*(sqrt(pi)*(b*c + a*d)*sqrt(-b*d)*erf(1/2*(2*b*d*x + b*c + a*d)*sqrt(-b*d)/(b*d))*e^(-1/4*(b^2*c^2 - 2*a*b*
c*d + a^2*d^2)/(b*d)) + 2*b*d*e^(b*d*x^2 + a*c + (b*c + a*d)*x))/(b^2*d^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} e^{a c} \int x e^{a d x} e^{b c x} e^{b d x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(a*c)*Integral(x*exp(a*d*x)*exp(b*c*x)*exp(b*d*x**2), x)

________________________________________________________________________________________

Giac [A]
time = 2.62, size = 104, normalized size = 0.97 \begin {gather*} \frac {\frac {\sqrt {\pi } {\left (b c + a d\right )} \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {-b d} {\left (2 \, x + \frac {b c + a d}{b d}\right )}\right ) e^{\left (-\frac {b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}}{4 \, b d}\right )}}{\sqrt {-b d}} + 2 \, e^{\left (b d x^{2} + b c x + a d x + a c\right )}}{4 \, b d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(sqrt(pi)*(b*c + a*d)*erf(-1/2*sqrt(-b*d)*(2*x + (b*c + a*d)/(b*d)))*e^(-1/4*(b^2*c^2 - 2*a*b*c*d + a^2*d^
2)/(b*d))/sqrt(-b*d) + 2*e^(b*d*x^2 + b*c*x + a*d*x + a*c))/(b*d)

________________________________________________________________________________________

Mupad [B]
time = 3.67, size = 95, normalized size = 0.89 \begin {gather*} \frac {{\mathrm {e}}^{a\,c+a\,d\,x+b\,c\,x+b\,d\,x^2}}{2\,b\,d}-\frac {\sqrt {\pi }\,{\mathrm {e}}^{\frac {a\,c}{2}-\frac {a^2\,d}{4\,b}-\frac {b\,c^2}{4\,d}}\,\mathrm {erfi}\left (\frac {\frac {a\,d}{2}+\frac {b\,c}{2}+b\,d\,x}{\sqrt {b\,d}}\right )\,\left (a\,d+b\,c\right )}{4\,b\,d\,\sqrt {b\,d}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________