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} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0277833, antiderivative size = 56, normalized size of antiderivative = 1., 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 292
Rule 31
Rule 634
Rule 617
Rule 204
Rule 628
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.0054318, 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]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 52, normalized size = 0.9 \begin{align*}{\frac{\ln \left ({a}^{2}-ax+{x}^{2} \right ) }{6\,a}}+{\frac{\sqrt{3}}{3\,a}\arctan \left ({\frac{ \left ( 2\,x-a \right ) \sqrt{3}}{3\,a}} \right ) }-{\frac{\ln \left ( a+x \right ) }{3\,a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.39883, size = 66, normalized size = 1.18 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.08417, size = 122, normalized size = 2.18 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] time = 0.113897, size = 71, normalized size = 1.27 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.05209, size = 68, normalized size = 1.21 \begin{align*} \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} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]