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]
________________________________________________________________________________________
Rubi [A] time = 0.429495, 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, Rules used = {2263, 2184, 2190, 2279, 2391} \[ \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]
[Out]
Rule 2263
Rule 2184
Rule 2190
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \frac{x}{a+b e^x+c e^{2 x}} \, dx &=\frac{(2 c) \int \frac{x}{b-\sqrt{b^2-4 a c}+2 c e^x} \, dx}{\sqrt{b^2-4 a c}}-\frac{(2 c) \int \frac{x}{b+\sqrt{b^2-4 a c}+2 c e^x} \, dx}{\sqrt{b^2-4 a c}}\\ &=-\frac{c x^2}{b^2-4 a c-b \sqrt{b^2-4 a c}}-\frac{c x^2}{b^2-4 a c+b \sqrt{b^2-4 a c}}+\frac{\left (4 c^2\right ) \int \frac{e^x x}{b-\sqrt{b^2-4 a c}+2 c e^x} \, dx}{b^2-4 a c-b \sqrt{b^2-4 a c}}+\frac{\left (4 c^2\right ) \int \frac{e^x x}{b+\sqrt{b^2-4 a c}+2 c e^x} \, dx}{b^2-4 a c+b \sqrt{b^2-4 a c}}\\ &=-\frac{c x^2}{b^2-4 a c-b \sqrt{b^2-4 a c}}-\frac{c x^2}{b^2-4 a c+b \sqrt{b^2-4 a c}}+\frac{2 c x \log \left (1+\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt{b^2-4 a c}}+\frac{2 c x \log \left (1+\frac{2 c e^x}{b+\sqrt{b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt{b^2-4 a c}}-\frac{(2 c) \int \log \left (1+\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}\right ) \, dx}{b^2-4 a c-b \sqrt{b^2-4 a c}}-\frac{(2 c) \int \log \left (1+\frac{2 c e^x}{b+\sqrt{b^2-4 a c}}\right ) \, dx}{b^2-4 a c+b \sqrt{b^2-4 a c}}\\ &=-\frac{c x^2}{b^2-4 a c-b \sqrt{b^2-4 a c}}-\frac{c x^2}{b^2-4 a c+b \sqrt{b^2-4 a c}}+\frac{2 c x \log \left (1+\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt{b^2-4 a c}}+\frac{2 c x \log \left (1+\frac{2 c e^x}{b+\sqrt{b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt{b^2-4 a c}}-\frac{(2 c) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{x} \, dx,x,e^x\right )}{b^2-4 a c-b \sqrt{b^2-4 a c}}-\frac{(2 c) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{x} \, dx,x,e^x\right )}{b^2-4 a c+b \sqrt{b^2-4 a c}}\\ &=-\frac{c x^2}{b^2-4 a c-b \sqrt{b^2-4 a c}}-\frac{c x^2}{b^2-4 a c+b \sqrt{b^2-4 a c}}+\frac{2 c x \log \left (1+\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt{b^2-4 a c}}+\frac{2 c x \log \left (1+\frac{2 c e^x}{b+\sqrt{b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt{b^2-4 a c}}+\frac{2 c \text{Li}_2\left (-\frac{2 c e^x}{b-\sqrt{b^2-4 a c}}\right )}{b^2-4 a c-b \sqrt{b^2-4 a c}}+\frac{2 c \text{Li}_2\left (-\frac{2 c e^x}{b+\sqrt{b^2-4 a c}}\right )}{b^2-4 a c+b \sqrt{b^2-4 a c}}\\ \end{align*}
Mathematica [A] time = 0.209777, 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]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 378, normalized size = 1.4 \begin{align*}{\frac{{x}^{2}}{2\,a}}-{\frac{x}{2\,a}\ln \left ({ \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 ({ \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 ({ \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 ({ \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 ({ \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 ({ \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 ({ \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 ({ \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}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.52882, size = 649, normalized size = 2.35 \begin{align*} \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{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} e^{x} + b e^{x} + 2 \, a}{2 \, a} + 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{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} e^{x} - b e^{x} - 2 \, a}{2 \, a} + 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{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} e^{x} + b e^{x} + 2 \, a}{2 \, a}\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{a \sqrt{\frac{b^{2} - 4 \, a c}{a^{2}}} e^{x} - b e^{x} - 2 \, a}{2 \, a}\right )}{2 \,{\left (a b^{2} - 4 \, a^{2} c\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x}{a + b e^{x} + c e^{2 x}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x}{c e^{\left (2 \, x\right )} + b e^{x} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]