Optimal. Leaf size=77 \[ -\frac {x^3}{3}+\frac {1}{48} \sqrt {-x^4+3 x^2-1} \left (8 x^4-18 x^2-1\right )+\frac {5}{32} i \log \left (-2 i x^2+2 \sqrt {-x^4+3 x^2-1}+3 i\right )+x \]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 74, normalized size of antiderivative = 0.96, number of steps used = 13, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {6742, 1107, 612, 619, 216, 14, 1114, 640} \begin {gather*} -\frac {x^3}{3}-\frac {5}{32} \sin ^{-1}\left (\frac {3-2 x^2}{\sqrt {5}}\right )-\frac {1}{6} \left (-x^4+3 x^2-1\right )^{3/2}-\frac {1}{16} \left (3-2 x^2\right ) \sqrt {-x^4+3 x^2-1}+x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 216
Rule 612
Rule 619
Rule 640
Rule 1107
Rule 1114
Rule 6742
Rubi steps
\begin {align*} \int \left (-1+x^2\right ) \left (-1+x \sqrt {-1+3 x^2-x^4}\right ) \, dx &=\int \left (1-x \sqrt {-1+3 x^2-x^4}+x^2 \left (-1+x \sqrt {-1+3 x^2-x^4}\right )\right ) \, dx\\ &=x-\int x \sqrt {-1+3 x^2-x^4} \, dx+\int x^2 \left (-1+x \sqrt {-1+3 x^2-x^4}\right ) \, dx\\ &=x-\frac {1}{2} \operatorname {Subst}\left (\int \sqrt {-1+3 x-x^2} \, dx,x,x^2\right )+\int \left (-x^2+x^3 \sqrt {-1+3 x^2-x^4}\right ) \, dx\\ &=x-\frac {x^3}{3}+\frac {1}{8} \left (3-2 x^2\right ) \sqrt {-1+3 x^2-x^4}-\frac {5}{16} \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1+3 x-x^2}} \, dx,x,x^2\right )+\int x^3 \sqrt {-1+3 x^2-x^4} \, dx\\ &=x-\frac {x^3}{3}+\frac {1}{8} \left (3-2 x^2\right ) \sqrt {-1+3 x^2-x^4}+\frac {1}{2} \operatorname {Subst}\left (\int x \sqrt {-1+3 x-x^2} \, dx,x,x^2\right )+\frac {1}{16} \sqrt {5} \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{5}}} \, dx,x,3-2 x^2\right )\\ &=x-\frac {x^3}{3}+\frac {1}{8} \left (3-2 x^2\right ) \sqrt {-1+3 x^2-x^4}-\frac {1}{6} \left (-1+3 x^2-x^4\right )^{3/2}+\frac {5}{16} \sin ^{-1}\left (\frac {3-2 x^2}{\sqrt {5}}\right )+\frac {3}{4} \operatorname {Subst}\left (\int \sqrt {-1+3 x-x^2} \, dx,x,x^2\right )\\ &=x-\frac {x^3}{3}-\frac {1}{16} \left (3-2 x^2\right ) \sqrt {-1+3 x^2-x^4}-\frac {1}{6} \left (-1+3 x^2-x^4\right )^{3/2}+\frac {5}{16} \sin ^{-1}\left (\frac {3-2 x^2}{\sqrt {5}}\right )+\frac {15}{32} \operatorname {Subst}\left (\int \frac {1}{\sqrt {-1+3 x-x^2}} \, dx,x,x^2\right )\\ &=x-\frac {x^3}{3}-\frac {1}{16} \left (3-2 x^2\right ) \sqrt {-1+3 x^2-x^4}-\frac {1}{6} \left (-1+3 x^2-x^4\right )^{3/2}+\frac {5}{16} \sin ^{-1}\left (\frac {3-2 x^2}{\sqrt {5}}\right )-\frac {1}{32} \left (3 \sqrt {5}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{5}}} \, dx,x,3-2 x^2\right )\\ &=x-\frac {x^3}{3}-\frac {1}{16} \left (3-2 x^2\right ) \sqrt {-1+3 x^2-x^4}-\frac {1}{6} \left (-1+3 x^2-x^4\right )^{3/2}-\frac {5}{32} \sin ^{-1}\left (\frac {3-2 x^2}{\sqrt {5}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 89, normalized size = 1.16 \begin {gather*} \frac {1}{96} \left (-32 x^3-15 \sin ^{-1}\left (\frac {3-2 x^2}{\sqrt {5}}\right )+16 \sqrt {-x^4+3 x^2-1} x^4-36 \sqrt {-x^4+3 x^2-1} x^2-2 \sqrt {-x^4+3 x^2-1}+96 x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.41, size = 77, normalized size = 1.00 \begin {gather*} x-\frac {x^3}{3}+\frac {1}{48} \sqrt {-1+3 x^2-x^4} \left (-1-18 x^2+8 x^4\right )+\frac {5}{32} i \log \left (3 i-2 i x^2+2 \sqrt {-1+3 x^2-x^4}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.56, size = 73, normalized size = 0.95 \begin {gather*} -\frac {1}{3} \, x^{3} + \frac {1}{48} \, {\left (8 \, x^{4} - 18 \, x^{2} - 1\right )} \sqrt {-x^{4} + 3 \, x^{2} - 1} + x - \frac {5}{32} \, \arctan \left (\frac {\sqrt {-x^{4} + 3 \, x^{2} - 1} {\left (2 \, x^{2} - 3\right )}}{2 \, {\left (x^{4} - 3 \, x^{2} + 1\right )}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.45, size = 52, normalized size = 0.68 \begin {gather*} -\frac {1}{3} \, x^{3} + \frac {1}{48} \, \sqrt {-x^{4} + 3 \, x^{2} - 1} {\left (2 \, {\left (4 \, x^{2} - 9\right )} x^{2} - 1\right )} + x + \frac {5}{32} \, \arcsin \left (\frac {1}{5} \, \sqrt {5} {\left (2 \, x^{2} - 3\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 75, normalized size = 0.97
method | result | size |
elliptic | \(-\frac {x^{3}}{3}+x +\frac {x^{4} \sqrt {-x^{4}+3 x^{2}-1}}{6}-\frac {3 x^{2} \sqrt {-x^{4}+3 x^{2}-1}}{8}-\frac {\sqrt {-x^{4}+3 x^{2}-1}}{48}+\frac {5 \arcsin \left (\frac {2 \sqrt {5}\, \left (x^{2}-\frac {3}{2}\right )}{5}\right )}{32}\) | \(75\) |
trager | \(-\frac {x \left (x^{2}-3\right )}{3}+\left (\frac {1}{6} x^{4}-\frac {3}{8} x^{2}-\frac {1}{48}\right ) \sqrt {-x^{4}+3 x^{2}-1}+\frac {5 \RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (-2 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{2}+2 \sqrt {-x^{4}+3 x^{2}-1}+3 \RootOf \left (\textit {\_Z}^{2}+1\right )\right )}{32}\) | \(82\) |
default | \(\frac {x^{4} \sqrt {-x^{4}+3 x^{2}-1}}{6}-\frac {x^{2} \sqrt {-x^{4}+3 x^{2}-1}}{8}-\frac {19 \sqrt {-x^{4}+3 x^{2}-1}}{48}+\frac {5 \arcsin \left (\frac {2 \sqrt {5}\, \left (x^{2}-\frac {3}{2}\right )}{5}\right )}{32}+\frac {\left (-2 x^{2}+3\right ) \sqrt {-x^{4}+3 x^{2}-1}}{8}-\frac {x^{3}}{3}+x\) | \(98\) |
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*} -\frac {1}{3} \, x^{3} + x + \int {\left (x^{3} - x\right )} \sqrt {x^{2} + x - 1} \sqrt {-x^{2} + x + 1}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.40, size = 111, normalized size = 1.44 \begin {gather*} x-\frac {\left (\frac {x^2}{2}-\frac {3}{4}\right )\,\sqrt {-x^4+3\,x^2-1}}{2}-\frac {\sqrt {-x^4+3\,x^2-1}\,\left (-8\,x^4+6\,x^2+19\right )}{48}-\frac {x^3}{3}-\frac {\ln \left (x^2-\frac {3}{2}-\sqrt {-x^4+3\,x^2-1}\,1{}\mathrm {i}\right )\,15{}\mathrm {i}}{32}+\frac {\ln \left (\sqrt {-x^4+3\,x^2-1}+x^2\,1{}\mathrm {i}-\frac {3}{2}{}\mathrm {i}\right )\,5{}\mathrm {i}}{16} \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 \left (x - 1\right ) \left (x + 1\right ) \left (x \sqrt {- x^{4} + 3 x^{2} - 1} - 1\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________