Optimal. Leaf size=44 \[ \frac{x}{3}-\frac{1}{6} \log \left (3 e^x+e^{2 x}+3\right )-\frac{\tan ^{-1}\left (\frac{2 e^x+3}{\sqrt{3}}\right )}{\sqrt{3}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.036331, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {2282, 705, 29, 634, 618, 204, 628} \[ \frac{x}{3}-\frac{1}{6} \log \left (3 e^x+e^{2 x}+3\right )-\frac{\tan ^{-1}\left (\frac{2 e^x+3}{\sqrt{3}}\right )}{\sqrt{3}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 705
Rule 29
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{3+3 e^x+e^{2 x}} \, dx &=\operatorname{Subst}\left (\int \frac{1}{x \left (3+3 x+x^2\right )} \, dx,x,e^x\right )\\ &=\frac{1}{3} \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,e^x\right )+\frac{1}{3} \operatorname{Subst}\left (\int \frac{-3-x}{3+3 x+x^2} \, dx,x,e^x\right )\\ &=\frac{x}{3}-\frac{1}{6} \operatorname{Subst}\left (\int \frac{3+2 x}{3+3 x+x^2} \, dx,x,e^x\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{3+3 x+x^2} \, dx,x,e^x\right )\\ &=\frac{x}{3}-\frac{1}{6} \log \left (3+3 e^x+e^{2 x}\right )+\operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,3+2 e^x\right )\\ &=\frac{x}{3}-\frac{\tan ^{-1}\left (\frac{3+2 e^x}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{1}{6} \log \left (3+3 e^x+e^{2 x}\right )\\ \end{align*}
Mathematica [A] time = 0.0179097, size = 44, normalized size = 1. \[ \frac{x}{3}-\frac{1}{6} \log \left (3 e^x+e^{2 x}+3\right )-\frac{\tan ^{-1}\left (\frac{2 e^x+3}{\sqrt{3}}\right )}{\sqrt{3}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 37, normalized size = 0.8 \begin{align*} -{\frac{\ln \left ( 3+3\,{{\rm e}^{x}}+ \left ({{\rm e}^{x}} \right ) ^{2} \right ) }{6}}-{\frac{\sqrt{3}}{3}\arctan \left ({\frac{ \left ( 3+2\,{{\rm e}^{x}} \right ) \sqrt{3}}{3}} \right ) }+{\frac{\ln \left ({{\rm e}^{x}} \right ) }{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.46327, size = 46, normalized size = 1.05 \begin{align*} -\frac{1}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, e^{x} + 3\right )}\right ) + \frac{1}{3} \, x - \frac{1}{6} \, \log \left (e^{\left (2 \, x\right )} + 3 \, e^{x} + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.5249, size = 117, normalized size = 2.66 \begin{align*} -\frac{1}{3} \, \sqrt{3} \arctan \left (\frac{2}{3} \, \sqrt{3} e^{x} + \sqrt{3}\right ) + \frac{1}{3} \, x - \frac{1}{6} \, \log \left (e^{\left (2 \, x\right )} + 3 \, e^{x} + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.120918, size = 24, normalized size = 0.55 \begin{align*} \frac{x}{3} + \operatorname{RootSum}{\left (9 z^{2} + 3 z + 1, \left ( i \mapsto i \log{\left (- 3 i + e^{x} + 1 \right )} \right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.26904, size = 46, normalized size = 1.05 \begin{align*} -\frac{1}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, e^{x} + 3\right )}\right ) + \frac{1}{3} \, x - \frac{1}{6} \, \log \left (e^{\left (2 \, x\right )} + 3 \, e^{x} + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]