Optimal. Leaf size=79 \[ \frac {\sqrt {-x+x^3}}{1-x^2}-\frac {1}{4} \text {ArcTan}\left (\frac {2 \sqrt {-x+x^3}}{-1-2 x+x^2}\right )-\frac {1}{4} \tanh ^{-1}\left (\frac {-\frac {1}{2}+x+\frac {x^2}{2}}{\sqrt {-x+x^3}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains complex when optimal does not.
time = 0.41, antiderivative size = 119, normalized size of antiderivative = 1.51, number of steps
used = 18, number of rules used = 12, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2081, 6847,
6857, 228, 1418, 425, 537, 418, 1225, 1713, 212, 209} \begin {gather*} -\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) \sqrt {x^2-1} \sqrt {x} \text {ArcTan}\left (\frac {(1+i) \sqrt {x}}{\sqrt {x^2-1}}\right )}{\sqrt {x^3-x}}-\frac {x}{\sqrt {x^3-x}}-\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) \sqrt {x^2-1} \sqrt {x} \tanh ^{-1}\left (\frac {(1+i) \sqrt {x}}{\sqrt {x^2-1}}\right )}{\sqrt {x^3-x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 228
Rule 418
Rule 425
Rule 537
Rule 1225
Rule 1418
Rule 1713
Rule 2081
Rule 6847
Rule 6857
Rubi steps
\begin {align*} \int \frac {1+x^4}{\sqrt {-x+x^3} \left (-1+x^4\right )} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1+x^4}{\sqrt {x} \sqrt {-1+x^2} \left (-1+x^4\right )} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1+x^8}{\sqrt {-1+x^4} \left (-1+x^8\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \left (\frac {1}{\sqrt {-1+x^4}}+\frac {2}{\sqrt {-1+x^4} \left (-1+x^8\right )}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}+\frac {\left (4 \sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^4} \left (-1+x^8\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}+\frac {\left (4 \sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+x^4\right )^{3/2} \left (1+x^4\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=-\frac {x}{\sqrt {-x+x^3}}+\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}+\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {-3-x^4}{\sqrt {-1+x^4} \left (1+x^4\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=-\frac {x}{\sqrt {-x+x^3}}+\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}-\frac {\left (2 \sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^4} \left (1+x^4\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=-\frac {x}{\sqrt {-x+x^3}}-\frac {\sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {-x+x^3}}+\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\left (1-i x^2\right ) \sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\left (1+i x^2\right ) \sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {-x+x^3}}\\ &=-\frac {x}{\sqrt {-x+x^3}}-\frac {\sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {-x+x^3}}+\frac {\sqrt {2} \sqrt {-1+x} \sqrt {x} \sqrt {1+x} F\left (\sin ^{-1}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {-1+x}}\right )|\frac {1}{2}\right )}{\sqrt {-x+x^3}}-2 \frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1-i x^2}{\left (1+i x^2\right ) \sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1+i x^2}{\left (1-i x^2\right ) \sqrt {-1+x^4}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {-x+x^3}}\\ &=-\frac {x}{\sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{1-2 i x^2} \, dx,x,\frac {\sqrt {x}}{\sqrt {-1+x^2}}\right )}{2 \sqrt {-x+x^3}}-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \text {Subst}\left (\int \frac {1}{1+2 i x^2} \, dx,x,\frac {\sqrt {x}}{\sqrt {-1+x^2}}\right )}{2 \sqrt {-x+x^3}}\\ &=-\frac {x}{\sqrt {-x+x^3}}-\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) \sqrt {x} \sqrt {-1+x^2} \tan ^{-1}\left (\frac {(1+i) \sqrt {x}}{\sqrt {-1+x^2}}\right )}{\sqrt {-x+x^3}}-\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) \sqrt {x} \sqrt {-1+x^2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {x}}{\sqrt {-1+x^2}}\right )}{\sqrt {-x+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.27, size = 97, normalized size = 1.23 \begin {gather*} \frac {-4 x-(1-i) \sqrt {x} \sqrt {-1+x^2} \text {ArcTan}\left (\frac {(1+i) \sqrt {x}}{\sqrt {-1+x^2}}\right )+(1+i) \sqrt {x} \sqrt {-1+x^2} \text {ArcTan}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {-1+x^2}}{\sqrt {x}}\right )}{4 \sqrt {x \left (-1+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.85, size = 251, normalized size = 3.18
method | result | size |
risch | \(-\frac {x}{\sqrt {x \left (x^{2}-1\right )}}+\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticF \left (\sqrt {1+x}, \frac {\sqrt {2}}{2}\right )}{2 \sqrt {x^{3}-x}}-\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}+\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}\) | \(223\) |
elliptic | \(-\frac {x}{\sqrt {x \left (x^{2}-1\right )}}+\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticF \left (\sqrt {1+x}, \frac {\sqrt {2}}{2}\right )}{2 \sqrt {x^{3}-x}}-\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}+\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}\) | \(223\) |
default | \(\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticF \left (\sqrt {1+x}, \frac {\sqrt {2}}{2}\right )}{2 \sqrt {x^{3}-x}}-\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}-\frac {\sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}+\frac {i \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticPi \left (\sqrt {1+x}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right )}{4 \sqrt {x^{3}-x}}+\frac {x^{2}-x}{2 \sqrt {\left (1+x \right ) \left (x^{2}-x \right )}}-\frac {x^{2}+x}{2 \sqrt {\left (-1+x \right ) \left (x^{2}+x \right )}}\) | \(251\) |
trager | \(-\frac {\sqrt {x^{3}-x}}{x^{2}-1}+9 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) \ln \left (\frac {-150336 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}+225504 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x +2826 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}+7200 \sqrt {x^{3}-x}\, \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+150336 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}-10764 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x -8 x^{2}-125 \sqrt {x^{3}-x}-2826 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+112 x +8}{\left (72 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x -144 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-3 x +1\right )^{2}}\right )+\frac {\ln \left (-\frac {300672 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}-451008 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x -11052 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}+14400 \sqrt {x^{3}-x}\, \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-300672 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}+3528 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x +91 x^{2}-150 \sqrt {x^{3}-x}+11052 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+26 x -91}{\left (72 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x -144 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+x +3\right )^{2}}\right )}{4}-9 \ln \left (-\frac {300672 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x^{2}-451008 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2} x -11052 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x^{2}+14400 \sqrt {x^{3}-x}\, \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )-300672 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )^{2}+3528 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x +91 x^{2}-150 \sqrt {x^{3}-x}+11052 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+26 x -91}{\left (72 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right ) x -144 \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )+x +3\right )^{2}}\right ) \RootOf \left (2592 \textit {\_Z}^{2}-72 \textit {\_Z} +1\right )\) | \(559\) |
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.38, size = 105, normalized size = 1.33 \begin {gather*} \frac {2 \, {\left (x^{2} - 1\right )} \arctan \left (\frac {x^{2} - 2 \, x - 1}{2 \, \sqrt {x^{3} - x}}\right ) + {\left (x^{2} - 1\right )} \log \left (\frac {x^{4} + 8 \, x^{3} + 2 \, x^{2} - 4 \, \sqrt {x^{3} - x} {\left (x^{2} + 2 \, x - 1\right )} - 8 \, x + 1}{x^{4} + 2 \, x^{2} + 1}\right ) - 8 \, \sqrt {x^{3} - x}}{8 \, {\left (x^{2} - 1\right )}} \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^{4} + 1}{\sqrt {x \left (x - 1\right ) \left (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.76, size = 232, normalized size = 2.94 \begin {gather*} \frac {\sqrt {-x}\,\left (\frac {\sin \left (2\,\mathrm {asin}\left (\sqrt {-x}\right )\right )}{4\,\sqrt {1-x}}+\frac {\mathrm {E}\left (\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{2}\right )\,\sqrt {1-x}\,\sqrt {x+1}}{\sqrt {x^3-x}}+\frac {\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (-\mathrm {i};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{\sqrt {x^3-x}}+\frac {\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (1{}\mathrm {i};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{\sqrt {x^3-x}}-\frac {2\,\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\mathrm {F}\left (\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{\sqrt {x^3-x}}+\frac {\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\left (\mathrm {F}\left (\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )-\frac {\mathrm {E}\left (\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )}{2}+\frac {\sqrt {-x}\,\sqrt {1-x}}{2\,\sqrt {x+1}}\right )}{\sqrt {x^3-x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________