Optimal. Leaf size=63 \[ -\frac{\log \left (a^2-a x+x^2\right )}{6 a^4}-\frac{1}{a^3 x}+\frac{\log (a+x)}{3 a^4}+\frac{\tan ^{-1}\left (\frac{a-2 x}{\sqrt{3} a}\right )}{\sqrt{3} a^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0370236, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {325, 292, 31, 634, 617, 204, 628} \[ -\frac{\log \left (a^2-a x+x^2\right )}{6 a^4}-\frac{1}{a^3 x}+\frac{\log (a+x)}{3 a^4}+\frac{\tan ^{-1}\left (\frac{a-2 x}{\sqrt{3} a}\right )}{\sqrt{3} a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 325
Rule 292
Rule 31
Rule 634
Rule 617
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{x^2 \left (a^3+x^3\right )} \, dx &=-\frac{1}{a^3 x}-\frac{\int \frac{x}{a^3+x^3} \, dx}{a^3}\\ &=-\frac{1}{a^3 x}+\frac{\int \frac{1}{a+x} \, dx}{3 a^4}-\frac{\int \frac{a+x}{a^2-a x+x^2} \, dx}{3 a^4}\\ &=-\frac{1}{a^3 x}+\frac{\log (a+x)}{3 a^4}-\frac{\int \frac{-a+2 x}{a^2-a x+x^2} \, dx}{6 a^4}-\frac{\int \frac{1}{a^2-a x+x^2} \, dx}{2 a^3}\\ &=-\frac{1}{a^3 x}+\frac{\log (a+x)}{3 a^4}-\frac{\log \left (a^2-a x+x^2\right )}{6 a^4}-\frac{\operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1-\frac{2 x}{a}\right )}{a^4}\\ &=-\frac{1}{a^3 x}+\frac{\tan ^{-1}\left (\frac{a-2 x}{\sqrt{3} a}\right )}{\sqrt{3} a^4}+\frac{\log (a+x)}{3 a^4}-\frac{\log \left (a^2-a x+x^2\right )}{6 a^4}\\ \end{align*}
Mathematica [A] time = 0.013682, size = 60, normalized size = 0.95 \[ -\frac{x \log \left (a^2-a x+x^2\right )-2 x \log (a+x)+2 \sqrt{3} x \tan ^{-1}\left (\frac{2 x-a}{\sqrt{3} a}\right )+6 a}{6 a^4 x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.007, size = 60, normalized size = 1. \begin{align*} -{\frac{\ln \left ({a}^{2}-ax+{x}^{2} \right ) }{6\,{a}^{4}}}-{\frac{\sqrt{3}}{3\,{a}^{4}}\arctan \left ({\frac{ \left ( 2\,x-a \right ) \sqrt{3}}{3\,a}} \right ) }+{\frac{\ln \left ( a+x \right ) }{3\,{a}^{4}}}-{\frac{1}{{a}^{3}x}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.39782, size = 77, normalized size = 1.22 \begin{align*} -\frac{\sqrt{3} \arctan \left (-\frac{\sqrt{3}{\left (a - 2 \, x\right )}}{3 \, a}\right )}{3 \, a^{4}} - \frac{\log \left (a^{2} - a x + x^{2}\right )}{6 \, a^{4}} + \frac{\log \left (a + x\right )}{3 \, a^{4}} - \frac{1}{a^{3} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.33257, size = 147, normalized size = 2.33 \begin{align*} -\frac{2 \, \sqrt{3} x \arctan \left (-\frac{\sqrt{3}{\left (a - 2 \, x\right )}}{3 \, a}\right ) + x \log \left (a^{2} - a x + x^{2}\right ) - 2 \, x \log \left (a + x\right ) + 6 \, a}{6 \, a^{4} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] time = 0.298719, size = 83, normalized size = 1.32 \begin{align*} - \frac{1}{a^{3} x} + \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^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.0489, size = 78, normalized size = 1.24 \begin{align*} -\frac{\sqrt{3} \arctan \left (-\frac{\sqrt{3}{\left (a - 2 \, x\right )}}{3 \, a}\right )}{3 \, a^{4}} - \frac{\log \left (a^{2} - a x + x^{2}\right )}{6 \, a^{4}} + \frac{\log \left ({\left | a + x \right |}\right )}{3 \, a^{4}} - \frac{1}{a^{3} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]