Optimal. Leaf size=107 \[ -\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}-\frac {5 \sqrt {-x^4+x^3+x^2} \sin ^{-1}\left (\frac {1-2 x}{\sqrt {5}}\right )}{16 x \sqrt {-x^2+x+1}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, 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 = {1903, 640, 612, 619, 216} \[ -\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}-\frac {5 \sqrt {-x^4+x^3+x^2} \sin ^{-1}\left (\frac {1-2 x}{\sqrt {5}}\right )}{16 x \sqrt {-x^2+x+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 216
Rule 612
Rule 619
Rule 640
Rule 1903
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 ) \operatorname {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.03, size = 84, normalized size = 0.79 \[ \frac {\sqrt {-x^4+x^3+x^2} \left (2 \sqrt {x^2-x-1} \left (8 x^2-2 x-11\right )-15 \tanh ^{-1}\left (\frac {2 x-1}{2 \sqrt {x^2-x-1}}\right )\right )}{48 x \sqrt {x^2-x-1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 62, normalized size = 0.58 \[ -\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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.43, size = 60, normalized size = 0.56 \[ \frac {1}{48} \, {\left (15 \, \arcsin \left (\frac {1}{5} \, \sqrt {5}\right ) + 22\right )} \mathrm {sgn}\relax (x) + \frac {5}{16} \, \arcsin \left (\frac {1}{5} \, \sqrt {5} {\left (2 \, x - 1\right )}\right ) \mathrm {sgn}\relax (x) + \frac {1}{24} \, {\left (2 \, {\left (4 \, x \mathrm {sgn}\relax (x) - \mathrm {sgn}\relax (x)\right )} x - 11 \, \mathrm {sgn}\relax (x)\right )} \sqrt {-x^{2} + x + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 81, normalized size = 0.76 \[ -\frac {\sqrt {-x^{4}+x^{3}+x^{2}}\, \left (-12 \sqrt {-x^{2}+x +1}\, x -15 \arcsin \left (\frac {\left (2 x -1\right ) \sqrt {5}}{5}\right )+16 \left (-x^{2}+x +1\right )^{\frac {3}{2}}+6 \sqrt {-x^{2}+x +1}\right )}{48 \sqrt {-x^{2}+x +1}\, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {-x^{4} + x^{3} + x^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \sqrt {-x^4+x^3+x^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {- x^{4} + x^{3} + x^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________