Optimal. Leaf size=131 \[ -\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {1}{4} \left (a-i \sqrt {3} a\right ) \log \left (-i x+\sqrt {3} x-2 i \sqrt [3]{-x+x^3}\right )+\frac {1}{4} \left (a+i \sqrt {3} a\right ) \log \left (i x+\sqrt {3} x+2 i \sqrt [3]{-x+x^3}\right )-\frac {1}{2} a \log \left (-x+\sqrt [3]{-x+x^3}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 128, normalized size of antiderivative = 0.98, number of steps
used = 5, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {2063, 2036,
335, 281, 245} \begin {gather*} \frac {\sqrt {3} a \sqrt [3]{x} \sqrt [3]{x^2-1} \text {ArcTan}\left (\frac {\frac {2 x^{2/3}}{\sqrt [3]{x^2-1}}+1}{\sqrt {3}}\right )}{2 \sqrt [3]{x^3-x}}-\frac {3 a \sqrt [3]{x} \sqrt [3]{x^2-1} \log \left (x^{2/3}-\sqrt [3]{x^2-1}\right )}{4 \sqrt [3]{x^3-x}}-\frac {3 b \left (x^3-x\right )^{2/3}}{4 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 245
Rule 281
Rule 335
Rule 2036
Rule 2063
Rubi steps
\begin {align*} \int \frac {-b+a x^2}{x^2 \sqrt [3]{-x+x^3}} \, dx &=-\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+a \int \frac {1}{\sqrt [3]{-x+x^3}} \, dx\\ &=-\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\left (a \sqrt [3]{x} \sqrt [3]{-1+x^2}\right ) \int \frac {1}{\sqrt [3]{x} \sqrt [3]{-1+x^2}} \, dx}{\sqrt [3]{-x+x^3}}\\ &=-\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\left (3 a \sqrt [3]{x} \sqrt [3]{-1+x^2}\right ) \text {Subst}\left (\int \frac {x}{\sqrt [3]{-1+x^6}} \, dx,x,\sqrt [3]{x}\right )}{\sqrt [3]{-x+x^3}}\\ &=-\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\left (3 a \sqrt [3]{x} \sqrt [3]{-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{-1+x^3}} \, dx,x,x^{2/3}\right )}{2 \sqrt [3]{-x+x^3}}\\ &=-\frac {3 b \left (-x+x^3\right )^{2/3}}{4 x^2}+\frac {\sqrt {3} a \sqrt [3]{x} \sqrt [3]{-1+x^2} \tan ^{-1}\left (\frac {1+\frac {2 x^{2/3}}{\sqrt [3]{-1+x^2}}}{\sqrt {3}}\right )}{2 \sqrt [3]{-x+x^3}}-\frac {3 a \sqrt [3]{x} \sqrt [3]{-1+x^2} \log \left (x^{2/3}-\sqrt [3]{-1+x^2}\right )}{4 \sqrt [3]{-x+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.33, size = 163, normalized size = 1.24 \begin {gather*} \frac {3 b-3 b x^2+2 \sqrt {3} a x^{4/3} \sqrt [3]{-1+x^2} \text {ArcTan}\left (\frac {\sqrt {3} x^{2/3}}{x^{2/3}+2 \sqrt [3]{-1+x^2}}\right )-2 a x^{4/3} \sqrt [3]{-1+x^2} \log \left (-x^{2/3}+\sqrt [3]{-1+x^2}\right )+a x^{4/3} \sqrt [3]{-1+x^2} \log \left (x^{4/3}+x^{2/3} \sqrt [3]{-1+x^2}+\left (-1+x^2\right )^{2/3}\right )}{4 x \sqrt [3]{x \left (-1+x^2\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.92, size = 55, normalized size = 0.42
method | result | size |
risch | \(-\frac {3 b \left (x^{2}-1\right )}{4 x \left (x \left (x^{2}-1\right )\right )^{\frac {1}{3}}}+\frac {3 a \left (-\mathrm {signum}\left (x^{2}-1\right )\right )^{\frac {1}{3}} x^{\frac {2}{3}} \hypergeom \left (\left [\frac {1}{3}, \frac {1}{3}\right ], \left [\frac {4}{3}\right ], x^{2}\right )}{2 \mathrm {signum}\left (x^{2}-1\right )^{\frac {1}{3}}}\) | \(55\) |
meijerg | \(\frac {3 a \left (-\mathrm {signum}\left (x^{2}-1\right )\right )^{\frac {1}{3}} x^{\frac {2}{3}} \hypergeom \left (\left [\frac {1}{3}, \frac {1}{3}\right ], \left [\frac {4}{3}\right ], x^{2}\right )}{2 \mathrm {signum}\left (x^{2}-1\right )^{\frac {1}{3}}}+\frac {3 b \left (-\mathrm {signum}\left (x^{2}-1\right )\right )^{\frac {1}{3}} \left (-x^{2}+1\right )^{\frac {2}{3}}}{4 \mathrm {signum}\left (x^{2}-1\right )^{\frac {1}{3}} x^{\frac {4}{3}}}\) | \(68\) |
trager | \(-\frac {3 b \left (x^{3}-x \right )^{\frac {2}{3}}}{4 x^{2}}-\frac {a \left (72 \ln \left (-3659904 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}+162432 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {2}{3}}+385560 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {1}{3}} x -497160 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}+5355 \left (x^{3}-x \right )^{\frac {2}{3}}-7611 x \left (x^{3}-x \right )^{\frac {1}{3}}+14639616 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}+1550 x^{2}+107856 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-465\right ) \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+\ln \left (2856384 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}-162432 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {2}{3}}+547992 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {1}{3}} x -425232 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}+7611 \left (x^{3}-x \right )^{\frac {2}{3}}-5355 x \left (x^{3}-x \right )^{\frac {1}{3}}-11425536 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}-1705 x^{2}+233064 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+1085\right )-\ln \left (-3659904 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}+162432 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {2}{3}}+385560 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \left (x^{3}-x \right )^{\frac {1}{3}} x -497160 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}+5355 \left (x^{3}-x \right )^{\frac {2}{3}}-7611 x \left (x^{3}-x \right )^{\frac {1}{3}}+14639616 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}+1550 x^{2}+107856 \RootOf \left (5184 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-465\right )\right )}{2}\) | \(450\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.85, size = 112, normalized size = 0.85 \begin {gather*} \frac {2 \, \sqrt {3} a x^{2} \arctan \left (-\frac {44032959556 \, \sqrt {3} {\left (x^{3} - x\right )}^{\frac {1}{3}} x + \sqrt {3} {\left (16754327161 \, x^{2} - 2707204793\right )} - 10524305234 \, \sqrt {3} {\left (x^{3} - x\right )}^{\frac {2}{3}}}{81835897185 \, x^{2} - 1102302937}\right ) - a x^{2} \log \left (-3 \, {\left (x^{3} - x\right )}^{\frac {1}{3}} x + 3 \, {\left (x^{3} - x\right )}^{\frac {2}{3}} + 1\right ) - 3 \, {\left (x^{3} - x\right )}^{\frac {2}{3}} b}{4 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a x^{2} - b}{x^{2} \sqrt [3]{x \left (x - 1\right ) \left (x + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 78, normalized size = 0.60 \begin {gather*} -\frac {1}{2} \, \sqrt {3} a \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {1}{3}} + 1\right )}\right ) + \frac {1}{4} \, a \log \left ({\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {2}{3}} + {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {1}{3}} + 1\right ) - \frac {1}{2} \, a \log \left ({\left | {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {1}{3}} - 1 \right |}\right ) - \frac {3}{4} \, b {\left (-\frac {1}{x^{2}} + 1\right )}^{\frac {2}{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.25, size = 46, normalized size = 0.35 \begin {gather*} \frac {3\,a\,x\,{\left (1-x^2\right )}^{1/3}\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{3},\frac {1}{3};\ \frac {4}{3};\ x^2\right )}{2\,{\left (x^3-x\right )}^{1/3}}-\frac {3\,b\,{\left (x^3-x\right )}^{2/3}}{4\,x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________