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.06, antiderivative size = 67, normalized size of antiderivative = 1.00, 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 29
Rule 206
Rule 618
Rule 628
Rule 634
Rule 705
Rule 2282
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.11, 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]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 219, normalized size = 3.27 \[ \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 ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.34, size = 63, normalized size = 0.94 \[ -\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 66, normalized size = 0.99 \[ -\frac {b \arctan \left (\frac {2 c \,{\mathrm e}^{x}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a}-\frac {\ln \left (b \,{\mathrm e}^{x}+c \,{\mathrm e}^{2 x}+a \right )}{2 a}+\frac {\ln \left ({\mathrm e}^{x}\right )}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.23, size = 63, normalized size = 0.94 \[ \frac {x}{a}-\frac {\ln \left (a+b\,{\mathrm {e}}^x+c\,{\mathrm {e}}^{2\,x}\right )}{2\,a}-\frac {b\,\mathrm {atan}\left (\frac {b+2\,c\,{\mathrm {e}}^x}{\sqrt {4\,a\,c-b^2}}\right )}{a\,\sqrt {4\,a\,c-b^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.33, size = 63, normalized size = 0.94 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________