Optimal. Leaf size=67 \[ \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} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, 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 = {2320, 719, 29,
648, 632, 212, 642} \begin {gather*} \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} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 212
Rule 632
Rule 642
Rule 648
Rule 719
Rule 2320
Rubi steps
\begin {align*} \int \frac {1}{a+b e^x+c e^{2 x}} \, dx &=\text {Subst}\left (\int \frac {1}{x \left (a+b x+c x^2\right )} \, dx,x,e^x\right )\\ &=\frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,e^x\right )}{a}+\frac {\text {Subst}\left (\int \frac {-b-c x}{a+b x+c x^2} \, dx,x,e^x\right )}{a}\\ &=\frac {x}{a}-\frac {\text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,e^x\right )}{2 a}-\frac {b \text {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 \text {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.13, size = 69, normalized size = 1.03 \begin {gather*} -\frac {\frac {2 b \tan ^{-1}\left (\frac {b+2 c e^x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}-2 \log \left (e^x\right )+\log \left (a+e^x \left (b+c e^x\right )\right )}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 65, normalized size = 0.97
method | result | size |
default | \(\frac {\ln \left ({\mathrm e}^{x}\right )}{a}+\frac {-\frac {\ln \left (a +b \,{\mathrm e}^{x}+c \,{\mathrm e}^{2 x}\right )}{2}-\frac {b \arctan \left (\frac {b +2 c \,{\mathrm e}^{x}}{\sqrt {4 c a -b^{2}}}\right )}{\sqrt {4 c a -b^{2}}}}{a}\) | \(65\) |
risch | \(\frac {4 x c a}{4 a^{2} c -b^{2} a}-\frac {x \,b^{2}}{4 a^{2} c -b^{2} a}-\frac {2 \ln \left ({\mathrm e}^{x}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 c b}\right ) c}{4 c a -b^{2}}+\frac {\ln \left ({\mathrm e}^{x}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 c b}\right ) b^{2}}{2 a \left (4 c a -b^{2}\right )}+\frac {\ln \left ({\mathrm e}^{x}-\frac {-b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 c b}\right ) \sqrt {-4 a \,b^{2} c +b^{4}}}{2 a \left (4 c a -b^{2}\right )}-\frac {2 \ln \left ({\mathrm e}^{x}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 c b}\right ) c}{4 c a -b^{2}}+\frac {\ln \left ({\mathrm e}^{x}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 c b}\right ) b^{2}}{2 a \left (4 c a -b^{2}\right )}-\frac {\ln \left ({\mathrm e}^{x}+\frac {b^{2}+\sqrt {-4 a \,b^{2} c +b^{4}}}{2 c b}\right ) \sqrt {-4 a \,b^{2} c +b^{4}}}{2 a \left (4 c a -b^{2}\right )}\) | \(353\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 219, normalized size = 3.27 \begin {gather*} \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.16, size = 63, normalized size = 0.94 \begin {gather*} \operatorname {RootSum} {\left (z^{2} \cdot \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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.95, size = 63, normalized size = 0.94 \begin {gather*} -\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 {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.23, size = 63, normalized size = 0.94 \begin {gather*} \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}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________