Optimal. Leaf size=28 \[ \frac {2 \tan ^{-1}\left (\frac {x}{\sqrt {3}}\right )}{\sqrt {3}}+\log (x)-\frac {1}{2} \log \left (3+x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {1607, 815, 649,
209, 266} \begin {gather*} -\frac {1}{2} \log \left (x^2+3\right )+\log (x)+\frac {2 \tan ^{-1}\left (\frac {x}{\sqrt {3}}\right )}{\sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 815
Rule 1607
Rubi steps
\begin {align*} \int \frac {3+2 x}{3 x+x^3} \, dx &=\int \frac {3+2 x}{x \left (3+x^2\right )} \, dx\\ &=\int \left (\frac {1}{x}+\frac {2-x}{3+x^2}\right ) \, dx\\ &=\log (x)+\int \frac {2-x}{3+x^2} \, dx\\ &=\log (x)+2 \int \frac {1}{3+x^2} \, dx-\int \frac {x}{3+x^2} \, dx\\ &=\frac {2 \tan ^{-1}\left (\frac {x}{\sqrt {3}}\right )}{\sqrt {3}}+\log (x)-\frac {1}{2} \log \left (3+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 28, normalized size = 1.00 \begin {gather*} \frac {2 \tan ^{-1}\left (\frac {x}{\sqrt {3}}\right )}{\sqrt {3}}+\log (x)-\frac {1}{2} \log \left (3+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 1.84, size = 23, normalized size = 0.82 \begin {gather*} \text {Log}\left [x\right ]-\frac {\text {Log}\left [3+x^2\right ]}{2}+\frac {2 \sqrt {3} \text {ArcTan}\left [\frac {\sqrt {3} x}{3}\right ]}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 24, normalized size = 0.86
method | result | size |
default | \(\ln \left (x \right )-\frac {\ln \left (x^{2}+3\right )}{2}+\frac {2 \arctan \left (\frac {x \sqrt {3}}{3}\right ) \sqrt {3}}{3}\) | \(24\) |
risch | \(\ln \left (x \right )-\frac {\ln \left (x^{2}+3\right )}{2}+\frac {2 \arctan \left (\frac {x \sqrt {3}}{3}\right ) \sqrt {3}}{3}\) | \(24\) |
meijerg | \(\ln \left (x \right )-\frac {\ln \left (3\right )}{2}-\frac {\ln \left (\frac {x^{2}}{3}+1\right )}{2}+\frac {2 \arctan \left (\frac {x \sqrt {3}}{3}\right ) \sqrt {3}}{3}\) | \(30\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.38, size = 23, normalized size = 0.82 \begin {gather*} \frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} x\right ) - \frac {1}{2} \, \log \left (x^{2} + 3\right ) + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 23, normalized size = 0.82 \begin {gather*} \frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} x\right ) - \frac {1}{2} \, \log \left (x^{2} + 3\right ) + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 29, normalized size = 1.04 \begin {gather*} \log {\left (x \right )} - \frac {\log {\left (x^{2} + 3 \right )}}{2} + \frac {2 \sqrt {3} \operatorname {atan}{\left (\frac {\sqrt {3} x}{3} \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 33, normalized size = 1.18 \begin {gather*} \ln \left |x\right |-\frac {\ln \left (x^{2}+3\right )}{2}+\frac {4 \arctan \left (\frac {x}{\sqrt {3}}\right )}{2 \sqrt {3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.30, size = 55, normalized size = 1.96 \begin {gather*} \ln \left (x\right )-\frac {\ln \left (x+\sqrt {3}\,1{}\mathrm {i}\right )}{2}-\frac {\ln \left (x-\sqrt {3}\,1{}\mathrm {i}\right )}{2}-\frac {\sqrt {3}\,\ln \left (x-\sqrt {3}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3}+\frac {\sqrt {3}\,\ln \left (x+\sqrt {3}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________