Optimal. Leaf size=34 \[ -\frac {2 \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x^3+x^2+x}}{x^2+x+1}\right )}{\sqrt {3}} \]
________________________________________________________________________________________
Rubi [A] time = 0.41, antiderivative size = 56, normalized size of antiderivative = 1.65, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2056, 6733, 1698, 207} \begin {gather*} -\frac {2 \sqrt {x} \sqrt {x^2+x+1} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x}}{\sqrt {x^2+x+1}}\right )}{\sqrt {3} \sqrt {x^3+x^2+x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 1698
Rule 2056
Rule 6733
Rubi steps
\begin {align*} \int \frac {1+x}{(-1+x) \sqrt {x+x^2+x^3}} \, dx &=\frac {\left (\sqrt {x} \sqrt {1+x+x^2}\right ) \int \frac {1+x}{(-1+x) \sqrt {x} \sqrt {1+x+x^2}} \, dx}{\sqrt {x+x^2+x^3}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {1+x+x^2}\right ) \operatorname {Subst}\left (\int \frac {1+x^2}{\left (-1+x^2\right ) \sqrt {1+x^2+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^2+x^3}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {1+x+x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{-1+3 x^2} \, dx,x,\frac {\sqrt {x}}{\sqrt {1+x+x^2}}\right )}{\sqrt {x+x^2+x^3}}\\ &=-\frac {2 \sqrt {x} \sqrt {1+x+x^2} \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x}}{\sqrt {1+x+x^2}}\right )}{\sqrt {3} \sqrt {x+x^2+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 2.28, size = 632, normalized size = 18.59 \begin {gather*} -\frac {2 (-1)^{2/3} \left (\frac {1}{x}-1\right ) \sqrt {x} (x+1) \left (\sqrt [3]{-1} \left (\sqrt [3]{-1}-1\right )^2 \left (1+\sqrt [3]{-1}\right ) \sqrt {1-\frac {(-1)^{2/3}}{x}} \sqrt {\frac {x+\sqrt [3]{-1}}{x}} F\left (i \sinh ^{-1}\left (\frac {(-1)^{5/6}}{\sqrt {x}}\right )|(-1)^{2/3}\right )+\frac {2 i \sqrt {3} \sqrt {\frac {\sqrt {x}-\sqrt [3]{-1}+1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}} \sqrt {\frac {(-1)^{2/3} \sqrt {x}-1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}} \sqrt {-\frac {(-1)^{2/3} \sqrt {x}+1}{\sqrt {x}+\sqrt [3]{-1}-1}} \left (\sqrt [3]{-1} \sqrt {x}-1\right )^2 \left (\left (1+\sqrt [3]{-1}\right ) F\left (\left .\sin ^{-1}\left (\sqrt {\frac {\sqrt {x}-\sqrt [3]{-1}+1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}}\right )\right |-3\right )-2 \sqrt [3]{-1} \Pi \left (-1;\left .\sin ^{-1}\left (\sqrt {\frac {\sqrt {x}-\sqrt [3]{-1}+1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}}\right )\right |-3\right )\right )}{x}-\frac {2 i \sqrt {3} \sqrt {\frac {\sqrt {x}-\sqrt [3]{-1}+1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}} \sqrt {\frac {(-1)^{2/3} \sqrt {x}-1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}} \sqrt {-\frac {(-1)^{2/3} \sqrt {x}+1}{\sqrt {x}+\sqrt [3]{-1}-1}} \left (\sqrt [3]{-1} \sqrt {x}-1\right )^2 \left (\left (\sqrt [3]{-1}-1\right ) F\left (\left .\sin ^{-1}\left (\sqrt {\frac {\sqrt {x}-\sqrt [3]{-1}+1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}}\right )\right |-3\right )-2 \sqrt [3]{-1} \Pi \left (3;\left .\sin ^{-1}\left (\sqrt {\frac {\sqrt {x}-\sqrt [3]{-1}+1}{\left (1+\sqrt [3]{-1}\right ) \left (\sqrt [3]{-1} \sqrt {x}-1\right )}}\right )\right |-3\right )\right )}{x}\right )}{\left ((-1)^{2/3}-1\right ) \left (\frac {1}{x^2}-1\right ) \sqrt {x \left (x^2+x+1\right )}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.08, size = 34, normalized size = 1.00 \begin {gather*} -\frac {2 \tanh ^{-1}\left (\frac {\sqrt {3} \sqrt {x+x^2+x^3}}{1+x+x^2}\right )}{\sqrt {3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.51, size = 68, normalized size = 2.00 \begin {gather*} \frac {1}{6} \, \sqrt {3} \log \left (\frac {x^{4} + 20 \, x^{3} - 4 \, \sqrt {3} \sqrt {x^{3} + x^{2} + x} {\left (x^{2} + 4 \, x + 1\right )} + 30 \, x^{2} + 20 \, x + 1}{x^{4} - 4 \, x^{3} + 6 \, x^{2} - 4 \, 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 {x + 1}{\sqrt {x^{3} + x^{2} + x} {\left (x - 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.32, size = 54, normalized size = 1.59
method | result | size |
trager | \(-\frac {\RootOf \left (\textit {\_Z}^{2}-3\right ) \ln \left (\frac {\RootOf \left (\textit {\_Z}^{2}-3\right ) x^{2}+4 \RootOf \left (\textit {\_Z}^{2}-3\right ) x +\RootOf \left (\textit {\_Z}^{2}-3\right )+6 \sqrt {x^{3}+x^{2}+x}}{\left (-1+x \right )^{2}}\right )}{3}\) | \(54\) |
default | \(\frac {2 \left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}\, \sqrt {3}\, \sqrt {i \left (x +\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}\, \sqrt {\frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}, \frac {\sqrt {3}\, \sqrt {i \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}}{3}\right )}{3 \sqrt {x^{3}+x^{2}+x}}+\frac {4 \left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}\, \sqrt {3}\, \sqrt {i \left (x +\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}\, \sqrt {\frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}}}\, \EllipticPi \left (\sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}, \frac {-\frac {1}{2}-\frac {i \sqrt {3}}{2}}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}, \frac {\sqrt {3}\, \sqrt {i \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}}{3}\right )}{3 \sqrt {x^{3}+x^{2}+x}\, \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}\) | \(271\) |
elliptic | \(\frac {2 \left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}\, \sqrt {3}\, \sqrt {i \left (x +\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}\, \sqrt {\frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}, \frac {\sqrt {3}\, \sqrt {i \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}}{3}\right )}{3 \sqrt {x^{3}+x^{2}+x}}+\frac {4 \left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}\, \sqrt {3}\, \sqrt {i \left (x +\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}\, \sqrt {\frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}}}\, \EllipticPi \left (\sqrt {\frac {x +\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\frac {1}{2}+\frac {i \sqrt {3}}{2}}}, \frac {-\frac {1}{2}-\frac {i \sqrt {3}}{2}}{-\frac {3}{2}-\frac {i \sqrt {3}}{2}}, \frac {\sqrt {3}\, \sqrt {i \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {3}}}{3}\right )}{3 \sqrt {x^{3}+x^{2}+x}\, \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}\) | \(271\) |
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 {x + 1}{\sqrt {x^{3} + x^{2} + x} {\left (x - 1\right )}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.32, size = 179, normalized size = 5.26 \begin {gather*} \frac {\sqrt {\frac {x}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {-\frac {x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\sqrt {\frac {x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\,\left (\sqrt {3}+1{}\mathrm {i}\right )\,\left (\mathrm {F}\left (\mathrm {asin}\left (\sqrt {\frac {x}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )-2\,\Pi \left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2};\mathrm {asin}\left (\sqrt {\frac {x}{-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}}\right )\middle |-\frac {-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}{\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}}\right )\right )\,1{}\mathrm {i}}{\sqrt {x^3+x^2-\left (-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,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 {x + 1}{\sqrt {x \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]
________________________________________________________________________________________