Optimal. Leaf size=21 \[ -\frac {2 \sqrt {-x+x^4}}{(-1+x) x} \]
[Out]
________________________________________________________________________________________
Rubi [F]
time = 0.84, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps
used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {}
\begin {gather*} \int \frac {-1+2 x+2 x^2}{(-1+x) x \sqrt {-x+x^4}} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {align*} \int \frac {-1+2 x+2 x^2}{(-1+x) x \sqrt {-x+x^4}} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1+x^3}\right ) \int \frac {-1+2 x+2 x^2}{(-1+x) x^{3/2} \sqrt {-1+x^3}} \, dx}{\sqrt {-x+x^4}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {-1+2 x^2+2 x^4}{x^2 \left (-1+x^2\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \left (\frac {2}{\sqrt {-1+x^6}}+\frac {1}{x^2 \sqrt {-1+x^6}}+\frac {3}{\left (-1+x^2\right ) \sqrt {-1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{x^2 \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}+\frac {\left (4 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}+\frac {\left (6 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}\\ &=-\frac {2 \left (1-x^3\right )}{\sqrt {-x+x^4}}+\frac {2 (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}-\frac {\left (4 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {x^4}{\sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}+\frac {\left (6 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \left (\frac {1}{2 (-1+x) \sqrt {-1+x^6}}-\frac {1}{2 (1+x) \sqrt {-1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}\\ &=-\frac {2 \left (1-x^3\right )}{\sqrt {-x+x^4}}+\frac {2 (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}+\frac {\left (2 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {-1+\sqrt {3}-2 x^4}{\sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}+\frac {\left (3 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}-\frac {\left (3 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{(1+x) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}-\frac {\left (2 \left (-1+\sqrt {3}\right ) \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}\\ &=-\frac {2 \left (1-x^3\right )}{\sqrt {-x+x^4}}-\frac {2 \left (1+\sqrt {3}\right ) x \left (1-x^3\right )}{\left (1-\left (1+\sqrt {3}\right ) x\right ) \sqrt {-x+x^4}}+\frac {2 \sqrt [4]{3} (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} E\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}+\frac {2 (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}+\frac {\left (1-\sqrt {3}\right ) (1-x) x \sqrt {\frac {1+x+x^2}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} F\left (\cos ^{-1}\left (\frac {1-\left (1-\sqrt {3}\right ) x}{1-\left (1+\sqrt {3}\right ) x}\right )|\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {-\frac {(1-x) x}{\left (1-\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {-x+x^4}}+\frac {\left (3 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}-\frac {\left (3 \sqrt {x} \sqrt {-1+x^3}\right ) \text {Subst}\left (\int \frac {1}{(1+x) \sqrt {-1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^4}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 7.63, size = 19, normalized size = 0.90 \begin {gather*} -\frac {2 \left (1+x+x^2\right )}{\sqrt {x \left (-1+x^3\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(41\) vs.
\(2(19)=38\).
time = 1.72, size = 42, normalized size = 2.00
method | result | size |
gosper | \(-\frac {2 \left (x^{2}+x +1\right )}{\sqrt {x^{4}-x}}\) | \(18\) |
trager | \(-\frac {2 \sqrt {x^{4}-x}}{\left (-1+x \right ) x}\) | \(20\) |
default | \(\frac {2 x^{3}-2}{\sqrt {x \left (x^{3}-1\right )}}-\frac {2 \left (x^{3}+x^{2}+x \right )}{\sqrt {\left (-1+x \right ) \left (x^{3}+x^{2}+x \right )}}\) | \(42\) |
elliptic | \(\frac {2 x^{3}-2}{\sqrt {x \left (x^{3}-1\right )}}-\frac {2 \left (x^{3}+x^{2}+x \right )}{\sqrt {\left (-1+x \right ) \left (x^{3}+x^{2}+x \right )}}\) | \(42\) |
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.35, size = 20, normalized size = 0.95 \begin {gather*} -\frac {2 \, \sqrt {x^{4} - x}}{x^{2} - 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 \frac {2 x^{2} + 2 x - 1}{x \sqrt {x \left (x - 1\right ) \left (x^{2} + x + 1\right )} \left (x - 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.19, size = 19, normalized size = 0.90 \begin {gather*} -\frac {2\,\sqrt {x^4-x}}{x\,\left (x-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________