3.5.70 \(\int \frac {e^{d+e x} x}{a+b x+c x^2} \, dx\) [470]

Optimal. Leaf size=158 \[ \frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) e^{d-\frac {\left (b-\sqrt {b^2-4 a c}\right ) e}{2 c}} \text {Ei}\left (\frac {e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{2 c}\right )}{2 c}+\frac {\left (1+\frac {b}{\sqrt {b^2-4 a c}}\right ) e^{d-\frac {\left (b+\sqrt {b^2-4 a c}\right ) e}{2 c}} \text {Ei}\left (\frac {e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{2 c}\right )}{2 c} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.15, antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2302, 2209} \begin {gather*} \frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) e^{d-\frac {e \left (b-\sqrt {b^2-4 a c}\right )}{2 c}} \text {Ei}\left (\frac {e \left (b+2 c x-\sqrt {b^2-4 a c}\right )}{2 c}\right )}{2 c}+\frac {\left (\frac {b}{\sqrt {b^2-4 a c}}+1\right ) e^{d-\frac {e \left (\sqrt {b^2-4 a c}+b\right )}{2 c}} \text {Ei}\left (\frac {e \left (b+2 c x+\sqrt {b^2-4 a c}\right )}{2 c}\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((1 - b/Sqrt[b^2 - 4*a*c])*E^(d - ((b - Sqrt[b^2 - 4*a*c])*e)/(2*c))*ExpIntegralEi[(e*(b - Sqrt[b^2 - 4*a*c] +
 2*c*x))/(2*c)])/(2*c) + ((1 + b/Sqrt[b^2 - 4*a*c])*E^(d - ((b + Sqrt[b^2 - 4*a*c])*e)/(2*c))*ExpIntegralEi[(e
*(b + Sqrt[b^2 - 4*a*c] + 2*c*x))/(2*c)])/(2*c)

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2302

Int[((F_)^((g_.)*((d_.) + (e_.)*(x_))^(n_.))*(u_)^(m_.))/((a_.) + (b_.)*(x_) + (c_)*(x_)^2), x_Symbol] :> Int[
ExpandIntegrand[F^(g*(d + e*x)^n), u^m/(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e, g, n}, x] && Poly
nomialQ[u, x] && IntegerQ[m]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.17, size = 153, normalized size = 0.97 \begin {gather*} \frac {e^{d-\frac {\left (b+\sqrt {b^2-4 a c}\right ) e}{2 c}} \left (\left (-b+\sqrt {b^2-4 a c}\right ) e^{\frac {\sqrt {b^2-4 a c} e}{c}} \text {Ei}\left (\frac {e \left (b-\sqrt {b^2-4 a c}+2 c x\right )}{2 c}\right )+\left (b+\sqrt {b^2-4 a c}\right ) \text {Ei}\left (\frac {e \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{2 c}\right )\right )}{2 c \sqrt {b^2-4 a c}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(684\) vs. \(2(132)=264\).
time = 0.10, size = 685, normalized size = 4.34

method result size
risch \(-\frac {e \,{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) b}{2 c \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}+\frac {e \,{\mathrm e}^{-\frac {b e -2 c d -\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) b}{2 c \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}-\frac {{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right )}{2 c}-\frac {{\mathrm e}^{-\frac {b e -2 c d -\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right )}{2 c}\) \(350\)
derivativedivides \(\frac {-\frac {e^{2} \left (-{\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) b e +2 \,{\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) c d +{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) b e -2 \,{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) c d +{\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}+{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}\right )}{2 c \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}+\frac {d \,e^{2} \left ({\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right )-{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right )\right )}{\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}}{e^{2}}\) \(685\)
default \(\frac {-\frac {e^{2} \left (-{\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) b e +2 \,{\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) c d +{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) b e -2 \,{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) c d +{\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}+{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right ) \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}\right )}{2 c \sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}+\frac {d \,e^{2} \left ({\mathrm e}^{\frac {-b e +2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, \frac {-b e +2 c d -2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right )-{\mathrm e}^{-\frac {b e -2 c d +\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}} \expIntegral \left (1, -\frac {b e -2 c d +2 c \left (e x +d \right )+\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}{2 c}\right )\right )}{\sqrt {-4 a c \,e^{2}+b^{2} e^{2}}}}{e^{2}}\) \(685\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(e*x+d)*x/(c*x^2+b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/e^2*(-1/2*e^2*(-exp(1/2/c*(-b*e+2*c*d+(-4*a*c*e^2+b^2*e^2)^(1/2)))*Ei(1,1/2*(-b*e+2*c*d-2*c*(e*x+d)+(-4*a*c*
e^2+b^2*e^2)^(1/2))/c)*b*e+2*exp(1/2/c*(-b*e+2*c*d+(-4*a*c*e^2+b^2*e^2)^(1/2)))*Ei(1,1/2*(-b*e+2*c*d-2*c*(e*x+
d)+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*c*d+exp(-1/2*(b*e-2*c*d+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*Ei(1,-1/2*(b*e-2*c*d+
2*c*(e*x+d)+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*b*e-2*exp(-1/2*(b*e-2*c*d+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*Ei(1,-1/2*
(b*e-2*c*d+2*c*(e*x+d)+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*c*d+exp(1/2/c*(-b*e+2*c*d+(-4*a*c*e^2+b^2*e^2)^(1/2)))*E
i(1,1/2*(-b*e+2*c*d-2*c*(e*x+d)+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*(-4*a*c*e^2+b^2*e^2)^(1/2)+exp(-1/2*(b*e-2*c*d+
(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*Ei(1,-1/2*(b*e-2*c*d+2*c*(e*x+d)+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*(-4*a*c*e^2+b^2
*e^2)^(1/2))/c/(-4*a*c*e^2+b^2*e^2)^(1/2)+d*e^2*(exp(1/2/c*(-b*e+2*c*d+(-4*a*c*e^2+b^2*e^2)^(1/2)))*Ei(1,1/2*(
-b*e+2*c*d-2*c*(e*x+d)+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)-exp(-1/2*(b*e-2*c*d+(-4*a*c*e^2+b^2*e^2)^(1/2))/c)*Ei(1,
-1/2*(b*e-2*c*d+2*c*(e*x+d)+(-4*a*c*e^2+b^2*e^2)^(1/2))/c))/(-4*a*c*e^2+b^2*e^2)^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x*e^(e*x + d)/(c*e*x^2 + b*e*x + a*e) + integrate((c*x^2*e^d - a*e^d)*e^(e*x)/(c^2*e*x^4 + 2*b*c*e*x^3 + 2*a*b
*e*x + a^2*e + (b^2*e + 2*a*c*e)*x^2), x)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 221, normalized size = 1.40 \begin {gather*} -\frac {{\left ({\left (b c \sqrt {\frac {b^{2} - 4 \, a c}{c^{2}}} e - {\left (b^{2} - 4 \, a c\right )} e\right )} {\rm Ei}\left (-\frac {c \sqrt {\frac {b^{2} - 4 \, a c}{c^{2}}} e - {\left (2 \, c x + b\right )} e}{2 \, c}\right ) e^{\left (\frac {c \sqrt {\frac {b^{2} - 4 \, a c}{c^{2}}} e + 2 \, c d - b e}{2 \, c}\right )} - {\left (b c \sqrt {\frac {b^{2} - 4 \, a c}{c^{2}}} e + {\left (b^{2} - 4 \, a c\right )} e\right )} {\rm Ei}\left (\frac {c \sqrt {\frac {b^{2} - 4 \, a c}{c^{2}}} e + {\left (2 \, c x + b\right )} e}{2 \, c}\right ) e^{\left (-\frac {c \sqrt {\frac {b^{2} - 4 \, a c}{c^{2}}} e - 2 \, c d + b e}{2 \, c}\right )}\right )} e^{\left (-1\right )}}{2 \, {\left (b^{2} c - 4 \, a c^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*((b*c*sqrt((b^2 - 4*a*c)/c^2)*e - (b^2 - 4*a*c)*e)*Ei(-1/2*(c*sqrt((b^2 - 4*a*c)/c^2)*e - (2*c*x + b)*e)/
c)*e^(1/2*(c*sqrt((b^2 - 4*a*c)/c^2)*e + 2*c*d - b*e)/c) - (b*c*sqrt((b^2 - 4*a*c)/c^2)*e + (b^2 - 4*a*c)*e)*E
i(1/2*(c*sqrt((b^2 - 4*a*c)/c^2)*e + (2*c*x + b)*e)/c)*e^(-1/2*(c*sqrt((b^2 - 4*a*c)/c^2)*e - 2*c*d + b*e)/c))
*e^(-1)/(b^2*c - 4*a*c^2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(x*e^(x*e + d)/(c*x^2 + b*x + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,{\mathrm {e}}^{d+e\,x}}{c\,x^2+b\,x+a} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*exp(d + e*x))/(a + b*x + c*x^2),x)

[Out]

int((x*exp(d + e*x))/(a + b*x + c*x^2), x)

________________________________________________________________________________________