Optimal. Leaf size=31 \[ -\frac {2 \tan ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}+\log (1+x)+\log \left (1+x+x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {2099, 648, 632,
210, 642} \begin {gather*} -\frac {2 \text {ArcTan}\left (\frac {2 x+1}{\sqrt {3}}\right )}{\sqrt {3}}+\log \left (x^2+x+1\right )+\log (x+1) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 2099
Rubi steps
\begin {align*} \int \frac {1+3 x+3 x^2}{1+2 x+2 x^2+x^3} \, dx &=\int \left (\frac {1}{1+x}+\frac {2 x}{1+x+x^2}\right ) \, dx\\ &=\log (1+x)+2 \int \frac {x}{1+x+x^2} \, dx\\ &=\log (1+x)-\int \frac {1}{1+x+x^2} \, dx+\int \frac {1+2 x}{1+x+x^2} \, dx\\ &=\log (1+x)+\log \left (1+x+x^2\right )+2 \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 x\right )\\ &=-\frac {2 \tan ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}+\log (1+x)+\log \left (1+x+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 31, normalized size = 1.00 \begin {gather*} -\frac {2 \tan ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}+\log (1+x)+\log \left (1+x+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 29, normalized size = 0.94
method | result | size |
default | \(\ln \left (1+x \right )+\ln \left (x^{2}+x +1\right )-\frac {2 \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right ) \sqrt {3}}{3}\) | \(29\) |
risch | \(-\frac {2 \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right ) \sqrt {3}}{3}+\ln \left (4 x^{2}+4 x +4\right )+\ln \left (1+x \right )\) | \(33\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 28, normalized size = 0.90 \begin {gather*} -\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \log \left (x^{2} + x + 1\right ) + \log \left (x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 28, normalized size = 0.90 \begin {gather*} -\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \log \left (x^{2} + x + 1\right ) + \log \left (x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.04, size = 3, normalized size = 0.10 \begin {gather*} \log {\left (x + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.24, size = 29, normalized size = 0.94 \begin {gather*} -\frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \log \left (x^{2} + x + 1\right ) + \log \left ({\left | x + 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 57, normalized size = 1.84 \begin {gather*} \ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )+\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )+\ln \left (x+1\right )+\frac {\sqrt {3}\,\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,1{}\mathrm {i}}{3}-\frac {\sqrt {3}\,\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,1{}\mathrm {i}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________