Optimal. Leaf size=56 \[ \frac {\log \left (a^2-a x+x^2\right )}{6 a}-\frac {\log (a+x)}{3 a}-\frac {\tan ^{-1}\left (\frac {a-2 x}{\sqrt {3} a}\right )}{\sqrt {3} a} \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {292, 31, 634, 617, 204, 628} \[ \frac {\log \left (a^2-a x+x^2\right )}{6 a}-\frac {\log (a+x)}{3 a}-\frac {\tan ^{-1}\left (\frac {a-2 x}{\sqrt {3} a}\right )}{\sqrt {3} a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 204
Rule 292
Rule 617
Rule 628
Rule 634
Rubi steps
\begin {align*} \int \frac {x}{a^3+x^3} \, dx &=-\frac {\int \frac {1}{a+x} \, dx}{3 a}+\frac {\int \frac {a+x}{a^2-a x+x^2} \, dx}{3 a}\\ &=-\frac {\log (a+x)}{3 a}+\frac {1}{2} \int \frac {1}{a^2-a x+x^2} \, dx+\frac {\int \frac {-a+2 x}{a^2-a x+x^2} \, dx}{6 a}\\ &=-\frac {\log (a+x)}{3 a}+\frac {\log \left (a^2-a x+x^2\right )}{6 a}+\frac {\operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 x}{a}\right )}{a}\\ &=-\frac {\tan ^{-1}\left (\frac {a-2 x}{\sqrt {3} a}\right )}{\sqrt {3} a}-\frac {\log (a+x)}{3 a}+\frac {\log \left (a^2-a x+x^2\right )}{6 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 50, normalized size = 0.89 \[ \frac {\log \left (a^2-a x+x^2\right )-2 \log (a+x)+2 \sqrt {3} \tan ^{-1}\left (\frac {2 x-a}{\sqrt {3} a}\right )}{6 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.02, size = 59, normalized size = 1.05 \[ \frac {\log \left (a^2-a x+x^2\right )}{6 a}-\frac {\log (a+x)}{3 a}-\frac {\tan ^{-1}\left (\frac {1}{\sqrt {3}}-\frac {2 x}{\sqrt {3} a}\right )}{\sqrt {3} a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.84, size = 43, normalized size = 0.77 \[ \frac {2 \, \sqrt {3} \arctan \left (-\frac {\sqrt {3} {\left (a - 2 \, x\right )}}{3 \, a}\right ) + \log \left (a^{2} - a x + x^{2}\right ) - 2 \, \log \left (a + x\right )}{6 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.11, size = 50, normalized size = 0.89 \[ \frac {\sqrt {3} \arctan \left (-\frac {\sqrt {3} {\left (a - 2 \, x\right )}}{3 \, a}\right )}{3 \, a} + \frac {\log \left (a^{2} - a x + x^{2}\right )}{6 \, a} - \frac {\log \left ({\left | a + x \right |}\right )}{3 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.28, size = 51, normalized size = 0.91
method | result | size |
default | \(\frac {\frac {\ln \left (a^{2}-a x +x^{2}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\left (2 x -a \right ) \sqrt {3}}{3 a}\right )}{3 a}-\frac {\ln \left (a +x \right )}{3 a}\) | \(51\) |
risch | \(\frac {\ln \left (4 a^{2}-4 a x +4 x^{2}\right )}{6 a}+\frac {\sqrt {3}\, \arctan \left (\frac {\left (2 x -a \right ) \sqrt {3}}{3 a}\right )}{3 a}-\frac {\ln \left (a +x \right )}{3 a}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.96, size = 49, normalized size = 0.88 \[ \frac {\sqrt {3} \arctan \left (-\frac {\sqrt {3} {\left (a - 2 \, x\right )}}{3 \, a}\right )}{3 \, a} + \frac {\log \left (a^{2} - a x + x^{2}\right )}{6 \, a} - \frac {\log \left (a + x\right )}{3 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.12, size = 68, normalized size = 1.21 \[ -\frac {\ln \left (a+x\right )}{3\,a}-\frac {\ln \left (x+\frac {a\,{\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )}^2}{4}\right )\,\left (-1+\sqrt {3}\,1{}\mathrm {i}\right )}{6\,a}+\frac {\ln \left (x+\frac {a\,{\left (1+\sqrt {3}\,1{}\mathrm {i}\right )}^2}{4}\right )\,\left (1+\sqrt {3}\,1{}\mathrm {i}\right )}{6\,a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 0.13, size = 71, normalized size = 1.27 \[ \frac {- \frac {\log {\left (a + x \right )}}{3} + \left (\frac {1}{6} - \frac {\sqrt {3} i}{6}\right ) \log {\left (9 a \left (\frac {1}{6} - \frac {\sqrt {3} i}{6}\right )^{2} + x \right )} + \left (\frac {1}{6} + \frac {\sqrt {3} i}{6}\right ) \log {\left (9 a \left (\frac {1}{6} + \frac {\sqrt {3} i}{6}\right )^{2} + x \right )}}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________