Optimal. Leaf size=58 \[ -\frac {15}{4} \text {ArcTan}\left (\frac {2 \sqrt {-x+x^3}}{-1-2 x+x^2}\right )-\frac {13}{4} \tanh ^{-1}\left (\frac {-\frac {1}{2}+x+\frac {x^2}{2}}{\sqrt {-x+x^3}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.47, antiderivative size = 183, normalized size of antiderivative = 3.16, number of steps
used = 13, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2081, 6857,
335, 228, 947, 174, 551} \begin {gather*} \frac {7 \sqrt {2} \sqrt {x-1} \sqrt {x} \sqrt {x+1} F\left (\text {ArcSin}\left (\frac {\sqrt {2} \sqrt {x}}{\sqrt {x-1}}\right )|\frac {1}{2}\right )}{\sqrt {x^3-x}}+\frac {\left (\frac {13}{2}+\frac {15 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}-\frac {i}{2};\text {ArcSin}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {x^3-x}}+\frac {\left (\frac {13}{2}-\frac {15 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}+\frac {i}{2};\text {ArcSin}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {x^3-x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 174
Rule 228
Rule 335
Rule 551
Rule 947
Rule 2081
Rule 6857
Rubi steps
\begin {align*} \int \frac {-7+x+7 x^2}{\left (1+x^2\right ) \sqrt {-x+x^3}} \, dx &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {-7+x+7 x^2}{\sqrt {x} \sqrt {-1+x^2} \left (1+x^2\right )} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \left (\frac {7}{\sqrt {x} \sqrt {-1+x^2}}-\frac {14-x}{\sqrt {x} \sqrt {-1+x^2} \left (1+x^2\right )}\right ) \, dx}{\sqrt {-x+x^3}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {14-x}{\sqrt {x} \sqrt {-1+x^2} \left (1+x^2\right )} \, dx}{\sqrt {-x+x^3}}+\frac {\left (7 \sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{\sqrt {x} \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-1+x^2}\right ) \int \left (\frac {\frac {1}{2}+7 i}{(i-x) \sqrt {x} \sqrt {-1+x^2}}-\frac {\frac {1}{2}-7 i}{\sqrt {x} (i+x) \sqrt {-1+x^2}}\right ) \, dx}{\sqrt {-x+x^3}}+\frac {\left (14 \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 {7 \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 (\left (\frac {1}{2}-7 i\right ) \sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{\sqrt {x} (i+x) \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}-\frac {\left (\left (\frac {1}{2}+7 i\right ) \sqrt {x} \sqrt {-1+x^2}\right ) \int \frac {1}{(i-x) \sqrt {x} \sqrt {-1+x^2}} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {7 \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 (\left (\frac {1}{2}-7 i\right ) \sqrt {x} \sqrt {1-x^2}\right ) \int \frac {1}{\sqrt {1-x} \sqrt {x} (i+x) \sqrt {1+x}} \, dx}{\sqrt {-x+x^3}}-\frac {\left (\left (\frac {1}{2}+7 i\right ) \sqrt {x} \sqrt {1-x^2}\right ) \int \frac {1}{(i-x) \sqrt {1-x} \sqrt {x} \sqrt {1+x}} \, dx}{\sqrt {-x+x^3}}\\ &=\frac {7 \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 ((1+14 i) \sqrt {x} \sqrt {1-x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {2-x^2} \left ((-1+i)+x^2\right )} \, dx,x,\sqrt {1-x}\right )}{\sqrt {-x+x^3}}-\frac {\left ((1-14 i) \sqrt {x} \sqrt {1-x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \left ((1+i)-x^2\right ) \sqrt {2-x^2}} \, dx,x,\sqrt {1-x}\right )}{\sqrt {-x+x^3}}\\ &=\frac {7 \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 (\frac {13}{2}+\frac {15 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}-\frac {i}{2};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {-x+x^3}}+\frac {\left (\frac {13}{2}-\frac {15 i}{2}\right ) \sqrt {x} \sqrt {1-x^2} \Pi \left (\frac {1}{2}+\frac {i}{2};\sin ^{-1}\left (\sqrt {1-x}\right )|\frac {1}{2}\right )}{\sqrt {2} \sqrt {-x+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.31, size = 84, normalized size = 1.45 \begin {gather*} \frac {\left (\frac {1}{4}+\frac {i}{4}\right ) \sqrt {x} \sqrt {-1+x^2} \left ((-1+14 i) \text {ArcTan}\left (\frac {(1+i) \sqrt {x}}{\sqrt {-1+x^2}}\right )+(14-i) \text {ArcTan}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {-1+x^2}}{\sqrt {x}}\right )\right )}{\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.76, size = 211, normalized size = 3.64
method | result | size |
default | \(\frac {7 \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticF \left (\sqrt {1+x}, \frac {\sqrt {2}}{2}\right )}{\sqrt {x^{3}-x}}-\frac {15 \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 {13 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 {15 \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 {13 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}}\) | \(211\) |
elliptic | \(\frac {7 \sqrt {1+x}\, \sqrt {2-2 x}\, \sqrt {-x}\, \EllipticF \left (\sqrt {1+x}, \frac {\sqrt {2}}{2}\right )}{\sqrt {x^{3}-x}}-\frac {15 \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 {13 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 {15 \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 {13 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}}\) | \(211\) |
trager | \(\frac {\RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) \ln \left (\frac {-928 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2} x^{2}+1392 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2} x +3782 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x^{2}+12000 \sqrt {x^{3}-x}\, \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )+928 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2}-16548 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x -1477 x^{2}-50250 \sqrt {x^{3}-x}-3782 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )+41778 x +1477}{\left (4 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x -8 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )-43 x +11\right )^{2}}\right )}{2}+\frac {13 \ln \left (-\frac {464 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2} x^{2}-696 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2} x -4141 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x^{2}+6000 \sqrt {x^{3}-x}\, \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )-464 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2}+774 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x +8051 x^{2}-13875 \sqrt {x^{3}-x}+4141 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )+3486 x -8051}{\left (4 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x -8 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )+17 x +41\right )^{2}}\right )}{4}-\frac {\ln \left (-\frac {464 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2} x^{2}-696 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2} x -4141 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x^{2}+6000 \sqrt {x^{3}-x}\, \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )-464 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )^{2}+774 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x +8051 x^{2}-13875 \sqrt {x^{3}-x}+4141 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )+3486 x -8051}{\left (4 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right ) x -8 \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )+17 x +41\right )^{2}}\right ) \RootOf \left (8 \textit {\_Z}^{2}-52 \textit {\_Z} +197\right )}{2}\) | \(545\) |
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.37, size = 76, normalized size = 1.31 \begin {gather*} \frac {15}{4} \, \arctan \left (\frac {x^{2} - 2 \, x - 1}{2 \, \sqrt {x^{3} - x}}\right ) + \frac {13}{8} \, \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 ) \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 {7 x^{2} + x - 7}{\sqrt {x \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.56, size = 100, normalized size = 1.72 \begin {gather*} \frac {-14\,\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\mathrm {F}\left (\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )+\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (-\mathrm {i};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )\,\left (14+1{}\mathrm {i}\right )+\sqrt {-x}\,\sqrt {1-x}\,\sqrt {x+1}\,\Pi \left (1{}\mathrm {i};\mathrm {asin}\left (\sqrt {-x}\right )\middle |-1\right )\,\left (14-\mathrm {i}\right )}{\sqrt {x^3-x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________