Optimal. Leaf size=133 \[ -\frac {1}{2} \text {ArcTan}\left (\frac {\sqrt {-x-x^2+x^3}}{-1-x+x^2}\right )+\frac {1}{4} \sqrt {\frac {1}{5}+\frac {2 i}{5}} \text {ArcTan}\left (\frac {\sqrt {1-2 i} \sqrt {-x-x^2+x^3}}{-1-x+x^2}\right )+\frac {1}{4} \sqrt {\frac {1}{5}-\frac {2 i}{5}} \text {ArcTan}\left (\frac {\sqrt {1+2 i} \sqrt {-x-x^2+x^3}}{-1-x+x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 2.02, antiderivative size = 467, normalized size of antiderivative = 3.51, number of steps
used = 55, number of rules used = 11, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.407, Rules used = {2081, 6857,
971, 730, 1112, 948, 174, 552, 551, 1148, 1198} \begin {gather*} -\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {2 x+\sqrt {5}-1} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} \left (-1-\sqrt {5}\right );\text {ArcSin}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {x^3-x^2-x}}+\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {2 x+\sqrt {5}-1} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (-\frac {1}{2} i \left (1+\sqrt {5}\right );\text {ArcSin}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {x^3-x^2-x}}+\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {2 x+\sqrt {5}-1} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} i \left (1+\sqrt {5}\right );\text {ArcSin}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {x^3-x^2-x}}-\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {2 x+\sqrt {5}-1} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} \left (1+\sqrt {5}\right );\text {ArcSin}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {x^3-x^2-x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 174
Rule 551
Rule 552
Rule 730
Rule 948
Rule 971
Rule 1112
Rule 1148
Rule 1198
Rule 2081
Rule 6857
Rubi steps
\begin {align*} \int \frac {x^2}{\sqrt {-x-x^2+x^3} \left (-1+x^4\right )} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {x^{3/2}}{\sqrt {-1-x+x^2} \left (-1+x^4\right )} \, dx}{\sqrt {-x-x^2+x^3}}\\ &=\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \left (-\frac {x^{3/2}}{2 \left (1-x^2\right ) \sqrt {-1-x+x^2}}-\frac {x^{3/2}}{2 \left (1+x^2\right ) \sqrt {-1-x+x^2}}\right ) \, dx}{\sqrt {-x-x^2+x^3}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {x^{3/2}}{\left (1-x^2\right ) \sqrt {-1-x+x^2}} \, dx}{2 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {x^{3/2}}{\left (1+x^2\right ) \sqrt {-1-x+x^2}} \, dx}{2 \sqrt {-x-x^2+x^3}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \left (\frac {i x^{3/2}}{2 (i-x) \sqrt {-1-x+x^2}}+\frac {i x^{3/2}}{2 (i+x) \sqrt {-1-x+x^2}}\right ) \, dx}{2 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \left (\frac {x^{3/2}}{2 (1-x) \sqrt {-1-x+x^2}}+\frac {x^{3/2}}{2 (1+x) \sqrt {-1-x+x^2}}\right ) \, dx}{2 \sqrt {-x-x^2+x^3}}\\ &=-\frac {\left (i \sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {x^{3/2}}{(i-x) \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (i \sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {x^{3/2}}{(i+x) \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {x^{3/2}}{(1-x) \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {x^{3/2}}{(1+x) \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}\\ &=-\frac {\left (i \sqrt {x} \sqrt {-1-x+x^2}\right ) \int \left (-\frac {i}{\sqrt {x} \sqrt {-1-x+x^2}}+\frac {1}{(-i-x) \sqrt {x} \sqrt {-1-x+x^2}}+\frac {\sqrt {x}}{\sqrt {-1-x+x^2}}\right ) \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (i \sqrt {x} \sqrt {-1-x+x^2}\right ) \int \left (-\frac {i}{\sqrt {x} \sqrt {-1-x+x^2}}-\frac {\sqrt {x}}{\sqrt {-1-x+x^2}}+\frac {1}{\sqrt {x} (-i+x) \sqrt {-1-x+x^2}}\right ) \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \left (-\frac {1}{\sqrt {x} \sqrt {-1-x+x^2}}+\frac {1}{(1-x) \sqrt {x} \sqrt {-1-x+x^2}}-\frac {\sqrt {x}}{\sqrt {-1-x+x^2}}\right ) \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \left (-\frac {1}{\sqrt {x} \sqrt {-1-x+x^2}}+\frac {\sqrt {x}}{\sqrt {-1-x+x^2}}+\frac {1}{\sqrt {x} (1+x) \sqrt {-1-x+x^2}}\right ) \, dx}{4 \sqrt {-x-x^2+x^3}}\\ &=-\frac {\left (i \sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {1}{(-i-x) \sqrt {x} \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (i \sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {1}{\sqrt {x} (-i+x) \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {1}{(1-x) \sqrt {x} \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-x+x^2}\right ) \int \frac {1}{\sqrt {x} (1+x) \sqrt {-1-x+x^2}} \, dx}{4 \sqrt {-x-x^2+x^3}}\\ &=-\frac {\left (i \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \int \frac {1}{(-i-x) \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (i \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \int \frac {1}{\sqrt {x} (-i+x) \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \int \frac {1}{(1-x) \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}} \, dx}{4 \sqrt {-x-x^2+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \int \frac {1}{\sqrt {x} (1+x) \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}} \, dx}{4 \sqrt {-x-x^2+x^3}}\\ &=\frac {\left (i \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (i-x^2\right ) \sqrt {-1-\sqrt {5}+2 x^2} \sqrt {-1+\sqrt {5}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}+\frac {\left (i \sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (i+x^2\right ) \sqrt {-1-\sqrt {5}+2 x^2} \sqrt {-1+\sqrt {5}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (-1-x^2\right ) \sqrt {-1-\sqrt {5}+2 x^2} \sqrt {-1+\sqrt {5}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {-1-\sqrt {5}+2 x} \sqrt {-1+\sqrt {5}+2 x}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {-1-\sqrt {5}+2 x^2} \sqrt {-1+\sqrt {5}+2 x^2}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}\\ &=\frac {\left (i \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}}\right ) \text {Subst}\left (\int \frac {1}{\left (i-x^2\right ) \sqrt {-1+\sqrt {5}+2 x^2} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}+\frac {\left (i \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}}\right ) \text {Subst}\left (\int \frac {1}{\left (i+x^2\right ) \sqrt {-1+\sqrt {5}+2 x^2} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-1-x^2\right ) \sqrt {-1+\sqrt {5}+2 x^2} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}+\frac {\left (\sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {-1+\sqrt {5}+2 x^2} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x-x^2+x^3}}\\ &=-\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} \left (-1-\sqrt {5}\right );\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {-x-x^2+x^3}}+\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (-\frac {1}{2} i \left (1+\sqrt {5}\right );\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {-x-x^2+x^3}}+\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} i \left (1+\sqrt {5}\right );\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {-x-x^2+x^3}}-\frac {\sqrt {3+\sqrt {5}} \sqrt {x} \sqrt {-1+\sqrt {5}+2 x} \sqrt {1-\frac {2 x}{1+\sqrt {5}}} \Pi \left (\frac {1}{2} \left (1+\sqrt {5}\right );\sin ^{-1}\left (\sqrt {\frac {2}{1+\sqrt {5}}} \sqrt {x}\right )|\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{4 \sqrt {-x-x^2+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.56, size = 135, normalized size = 1.02 \begin {gather*} \frac {\sqrt {x} \sqrt {-1-x+x^2} \left (-2 \sqrt {5} \text {ArcTan}\left (\frac {\sqrt {x}}{\sqrt {-1-x+x^2}}\right )+\sqrt {1+2 i} \text {ArcTan}\left (\frac {\sqrt {1-2 i} \sqrt {x}}{\sqrt {-1-x+x^2}}\right )+\sqrt {1-2 i} \text {ArcTan}\left (\frac {\sqrt {1+2 i} \sqrt {x}}{\sqrt {-1-x+x^2}}\right )\right )}{4 \sqrt {5} \sqrt {x \left (-1-x+x^2\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 1.75, size = 898, normalized size = 6.75
method | result | size |
default | \(\text {Expression too large to display}\) | \(898\) |
trager | \(\text {Expression too large to display}\) | \(914\) |
elliptic | \(\text {Expression too large to display}\) | \(1436\) |
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 [B] Leaf count of result is larger than twice the leaf count of optimal. 2485 vs.
\(2 (97) = 194\).
time = 0.67, size = 2485, normalized size = 18.68 \begin {gather*} \text {Too large to display} \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 {x^{2}}{\sqrt {x \left (x^{2} - x - 1\right )} \left (x - 1\right ) \left (x + 1\right ) \left (x^{2} + 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.06, size = 533, normalized size = 4.01 \begin {gather*} -\frac {\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\sqrt {\frac {x+\frac {\sqrt {5}}{2}-\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\,\sqrt {\frac {\frac {\sqrt {5}}{2}-x+\frac {1}{2}}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\Pi \left (-\frac {\sqrt {5}}{2}-\frac {1}{2};\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )}{2\,\sqrt {x^3-x^2-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,x}}-\frac {\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\sqrt {\frac {x+\frac {\sqrt {5}}{2}-\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\,\sqrt {\frac {\frac {\sqrt {5}}{2}-x+\frac {1}{2}}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\Pi \left (\frac {\sqrt {5}}{2}+\frac {1}{2};\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )}{2\,\sqrt {x^3-x^2-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,x}}+\frac {\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\sqrt {\frac {x+\frac {\sqrt {5}}{2}-\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\,\sqrt {\frac {\frac {\sqrt {5}}{2}-x+\frac {1}{2}}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\Pi \left (-\frac {\sqrt {5}\,1{}\mathrm {i}}{2}-\frac {1}{2}{}\mathrm {i};\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )}{2\,\sqrt {x^3-x^2-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,x}}+\frac {\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\sqrt {\frac {x+\frac {\sqrt {5}}{2}-\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}}\,\sqrt {\frac {\frac {\sqrt {5}}{2}-x+\frac {1}{2}}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\,\Pi \left (\frac {\sqrt {5}\,1{}\mathrm {i}}{2}+\frac {1}{2}{}\mathrm {i};\mathrm {asin}\left (\sqrt {\frac {x}{\frac {\sqrt {5}}{2}+\frac {1}{2}}}\right )\middle |-\frac {\frac {\sqrt {5}}{2}+\frac {1}{2}}{\frac {\sqrt {5}}{2}-\frac {1}{2}}\right )}{2\,\sqrt {x^3-x^2-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right )\,\left (\frac {\sqrt {5}}{2}+\frac {1}{2}\right )\,x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________