Optimal. Leaf size=107 \[ -\frac {(1-2 x) \sqrt {x^2+x^3-x^4}}{8 x}-\frac {\left (1+x-x^2\right ) \sqrt {x^2+x^3-x^4}}{3 x}-\frac {5 \sqrt {x^2+x^3-x^4} \sin ^{-1}\left (\frac {1-2 x}{\sqrt {5}}\right )}{16 x \sqrt {1+x-x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {1917, 654, 626,
633, 222} \begin {gather*} -\frac {5 \sqrt {-x^4+x^3+x^2} \text {ArcSin}\left (\frac {1-2 x}{\sqrt {5}}\right )}{16 x \sqrt {-x^2+x+1}}-\frac {\sqrt {-x^4+x^3+x^2} (1-2 x)}{8 x}-\frac {\left (-x^2+x+1\right ) \sqrt {-x^4+x^3+x^2}}{3 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 222
Rule 626
Rule 633
Rule 654
Rule 1917
Rubi steps
\begin {align*} \int \sqrt {x^2+x^3-x^4} \, dx &=\frac {\sqrt {x^2+x^3-x^4} \int x \sqrt {1+x-x^2} \, dx}{x \sqrt {1+x-x^2}}\\ &=-\frac {\left (1+x-x^2\right ) \sqrt {x^2+x^3-x^4}}{3 x}+\frac {\sqrt {x^2+x^3-x^4} \int \sqrt {1+x-x^2} \, dx}{2 x \sqrt {1+x-x^2}}\\ &=-\frac {(1-2 x) \sqrt {x^2+x^3-x^4}}{8 x}-\frac {\left (1+x-x^2\right ) \sqrt {x^2+x^3-x^4}}{3 x}+\frac {\left (5 \sqrt {x^2+x^3-x^4}\right ) \int \frac {1}{\sqrt {1+x-x^2}} \, dx}{16 x \sqrt {1+x-x^2}}\\ &=-\frac {(1-2 x) \sqrt {x^2+x^3-x^4}}{8 x}-\frac {\left (1+x-x^2\right ) \sqrt {x^2+x^3-x^4}}{3 x}-\frac {\left (\sqrt {5} \sqrt {x^2+x^3-x^4}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{5}}} \, dx,x,1-2 x\right )}{16 x \sqrt {1+x-x^2}}\\ &=-\frac {(1-2 x) \sqrt {x^2+x^3-x^4}}{8 x}-\frac {\left (1+x-x^2\right ) \sqrt {x^2+x^3-x^4}}{3 x}-\frac {5 \sqrt {x^2+x^3-x^4} \sin ^{-1}\left (\frac {1-2 x}{\sqrt {5}}\right )}{16 x \sqrt {1+x-x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 82, normalized size = 0.77 \begin {gather*} \frac {\sqrt {x^2+x^3-x^4} \left (2 \sqrt {-1-x+x^2} \left (-11-2 x+8 x^2\right )+15 \log \left (1-2 x+2 \sqrt {-1-x+x^2}\right )\right )}{48 x \sqrt {-1-x+x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 81, normalized size = 0.76
method | result | size |
default | \(-\frac {\sqrt {-x^{4}+x^{3}+x^{2}}\, \left (16 \left (-x^{2}+x +1\right )^{\frac {3}{2}}-12 x \sqrt {-x^{2}+x +1}+6 \sqrt {-x^{2}+x +1}-15 \arcsin \left (\frac {\sqrt {5}\, \left (2 x -1\right )}{5}\right )\right )}{48 x \sqrt {-x^{2}+x +1}}\) | \(81\) |
risch | \(\frac {\left (8 x^{2}-2 x -11\right ) \sqrt {-x^{2} \left (x^{2}-x -1\right )}}{24 x}-\frac {5 \arcsin \left (\frac {2 \sqrt {5}\, \left (x -\frac {1}{2}\right )}{5}\right ) \sqrt {-x^{2} \left (x^{2}-x -1\right )}\, \sqrt {-x^{2}+x +1}}{16 x \left (x^{2}-x -1\right )}\) | \(81\) |
trager | \(\frac {\left (8 x^{2}-2 x -11\right ) \sqrt {-x^{4}+x^{3}+x^{2}}}{24 x}+\frac {5 \RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {2 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{2}-x \RootOf \left (\textit {\_Z}^{2}+1\right )-2 \sqrt {-x^{4}+x^{3}+x^{2}}}{x}\right )}{16}\) | \(82\) |
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.39, size = 62, normalized size = 0.58 \begin {gather*} -\frac {15 \, x \arctan \left (-\frac {x - \sqrt {-x^{4} + x^{3} + x^{2}}}{x^{2}}\right ) - \sqrt {-x^{4} + x^{3} + x^{2}} {\left (8 \, x^{2} - 2 \, x - 11\right )} + 11 \, x}{24 \, x} \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 \sqrt {- x^{4} + x^{3} + x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.08, size = 60, normalized size = 0.56 \begin {gather*} \frac {1}{48} \, {\left (15 \, \arcsin \left (\frac {1}{5} \, \sqrt {5}\right ) + 22\right )} \mathrm {sgn}\left (x\right ) + \frac {5}{16} \, \arcsin \left (\frac {1}{5} \, \sqrt {5} {\left (2 \, x - 1\right )}\right ) \mathrm {sgn}\left (x\right ) + \frac {1}{24} \, {\left (2 \, {\left (4 \, x \mathrm {sgn}\left (x\right ) - \mathrm {sgn}\left (x\right )\right )} x - 11 \, \mathrm {sgn}\left (x\right )\right )} \sqrt {-x^{2} + x + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sqrt {-x^4+x^3+x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________