Optimal. Leaf size=61 \[ -\frac {\text {ArcTan}\left (\frac {\sqrt [4]{2} \sqrt {x+x^3}}{1+x^2}\right )}{\sqrt [4]{2}}-\frac {\tanh ^{-1}\left (\frac {\sqrt [4]{2} \sqrt {x+x^3}}{1+x^2}\right )}{\sqrt [4]{2}} \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.75, antiderivative size = 386, normalized size of antiderivative = 6.33, number of steps
used = 23, number of rules used = 9, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.409, Rules used = {2081, 1600,
6847, 6857, 415, 226, 418, 1231, 1721} \begin {gather*} -\frac {\sqrt {x} \sqrt {x^2+1} \text {ArcTan}\left (\frac {\sqrt [4]{2} \sqrt {x}}{\sqrt {x^2+1}}\right )}{\sqrt [4]{2} \sqrt {x^3+x}}+\frac {i \left (\sqrt {2}+(1+i)\right ) \sqrt {x} (x+1) \sqrt {\frac {x^2+1}{(x+1)^2}} F\left (2 \text {ArcTan}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{4 \sqrt {x^3+x}}+\frac {i \left (\sqrt {2}+(-1+i)\right ) \sqrt {x} (x+1) \sqrt {\frac {x^2+1}{(x+1)^2}} F\left (2 \text {ArcTan}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{4 \sqrt {x^3+x}}+\frac {\left ((-1-i)-i \sqrt {2}\right ) \sqrt {x} (x+1) \sqrt {\frac {x^2+1}{(x+1)^2}} F\left (2 \text {ArcTan}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{4 \sqrt {x^3+x}}-\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) \left (1+(-1)^{3/4}\right ) \sqrt {x} (x+1) \sqrt {\frac {x^2+1}{(x+1)^2}} F\left (2 \text {ArcTan}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{\sqrt {x^3+x}}+\frac {\sqrt {x} (x+1) \sqrt {\frac {x^2+1}{(x+1)^2}} F\left (2 \text {ArcTan}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{\sqrt {x^3+x}}-\frac {\sqrt {x} \sqrt {x^2+1} \tanh ^{-1}\left (\frac {\sqrt [4]{2} \sqrt {x}}{\sqrt {x^2+1}}\right )}{\sqrt [4]{2} \sqrt {x^3+x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 226
Rule 415
Rule 418
Rule 1231
Rule 1600
Rule 1721
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 (\sqrt {x} \sqrt {1+x^2}\right ) \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2}}{\sqrt {x} \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 {\left (-1+x^4\right ) \sqrt {1+x^4}}{1+x^8} \, 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 {\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt {1+x^4}}{i-x^4}+\frac {\left (\frac {1}{2}-\frac {i}{2}\right ) \sqrt {1+x^4}}{i+x^4}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}\\ &=-\frac {\left ((1+i) \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {\sqrt {1+x^4}}{i-x^4} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}+\frac {\left ((1-i) \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {\sqrt {1+x^4}}{i+x^4} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}\\ &=-\frac {\left (2 i \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\left (i-x^4\right ) \sqrt {1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}-\frac {\left (2 i \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {1}{\left (i+x^4\right ) \sqrt {1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}+\frac {\left ((1-i) \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 ((1+i) \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 {\sqrt {x} (1+x) \sqrt {\frac {1+x^2}{(1+x)^2}} F\left (2 \tan ^{-1}\left (\sqrt {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-\sqrt [4]{-1} 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+\sqrt [4]{-1} 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-(-1)^{3/4} 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+(-1)^{3/4} x^2\right ) \sqrt {1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}\\ &=\frac {\sqrt {x} (1+x) \sqrt {\frac {1+x^2}{(1+x)^2}} F\left (2 \tan ^{-1}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{\sqrt {x+x^3}}-\frac {\left (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt [4]{-1} \left (1-\sqrt [4]{-1}\right ) \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {1+x^2}{\left (1-\sqrt [4]{-1} x^2\right ) \sqrt {1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}-\frac {\left (\left (\frac {1}{2}+\frac {i}{2}\right ) \left (1+\sqrt [4]{-1}\right ) \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 (\left (\frac {1}{2}+\frac {i}{2}\right ) \sqrt [4]{-1} \left (1+\sqrt [4]{-1}\right ) \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {1+x^2}{\left (1+\sqrt [4]{-1} x^2\right ) \sqrt {1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}-\frac {\left (\left (\frac {1}{2}-\frac {i}{2}\right ) (-1)^{3/4} \left (1-(-1)^{3/4}\right ) \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {1+x^2}{\left (1-(-1)^{3/4} x^2\right ) \sqrt {1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}-\frac {\left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (1+(-1)^{3/4}\right ) \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 (\left (\frac {1}{2}-\frac {i}{2}\right ) (-1)^{3/4} \left (1+(-1)^{3/4}\right ) \sqrt {x} \sqrt {1+x^2}\right ) \text {Subst}\left (\int \frac {1+x^2}{\left (1+(-1)^{3/4} x^2\right ) \sqrt {1+x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^3}}-\frac {\left (\left ((1+i)-i \sqrt {2}\right ) \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 (i \left ((1+i)+\sqrt {2}\right ) \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 {\sqrt {x} \sqrt {1+x^2} \tan ^{-1}\left (\frac {\sqrt [4]{2} \sqrt {x}}{\sqrt {1+x^2}}\right )}{\sqrt [4]{2} \sqrt {x+x^3}}-\frac {\sqrt {x} \sqrt {1+x^2} \tanh ^{-1}\left (\frac {\sqrt [4]{2} \sqrt {x}}{\sqrt {1+x^2}}\right )}{\sqrt [4]{2} \sqrt {x+x^3}}+\frac {\sqrt {x} (1+x) \sqrt {\frac {1+x^2}{(1+x)^2}} F\left (2 \tan ^{-1}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{\sqrt {x+x^3}}-\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) \left (1+\sqrt [4]{-1}\right ) \sqrt {x} (1+x) \sqrt {\frac {1+x^2}{(1+x)^2}} F\left (2 \tan ^{-1}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{\sqrt {x+x^3}}-\frac {\left (\frac {1}{4}-\frac {i}{4}\right ) \left (1+(-1)^{3/4}\right ) \sqrt {x} (1+x) \sqrt {\frac {1+x^2}{(1+x)^2}} F\left (2 \tan ^{-1}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{\sqrt {x+x^3}}-\frac {\left ((1+i)-i \sqrt {2}\right ) \sqrt {x} (1+x) \sqrt {\frac {1+x^2}{(1+x)^2}} F\left (2 \tan ^{-1}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{4 \sqrt {x+x^3}}+\frac {i \left ((1+i)+\sqrt {2}\right ) \sqrt {x} (1+x) \sqrt {\frac {1+x^2}{(1+x)^2}} F\left (2 \tan ^{-1}\left (\sqrt {x}\right )|\frac {1}{2}\right )}{4 \sqrt {x+x^3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.25, size = 73, normalized size = 1.20 \begin {gather*} -\frac {\sqrt {x} \sqrt {1+x^2} \left (\text {ArcTan}\left (\frac {\sqrt [4]{2} \sqrt {x}}{\sqrt {1+x^2}}\right )+\tanh ^{-1}\left (\frac {\sqrt [4]{2} \sqrt {x}}{\sqrt {1+x^2}}\right )\right )}{\sqrt [4]{2} \sqrt {x+x^3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 2.17, size = 151, normalized size = 2.48
method | result | size |
default | \(\frac {i \sqrt {-i \left (i+x \right )}\, \sqrt {2}\, \sqrt {i \left (-i+x \right )}\, \sqrt {i x}\, \EllipticF \left (\sqrt {-i \left (i+x \right )}, \frac {\sqrt {2}}{2}\right )}{\sqrt {x^{3}+x}}+\frac {i \sqrt {2}\, \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\RootOf \left (\textit {\_Z}^{4}+1\right )}{\sum }\frac {\underline {\hspace {1.25 ex}}\alpha \left (\underline {\hspace {1.25 ex}}\alpha ^{3}-i \underline {\hspace {1.25 ex}}\alpha ^{2}-\underline {\hspace {1.25 ex}}\alpha +i\right ) \sqrt {-i \left (i+x \right )}\, \sqrt {i \left (-i+x \right )}\, \sqrt {i x}\, \EllipticPi \left (\sqrt {-i \left (i+x \right )}, -\frac {1}{2} i \underline {\hspace {1.25 ex}}\alpha ^{3}-\frac {1}{2} \underline {\hspace {1.25 ex}}\alpha ^{2}+\frac {1}{2} i \underline {\hspace {1.25 ex}}\alpha +\frac {1}{2}, \frac {\sqrt {2}}{2}\right )}{\sqrt {\left (x^{2}+1\right ) x}}\right )}{4}\) | \(151\) |
elliptic | \(\frac {i \sqrt {-i \left (i+x \right )}\, \sqrt {2}\, \sqrt {i \left (-i+x \right )}\, \sqrt {i x}\, \EllipticF \left (\sqrt {-i \left (i+x \right )}, \frac {\sqrt {2}}{2}\right )}{\sqrt {x^{3}+x}}+\frac {i \sqrt {2}\, \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\RootOf \left (\textit {\_Z}^{4}+1\right )}{\sum }\frac {\underline {\hspace {1.25 ex}}\alpha \left (\underline {\hspace {1.25 ex}}\alpha ^{3}-i \underline {\hspace {1.25 ex}}\alpha ^{2}-\underline {\hspace {1.25 ex}}\alpha +i\right ) \sqrt {-i \left (i+x \right )}\, \sqrt {i \left (-i+x \right )}\, \sqrt {i x}\, \EllipticPi \left (\sqrt {-i \left (i+x \right )}, -\frac {1}{2} i \underline {\hspace {1.25 ex}}\alpha ^{3}-\frac {1}{2} \underline {\hspace {1.25 ex}}\alpha ^{2}+\frac {1}{2} i \underline {\hspace {1.25 ex}}\alpha +\frac {1}{2}, \frac {\sqrt {2}}{2}\right )}{\sqrt {\left (x^{2}+1\right ) x}}\right )}{4}\) | \(151\) |
trager | \(-\frac {\RootOf \left (\textit {\_Z}^{4}-8\right ) \ln \left (-\frac {x^{2} \RootOf \left (\textit {\_Z}^{4}-8\right )^{5}-2 x \RootOf \left (\textit {\_Z}^{4}-8\right )^{5}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{5}-4 \RootOf \left (\textit {\_Z}^{4}-8\right )^{3} x -16 x^{2} \RootOf \left (\textit {\_Z}^{4}-8\right )+16 \RootOf \left (\textit {\_Z}^{4}-8\right ) x -16 \RootOf \left (\textit {\_Z}^{4}-8\right )-32 \sqrt {x^{3}+x}}{x^{2} \RootOf \left (\textit {\_Z}^{4}-8\right )^{2}-2 x \RootOf \left (\textit {\_Z}^{4}-8\right )^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}+4 x^{2}-4 x +4}\right )}{4}-\frac {\RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right ) \RootOf \left (\textit {\_Z}^{4}-8\right )^{4} x^{2}-2 \RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right ) \RootOf \left (\textit {\_Z}^{4}-8\right )^{4} x +\RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right ) \RootOf \left (\textit {\_Z}^{4}-8\right )^{4}+4 \RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right ) \RootOf \left (\textit {\_Z}^{4}-8\right )^{2} x -16 \RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right ) x^{2}+16 \RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right ) x -32 \sqrt {x^{3}+x}-16 \RootOf \left (\textit {\_Z}^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}\right )}{x^{2} \RootOf \left (\textit {\_Z}^{4}-8\right )^{2}-2 x \RootOf \left (\textit {\_Z}^{4}-8\right )^{2}+\RootOf \left (\textit {\_Z}^{4}-8\right )^{2}-4 x^{2}+4 x -4}\right )}{4}\) | \(351\) |
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 [B] Leaf count of result is larger than twice the leaf count of optimal. 141 vs.
\(2 (49) = 98\).
time = 0.40, size = 141, normalized size = 2.31 \begin {gather*} -\frac {1}{2} \cdot 2^{\frac {3}{4}} \arctan \left (\frac {2^{\frac {1}{4}} \sqrt {x^{3} + x}}{x^{2} + 1}\right ) - \frac {1}{8} \cdot 2^{\frac {3}{4}} \log \left (\frac {x^{4} + 4 \, x^{2} + 2 \, \sqrt {2} {\left (x^{3} + x\right )} + 2 \, \sqrt {x^{3} + x} {\left (2^{\frac {3}{4}} x + 2^{\frac {1}{4}} {\left (x^{2} + 1\right )}\right )} + 1}{x^{4} + 1}\right ) + \frac {1}{8} \cdot 2^{\frac {3}{4}} \log \left (\frac {x^{4} + 4 \, x^{2} + 2 \, \sqrt {2} {\left (x^{3} + x\right )} - 2 \, \sqrt {x^{3} + x} {\left (2^{\frac {3}{4}} x + 2^{\frac {1}{4}} {\left (x^{2} + 1\right )}\right )} + 1}{x^{4} + 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 {\left (x - 1\right ) \left (x + 1\right ) \left (x^{2} + 1\right )}{\sqrt {x \left (x^{2} + 1\right )} \left (x^{4} + 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.59, size = 234, normalized size = 3.84 \begin {gather*} -\frac {\sqrt {1-x\,1{}\mathrm {i}}\,\sqrt {1+x\,1{}\mathrm {i}}\,\sqrt {-x\,1{}\mathrm {i}}\,\Pi \left (\sqrt {2}\,\left (-\frac {1}{2}-\frac {1}{2}{}\mathrm {i}\right );\mathrm {asin}\left (\sqrt {-x\,1{}\mathrm {i}}\right )\middle |-1\right )\,1{}\mathrm {i}}{\sqrt {x^3+x}}-\frac {\sqrt {1-x\,1{}\mathrm {i}}\,\sqrt {1+x\,1{}\mathrm {i}}\,\sqrt {-x\,1{}\mathrm {i}}\,\Pi \left (\sqrt {2}\,\left (-\frac {1}{2}+\frac {1}{2}{}\mathrm {i}\right );\mathrm {asin}\left (\sqrt {-x\,1{}\mathrm {i}}\right )\middle |-1\right )\,1{}\mathrm {i}}{\sqrt {x^3+x}}-\frac {\sqrt {1-x\,1{}\mathrm {i}}\,\sqrt {1+x\,1{}\mathrm {i}}\,\sqrt {-x\,1{}\mathrm {i}}\,\Pi \left (\sqrt {2}\,\left (\frac {1}{2}-\frac {1}{2}{}\mathrm {i}\right );\mathrm {asin}\left (\sqrt {-x\,1{}\mathrm {i}}\right )\middle |-1\right )\,1{}\mathrm {i}}{\sqrt {x^3+x}}-\frac {\sqrt {1-x\,1{}\mathrm {i}}\,\sqrt {1+x\,1{}\mathrm {i}}\,\sqrt {-x\,1{}\mathrm {i}}\,\Pi \left (\sqrt {2}\,\left (\frac {1}{2}+\frac {1}{2}{}\mathrm {i}\right );\mathrm {asin}\left (\sqrt {-x\,1{}\mathrm {i}}\right )\middle |-1\right )\,1{}\mathrm {i}}{\sqrt {x^3+x}}+\frac {\sqrt {1-x\,1{}\mathrm {i}}\,\sqrt {1+x\,1{}\mathrm {i}}\,\sqrt {-x\,1{}\mathrm {i}}\,\mathrm {F}\left (\mathrm {asin}\left (\sqrt {-x\,1{}\mathrm {i}}\right )\middle |-1\right )\,2{}\mathrm {i}}{\sqrt {x^3+x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________