Optimal. Leaf size=67 \[ \frac{b \tanh ^{-1}\left (\frac{b+2 c e^x}{\sqrt{b^2-4 a c}}\right )}{a \sqrt{b^2-4 a c}}-\frac{\log \left (a+b e^x+c e^{2 x}\right )}{2 a}+\frac{x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0646843, antiderivative size = 67, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.438, Rules used = {2282, 705, 29, 634, 618, 206, 628} \[ \frac{b \tanh ^{-1}\left (\frac{b+2 c e^x}{\sqrt{b^2-4 a c}}\right )}{a \sqrt{b^2-4 a c}}-\frac{\log \left (a+b e^x+c e^{2 x}\right )}{2 a}+\frac{x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 705
Rule 29
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{a+b e^x+c e^{2 x}} \, dx &=\operatorname{Subst}\left (\int \frac{1}{x \left (a+b x+c x^2\right )} \, dx,x,e^x\right )\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,e^x\right )}{a}+\frac{\operatorname{Subst}\left (\int \frac{-b-c x}{a+b x+c x^2} \, dx,x,e^x\right )}{a}\\ &=\frac{x}{a}-\frac{\operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,e^x\right )}{2 a}-\frac{b \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,e^x\right )}{2 a}\\ &=\frac{x}{a}-\frac{\log \left (a+b e^x+c e^{2 x}\right )}{2 a}+\frac{b \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c e^x\right )}{a}\\ &=\frac{x}{a}+\frac{b \tanh ^{-1}\left (\frac{b+2 c e^x}{\sqrt{b^2-4 a c}}\right )}{a \sqrt{b^2-4 a c}}-\frac{\log \left (a+b e^x+c e^{2 x}\right )}{2 a}\\ \end{align*}
Mathematica [A] time = 0.107642, size = 66, normalized size = 0.99 \[ -\frac{\frac{2 b \tan ^{-1}\left (\frac{b+2 c e^x}{\sqrt{4 a c-b^2}}\right )}{\sqrt{4 a c-b^2}}+\log \left (a+e^x \left (b+c e^x\right )\right )-2 x}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.008, size = 66, normalized size = 1. \begin{align*}{\frac{\ln \left ({{\rm e}^{x}} \right ) }{a}}-{\frac{\ln \left ( a+b{{\rm e}^{x}}+c \left ({{\rm e}^{x}} \right ) ^{2} \right ) }{2\,a}}-{\frac{b}{a}\arctan \left ({(b+2\,c{{\rm e}^{x}}){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \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.53573, size = 518, normalized size = 7.73 \begin{align*} \left [\frac{\sqrt{b^{2} - 4 \, a c} b \log \left (\frac{2 \, c^{2} e^{\left (2 \, x\right )} + 2 \, b c e^{x} + b^{2} - 2 \, a c + \sqrt{b^{2} - 4 \, a c}{\left (2 \, c e^{x} + b\right )}}{c e^{\left (2 \, x\right )} + b e^{x} + a}\right ) + 2 \,{\left (b^{2} - 4 \, a c\right )} x -{\left (b^{2} - 4 \, a c\right )} \log \left (c e^{\left (2 \, x\right )} + b e^{x} + a\right )}{2 \,{\left (a b^{2} - 4 \, a^{2} c\right )}}, \frac{2 \, \sqrt{-b^{2} + 4 \, a c} b \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c e^{x} + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \,{\left (b^{2} - 4 \, a c\right )} x -{\left (b^{2} - 4 \, a c\right )} \log \left (c e^{\left (2 \, x\right )} + b e^{x} + a\right )}{2 \,{\left (a b^{2} - 4 \, a^{2} c\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.285306, size = 63, normalized size = 0.94 \begin{align*} \operatorname{RootSum}{\left (z^{2} \left (4 a^{2} c - a b^{2}\right ) + z \left (4 a c - b^{2}\right ) + c, \left ( i \mapsto i \log{\left (e^{x} + \frac{- 4 i a^{2} c + i a b^{2} - 2 a c + b^{2}}{b c} \right )} \right )\right )} + \frac{x}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21214, size = 85, normalized size = 1.27 \begin{align*} -\frac{b \arctan \left (\frac{2 \, c e^{x} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} a} + \frac{x}{a} - \frac{\log \left (c e^{\left (2 \, x\right )} + b e^{x} + a\right )}{2 \, a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]