3.514 \(\int \frac{x}{a+b e^x+c e^{2 x}} \, dx\)

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

[Out]

-((c*x^2)/(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])) - (c*x^2)/(b^2 - 4*a*c + b*Sqrt[b
^2 - 4*a*c]) + (2*c*x*Log[1 + (2*c*E^x)/(b - Sqrt[b^2 - 4*a*c])])/(b^2 - 4*a*c -
 b*Sqrt[b^2 - 4*a*c]) + (2*c*x*Log[1 + (2*c*E^x)/(b + Sqrt[b^2 - 4*a*c])])/(b^2
- 4*a*c + b*Sqrt[b^2 - 4*a*c]) + (2*c*PolyLog[2, (-2*c*E^x)/(b - Sqrt[b^2 - 4*a*
c])])/(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c]) + (2*c*PolyLog[2, (-2*c*E^x)/(b + Sqrt
[b^2 - 4*a*c])])/(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c])

_______________________________________________________________________________________

Rubi [A]  time = 0.707755, antiderivative size = 276, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.278 \[ \frac{2 c \text{PolyLog}\left (2,-\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}\right )}{-b \sqrt{b^2-4 a c}-4 a c+b^2}+\frac{2 c \text{PolyLog}\left (2,-\frac{2 c e^x}{\sqrt{b^2-4 a c}+b}\right )}{b \sqrt{b^2-4 a c}-4 a c+b^2}-\frac{c x^2}{-b \sqrt{b^2-4 a c}-4 a c+b^2}-\frac{c x^2}{b \sqrt{b^2-4 a c}-4 a c+b^2}+\frac{2 c x \log \left (\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}+1\right )}{-b \sqrt{b^2-4 a c}-4 a c+b^2}+\frac{2 c x \log \left (\frac{2 c e^x}{\sqrt{b^2-4 a c}+b}+1\right )}{b \sqrt{b^2-4 a c}-4 a c+b^2} \]

Antiderivative was successfully verified.

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

[Out]

-((c*x^2)/(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])) - (c*x^2)/(b^2 - 4*a*c + b*Sqrt[b
^2 - 4*a*c]) + (2*c*x*Log[1 + (2*c*E^x)/(b - Sqrt[b^2 - 4*a*c])])/(b^2 - 4*a*c -
 b*Sqrt[b^2 - 4*a*c]) + (2*c*x*Log[1 + (2*c*E^x)/(b + Sqrt[b^2 - 4*a*c])])/(b^2
- 4*a*c + b*Sqrt[b^2 - 4*a*c]) + (2*c*PolyLog[2, (-2*c*E^x)/(b - Sqrt[b^2 - 4*a*
c])])/(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c]) + (2*c*PolyLog[2, (-2*c*E^x)/(b + Sqrt
[b^2 - 4*a*c])])/(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 34.0434, size = 199, normalized size = 0.72 \[ \frac{2 c x \log{\left (1 + \frac{\left (b + \sqrt{- 4 a c + b^{2}}\right ) e^{- x}}{2 c} \right )}}{- 4 a c + b^{2} + b \sqrt{- 4 a c + b^{2}}} + \frac{2 c x \log{\left (1 + \frac{\left (b - \sqrt{- 4 a c + b^{2}}\right ) e^{- x}}{2 c} \right )}}{- 4 a c + b^{2} - b \sqrt{- 4 a c + b^{2}}} - \frac{2 c \operatorname{Li}_{2}\left (- \frac{\left (b + \sqrt{- 4 a c + b^{2}}\right ) e^{- x}}{2 c}\right )}{- 4 a c + b^{2} + b \sqrt{- 4 a c + b^{2}}} - \frac{2 c \operatorname{Li}_{2}\left (- \frac{\left (b - \sqrt{- 4 a c + b^{2}}\right ) e^{- x}}{2 c}\right )}{- 4 a c + b^{2} - b \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x/(a+b*exp(x)+c*exp(2*x)),x)

[Out]

2*c*x*log(1 + (b + sqrt(-4*a*c + b**2))*exp(-x)/(2*c))/(-4*a*c + b**2 + b*sqrt(-
4*a*c + b**2)) + 2*c*x*log(1 + (b - sqrt(-4*a*c + b**2))*exp(-x)/(2*c))/(-4*a*c
+ b**2 - b*sqrt(-4*a*c + b**2)) - 2*c*polylog(2, -(b + sqrt(-4*a*c + b**2))*exp(
-x)/(2*c))/(-4*a*c + b**2 + b*sqrt(-4*a*c + b**2)) - 2*c*polylog(2, -(b - sqrt(-
4*a*c + b**2))*exp(-x)/(2*c))/(-4*a*c + b**2 - b*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.322502, size = 205, normalized size = 0.74 \[ \frac{-\left (\sqrt{b^2-4 a c}+b\right ) \text{PolyLog}\left (2,\frac{2 c e^x}{\sqrt{b^2-4 a c}-b}\right )+\left (b-\sqrt{b^2-4 a c}\right ) \text{PolyLog}\left (2,-\frac{2 c e^x}{\sqrt{b^2-4 a c}+b}\right )+x \left (x \sqrt{b^2-4 a c}-\left (\sqrt{b^2-4 a c}+b\right ) \log \left (\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}+1\right )+\left (b-\sqrt{b^2-4 a c}\right ) \log \left (\frac{2 c e^x}{\sqrt{b^2-4 a c}+b}+1\right )\right )}{2 a \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

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

[Out]

(x*(Sqrt[b^2 - 4*a*c]*x - (b + Sqrt[b^2 - 4*a*c])*Log[1 + (2*c*E^x)/(b - Sqrt[b^
2 - 4*a*c])] + (b - Sqrt[b^2 - 4*a*c])*Log[1 + (2*c*E^x)/(b + Sqrt[b^2 - 4*a*c])
]) - (b + Sqrt[b^2 - 4*a*c])*PolyLog[2, (2*c*E^x)/(-b + Sqrt[b^2 - 4*a*c])] + (b
 - Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*E^x)/(b + Sqrt[b^2 - 4*a*c])])/(2*a*Sqrt[
b^2 - 4*a*c])

_______________________________________________________________________________________

Maple [C]  time = 0.022, size = 378, normalized size = 1.4 \[{\frac{{x}^{2}}{2\,a}}-{\frac{x}{2\,a}\ln \left ({1 \left ( -2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }-{\frac{bx}{2\,a}\ln \left ({1 \left ( -2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}}-{\frac{x}{2\,a}\ln \left ({1 \left ( 2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }+{\frac{bx}{2\,a}\ln \left ({1 \left ( 2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}}-{\frac{1}{2\,a}{\it dilog} \left ({1 \left ( 2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }+{\frac{b}{2\,a}{\it dilog} \left ({1 \left ( 2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}}-{\frac{1}{2\,a}{\it dilog} \left ({1 \left ( -2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }-{\frac{b}{2\,a}{\it dilog} \left ({1 \left ( -2\,c{{\rm e}^{x}}+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x/(a+b*exp(x)+c*exp(2*x)),x)

[Out]

1/2*x^2/a-1/2/a*x*ln((-2*c*exp(x)+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))
-1/2/a*x/(-4*a*c+b^2)^(1/2)*ln((-2*c*exp(x)+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^
2)^(1/2)))*b-1/2/a*x*ln((2*c*exp(x)+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2))
)+1/2/a*x/(-4*a*c+b^2)^(1/2)*ln((2*c*exp(x)+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2
)^(1/2)))*b-1/2/a*dilog((2*c*exp(x)+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2))
)+1/2/a/(-4*a*c+b^2)^(1/2)*dilog((2*c*exp(x)+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^
2)^(1/2)))*b-1/2/a*dilog((-2*c*exp(x)+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/
2)))-1/2/a/(-4*a*c+b^2)^(1/2)*dilog((-2*c*exp(x)+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a
*c+b^2)^(1/2)))*b

_______________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(c*e^(2*x) + b*e^x + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.259536, size = 456, normalized size = 1.65 \[ \frac{{\left (b^{2} - 4 \, a c\right )} x^{2} +{\left (a b \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} - b^{2} + 4 \, a c\right )}{\rm Li}_2\left (-\frac{2 \, c e^{x} + a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} + b}{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} + b} + 1\right ) -{\left (a b \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} + b^{2} - 4 \, a c\right )}{\rm Li}_2\left (\frac{2 \, c e^{x} - a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} + b}{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} - b} + 1\right ) +{\left (a b x \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} -{\left (b^{2} - 4 \, a c\right )} x\right )} \log \left (\frac{2 \, c e^{x} + a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} + b}{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} + b}\right ) -{\left (a b x \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} +{\left (b^{2} - 4 \, a c\right )} x\right )} \log \left (-\frac{2 \, c e^{x} - a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} + b}{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} - b}\right )}{2 \,{\left (a b^{2} - 4 \, a^{2} c\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(c*e^(2*x) + b*e^x + a),x, algorithm="fricas")

[Out]

1/2*((b^2 - 4*a*c)*x^2 + (a*b*sqrt((b^2 - 4*a*c)/a^2) - b^2 + 4*a*c)*dilog(-(2*c
*e^x + a*sqrt((b^2 - 4*a*c)/a^2) + b)/(a*sqrt((b^2 - 4*a*c)/a^2) + b) + 1) - (a*
b*sqrt((b^2 - 4*a*c)/a^2) + b^2 - 4*a*c)*dilog((2*c*e^x - a*sqrt((b^2 - 4*a*c)/a
^2) + b)/(a*sqrt((b^2 - 4*a*c)/a^2) - b) + 1) + (a*b*x*sqrt((b^2 - 4*a*c)/a^2) -
 (b^2 - 4*a*c)*x)*log((2*c*e^x + a*sqrt((b^2 - 4*a*c)/a^2) + b)/(a*sqrt((b^2 - 4
*a*c)/a^2) + b)) - (a*b*x*sqrt((b^2 - 4*a*c)/a^2) + (b^2 - 4*a*c)*x)*log(-(2*c*e
^x - a*sqrt((b^2 - 4*a*c)/a^2) + b)/(a*sqrt((b^2 - 4*a*c)/a^2) - b)))/(a*b^2 - 4
*a^2*c)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x}{a + b e^{x} + c e^{2 x}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(a+b*exp(x)+c*exp(2*x)),x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x}{c e^{\left (2 \, x\right )} + b e^{x} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x/(c*e^(2*x) + b*e^x + a),x, algorithm="giac")

[Out]

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