Optimal. Leaf size=32 \[ \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {x^4+x}}{x^2-x+1}\right ) \]
________________________________________________________________________________________
Rubi [F] time = 2.08, 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}{\left (-1+3 x+x^2\right ) \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}{\left (-1+3 x+x^2\right ) \sqrt {x+x^4}} \, dx &=\frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \frac {-1-2 x+2 x^2}{\sqrt {x} \left (-1+3 x+x^2\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}\\ &=\frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \left (\frac {2}{\sqrt {x} \sqrt {1+x^3}}+\frac {1-8 x}{\sqrt {x} \left (-1+3 x+x^2\right ) \sqrt {1+x^3}}\right ) \, dx}{\sqrt {x+x^4}}\\ &=\frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1-8 x}{\sqrt {x} \left (-1+3 x+x^2\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}+\frac {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}\\ &=\frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \left (\frac {-8+2 \sqrt {13}}{\sqrt {x} \left (3-\sqrt {13}+2 x\right ) \sqrt {1+x^3}}+\frac {-8-2 \sqrt {13}}{\sqrt {x} \left (3+\sqrt {13}+2 x\right ) \sqrt {1+x^3}}\right ) \, dx}{\sqrt {x+x^4}}+\frac {\left (4 \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}\\ &=\frac {2 x (1+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 {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (2 \left (4-\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (3-\sqrt {13}+2 x\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}-\frac {\left (2 \left (4+\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (3+\sqrt {13}+2 x\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}\\ &=\frac {2 x (1+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 {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (4 \left (4-\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (3-\sqrt {13}+2 x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}-\frac {\left (4 \left (4+\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (3+\sqrt {13}+2 x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}\\ &=\frac {2 x (1+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 {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (4 \left (4-\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \left (\frac {\sqrt {-3+\sqrt {13}}}{2 \left (3-\sqrt {13}\right ) \left (\sqrt {-3+\sqrt {13}}-\sqrt {2} x\right ) \sqrt {1+x^6}}+\frac {\sqrt {-3+\sqrt {13}}}{2 \left (3-\sqrt {13}\right ) \left (\sqrt {-3+\sqrt {13}}+\sqrt {2} x\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}-\frac {\left (4 \left (4+\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \left (\frac {i}{2 \sqrt {3+\sqrt {13}} \left (i \sqrt {3+\sqrt {13}}-\sqrt {2} x\right ) \sqrt {1+x^6}}+\frac {i}{2 \sqrt {3+\sqrt {13}} \left (i \sqrt {3+\sqrt {13}}+\sqrt {2} x\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}\\ &=\frac {2 x (1+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 {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}+\frac {\left (2 \left (4-\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (\sqrt {-3+\sqrt {13}}-\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-3+\sqrt {13}} \sqrt {x+x^4}}+\frac {\left (2 \left (4-\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (\sqrt {-3+\sqrt {13}}+\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {-3+\sqrt {13}} \sqrt {x+x^4}}-\frac {\left (2 i \left (4+\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (i \sqrt {3+\sqrt {13}}-\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {3+\sqrt {13}} \sqrt {x+x^4}}-\frac {\left (2 i \left (4+\sqrt {13}\right ) \sqrt {x} \sqrt {1+x^3}\right ) \operatorname {Subst}\left (\int \frac {1}{\left (i \sqrt {3+\sqrt {13}}+\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {3+\sqrt {13}} \sqrt {x+x^4}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.24, size = 298, normalized size = 9.31 \begin {gather*} -\frac {2 \sqrt {\frac {1}{x^2}-\frac {1}{x}+1} \sqrt {\frac {\frac {1}{x}+1}{1+\sqrt [3]{-1}}} x^2 \left (\frac {\sqrt {3} \left (-i \sqrt {3} x+\sqrt [3]{-1}+1\right ) F\left (\sin ^{-1}\left (\sqrt {\frac {x+(-1)^{2/3}}{\left (1+\sqrt [3]{-1}\right ) x}}\right )|\sqrt [3]{-1}\right )}{x+(-1)^{2/3}}-\frac {6 i \left (\left (-1+5 \sqrt [3]{-1}+\sqrt {13}+\sqrt [3]{-1} \sqrt {13}\right ) \Pi \left (\frac {2 \sqrt {3}}{2 i+\sqrt {3}+i \sqrt {13}};\sin ^{-1}\left (\sqrt {\frac {x+(-1)^{2/3}}{\left (1+\sqrt [3]{-1}\right ) x}}\right )|\sqrt [3]{-1}\right )-\left (1-5 \sqrt [3]{-1}+\sqrt {13}+\sqrt [3]{-1} \sqrt {13}\right ) \Pi \left (\frac {2 i \sqrt {3}}{-3+2 \sqrt [3]{-1}+\sqrt {13}};\sin ^{-1}\left (\sqrt {\frac {x+(-1)^{2/3}}{\left (1+\sqrt [3]{-1}\right ) x}}\right )|\sqrt [3]{-1}\right )\right )}{-12-4 i \sqrt {3}}\right )}{3 \sqrt {x^4+x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 1.38, size = 32, normalized size = 1.00 \begin {gather*} \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {x+x^4}}{1-x+x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.54, size = 68, normalized size = 2.12 \begin {gather*} \frac {1}{4} \, \sqrt {2} \log \left (-\frac {17 \, x^{4} + 6 \, x^{3} + 4 \, \sqrt {2} \sqrt {x^{4} + x} {\left (3 \, x^{2} + x + 1\right )} + 7 \, x^{2} + 10 \, x + 1}{x^{4} + 6 \, x^{3} + 7 \, x^{2} - 6 \, x + 1}\right ) \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*} \int \frac {2 \, x^{2} - 2 \, x - 1}{\sqrt {x^{4} + x} {\left (x^{2} + 3 \, x - 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.39, size = 56, normalized size = 1.75
method | result | size |
trager | \(\frac {\RootOf \left (\textit {\_Z}^{2}-2\right ) \ln \left (\frac {3 \RootOf \left (\textit {\_Z}^{2}-2\right ) x^{2}+\RootOf \left (\textit {\_Z}^{2}-2\right ) x +\RootOf \left (\textit {\_Z}^{2}-2\right )+4 \sqrt {x^{4}+x}}{x^{2}+3 x -1}\right )}{2}\) | \(56\) |
default | \(\text {Expression too large to display}\) | \(13798\) |
elliptic | \(\text {Expression too large to display}\) | \(15100\) |
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*} \int \frac {2 \, x^{2} - 2 \, x - 1}{\sqrt {x^{4} + x} {\left (x^{2} + 3 \, x - 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int -\frac {-2\,x^2+2\,x+1}{\sqrt {x^4+x}\,\left (x^2+3\,x-1\right )} \,d 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}{\sqrt {x \left (x + 1\right ) \left (x^{2} - x + 1\right )} \left (x^{2} + 3 x - 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________