Optimal. Leaf size=41 \[ \frac {\sqrt {1+x^4} \left (1+6 x^2+x^4\right )}{3 x^3}-2 \tanh ^{-1}\left (\frac {x}{\sqrt {1+x^4}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.75, antiderivative size = 334, normalized size of antiderivative = 8.15, number of steps
used = 26, number of rules used = 10, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {6860, 201,
226, 283, 311, 1210, 1223, 1212, 1231, 1721} \begin {gather*} -\frac {\left (\sqrt {3}+i\right ) \left (x^2+1\right ) \sqrt {\frac {x^4+1}{\left (x^2+1\right )^2}} F\left (2 \text {ArcTan}(x)\left |\frac {1}{2}\right .\right )}{\left (\sqrt {3}+3 i\right ) \sqrt {x^4+1}}+\frac {\left (3+i \sqrt {3}\right ) \left (x^2+1\right ) \sqrt {\frac {x^4+1}{\left (x^2+1\right )^2}} F\left (2 \text {ArcTan}(x)\left |\frac {1}{2}\right .\right )}{2 \sqrt {x^4+1}}+\frac {\left (3-i \sqrt {3}\right ) \left (x^2+1\right ) \sqrt {\frac {x^4+1}{\left (x^2+1\right )^2}} F\left (2 \text {ArcTan}(x)\left |\frac {1}{2}\right .\right )}{2 \sqrt {x^4+1}}-\frac {\left (-\sqrt {3}+i\right ) \left (x^2+1\right ) \sqrt {\frac {x^4+1}{\left (x^2+1\right )^2}} F\left (2 \text {ArcTan}(x)\left |\frac {1}{2}\right .\right )}{\left (-\sqrt {3}+3 i\right ) \sqrt {x^4+1}}-\frac {2 \left (x^2+1\right ) \sqrt {\frac {x^4+1}{\left (x^2+1\right )^2}} F\left (2 \text {ArcTan}(x)\left |\frac {1}{2}\right .\right )}{\sqrt {x^4+1}}+\frac {1}{3} \sqrt {x^4+1} x+\frac {2 \sqrt {x^4+1}}{x}-2 \tanh ^{-1}\left (\frac {x}{\sqrt {x^4+1}}\right )+\frac {\sqrt {x^4+1}}{3 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 201
Rule 226
Rule 283
Rule 311
Rule 1210
Rule 1212
Rule 1223
Rule 1231
Rule 1721
Rule 6860
Rubi steps
\begin {align*} \int \frac {\left (-1+x^4\right ) \sqrt {1+x^4} \left (1+x^2+x^4\right )}{x^4 \left (1-x^2+x^4\right )} \, dx &=\int \left (\sqrt {1+x^4}-\frac {\sqrt {1+x^4}}{x^4}-\frac {2 \sqrt {1+x^4}}{x^2}+\frac {2 \left (-1+2 x^2\right ) \sqrt {1+x^4}}{1-x^2+x^4}\right ) \, dx\\ &=-\left (2 \int \frac {\sqrt {1+x^4}}{x^2} \, dx\right )+2 \int \frac {\left (-1+2 x^2\right ) \sqrt {1+x^4}}{1-x^2+x^4} \, dx+\int \sqrt {1+x^4} \, dx-\int \frac {\sqrt {1+x^4}}{x^4} \, dx\\ &=\frac {\sqrt {1+x^4}}{3 x^3}+\frac {2 \sqrt {1+x^4}}{x}+\frac {1}{3} x \sqrt {1+x^4}+2 \int \left (\frac {2 \sqrt {1+x^4}}{-1-i \sqrt {3}+2 x^2}+\frac {2 \sqrt {1+x^4}}{-1+i \sqrt {3}+2 x^2}\right ) \, dx-4 \int \frac {x^2}{\sqrt {1+x^4}} \, dx\\ &=\frac {\sqrt {1+x^4}}{3 x^3}+\frac {2 \sqrt {1+x^4}}{x}+\frac {1}{3} x \sqrt {1+x^4}-4 \int \frac {1}{\sqrt {1+x^4}} \, dx+4 \int \frac {1-x^2}{\sqrt {1+x^4}} \, dx+4 \int \frac {\sqrt {1+x^4}}{-1-i \sqrt {3}+2 x^2} \, dx+4 \int \frac {\sqrt {1+x^4}}{-1+i \sqrt {3}+2 x^2} \, dx\\ &=\frac {\sqrt {1+x^4}}{3 x^3}+\frac {2 \sqrt {1+x^4}}{x}+\frac {1}{3} x \sqrt {1+x^4}-\frac {4 x \sqrt {1+x^4}}{1+x^2}+\frac {4 \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} E\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\sqrt {1+x^4}}-\frac {2 \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} F\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\sqrt {1+x^4}}+\left (2 \left (1-i \sqrt {3}\right )\right ) \int \frac {1}{\left (-1+i \sqrt {3}+2 x^2\right ) \sqrt {1+x^4}} \, dx+\left (2 \left (1+i \sqrt {3}\right )\right ) \int \frac {1}{\left (-1-i \sqrt {3}+2 x^2\right ) \sqrt {1+x^4}} \, dx-\int \frac {-1-i \sqrt {3}-2 x^2}{\sqrt {1+x^4}} \, dx-\int \frac {-1+i \sqrt {3}-2 x^2}{\sqrt {1+x^4}} \, dx\\ &=\frac {\sqrt {1+x^4}}{3 x^3}+\frac {2 \sqrt {1+x^4}}{x}+\frac {1}{3} x \sqrt {1+x^4}-\frac {4 x \sqrt {1+x^4}}{1+x^2}+\frac {4 \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} E\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\sqrt {1+x^4}}-\frac {2 \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} F\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\sqrt {1+x^4}}-2 \left (2 \int \frac {1-x^2}{\sqrt {1+x^4}} \, dx\right )-\frac {\left (2 \left (i-\sqrt {3}\right )\right ) \int \frac {1}{\sqrt {1+x^4}} \, dx}{3 i-\sqrt {3}}+\frac {\left (4 \left (i-\sqrt {3}\right )\right ) \int \frac {1+x^2}{\left (-1-i \sqrt {3}+2 x^2\right ) \sqrt {1+x^4}} \, dx}{3 i-\sqrt {3}}-\left (-3+i \sqrt {3}\right ) \int \frac {1}{\sqrt {1+x^4}} \, dx+\left (3+i \sqrt {3}\right ) \int \frac {1}{\sqrt {1+x^4}} \, dx-\frac {\left (2 \left (i+\sqrt {3}\right )\right ) \int \frac {1}{\sqrt {1+x^4}} \, dx}{3 i+\sqrt {3}}+\frac {\left (4 \left (i+\sqrt {3}\right )\right ) \int \frac {1+x^2}{\left (-1+i \sqrt {3}+2 x^2\right ) \sqrt {1+x^4}} \, dx}{3 i+\sqrt {3}}\\ &=\frac {\sqrt {1+x^4}}{3 x^3}+\frac {2 \sqrt {1+x^4}}{x}+\frac {1}{3} x \sqrt {1+x^4}-\frac {4 x \sqrt {1+x^4}}{1+x^2}-2 \tanh ^{-1}\left (\frac {x}{\sqrt {1+x^4}}\right )+\frac {4 \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} E\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\sqrt {1+x^4}}-2 \left (-\frac {2 x \sqrt {1+x^4}}{1+x^2}+\frac {2 \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} E\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\sqrt {1+x^4}}\right )-\frac {2 \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} F\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\sqrt {1+x^4}}-\frac {\left (i-\sqrt {3}\right ) \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} F\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\left (3 i-\sqrt {3}\right ) \sqrt {1+x^4}}+\frac {\left (3-i \sqrt {3}\right ) \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} F\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{2 \sqrt {1+x^4}}+\frac {\left (3+i \sqrt {3}\right ) \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} F\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{2 \sqrt {1+x^4}}-\frac {\left (i+\sqrt {3}\right ) \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} F\left (2 \tan ^{-1}(x)|\frac {1}{2}\right )}{\left (3 i+\sqrt {3}\right ) \sqrt {1+x^4}}-\frac {\left (i+\sqrt {3}\right ) \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} \Pi \left (\frac {3}{4};2 \tan ^{-1}(x)|\frac {1}{2}\right )}{2 \left (3 i-\sqrt {3}\right ) \sqrt {1+x^4}}-\frac {\left (i-\sqrt {3}\right ) \left (1+x^2\right ) \sqrt {\frac {1+x^4}{\left (1+x^2\right )^2}} \Pi \left (\frac {3}{4};2 \tan ^{-1}(x)|\frac {1}{2}\right )}{2 \left (3 i+\sqrt {3}\right ) \sqrt {1+x^4}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.48, size = 41, normalized size = 1.00 \begin {gather*} \frac {\sqrt {1+x^4} \left (1+6 x^2+x^4\right )}{3 x^3}-2 \tanh ^{-1}\left (\frac {x}{\sqrt {1+x^4}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.56, size = 205, normalized size = 5.00
method | result | size |
elliptic | \(\frac {\left (\frac {\sqrt {2}\, \left (x^{4}+1\right )^{\frac {3}{2}}}{3 x^{3}}+\frac {2 \sqrt {2}\, \sqrt {x^{4}+1}}{x}-2 \sqrt {2}\, \arctanh \left (\frac {\sqrt {x^{4}+1}}{x}\right )\right ) \sqrt {2}}{2}\) | \(54\) |
trager | \(\frac {\sqrt {x^{4}+1}\, \left (x^{4}+6 x^{2}+1\right )}{3 x^{3}}-\ln \left (\frac {x^{4}+2 \sqrt {x^{4}+1}\, x +x^{2}+1}{x^{4}-x^{2}+1}\right )\) | \(58\) |
risch | \(\frac {x^{8}+6 x^{6}+2 x^{4}+6 x^{2}+1}{3 x^{3} \sqrt {x^{4}+1}}+\frac {2 \sqrt {-i x^{2}+1}\, \sqrt {i x^{2}+1}\, \EllipticF \left (x \left (\frac {\sqrt {2}}{2}+\frac {i \sqrt {2}}{2}\right ), i\right )}{\left (\frac {\sqrt {2}}{2}+\frac {i \sqrt {2}}{2}\right ) \sqrt {x^{4}+1}}+\frac {\left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\RootOf \left (\textit {\_Z}^{4}-\textit {\_Z}^{2}+1\right )}{\sum }\underline {\hspace {1.25 ex}}\alpha \left (-\frac {\arctanh \left (\frac {\underline {\hspace {1.25 ex}}\alpha ^{2} \left (-\underline {\hspace {1.25 ex}}\alpha ^{2}+x^{2}+1\right )}{\sqrt {\underline {\hspace {1.25 ex}}\alpha ^{2}}\, \sqrt {x^{4}+1}}\right )}{\sqrt {\underline {\hspace {1.25 ex}}\alpha ^{2}}}+\frac {2 \left (-1\right )^{\frac {3}{4}} \left (-\underline {\hspace {1.25 ex}}\alpha ^{3}+\underline {\hspace {1.25 ex}}\alpha \right ) \sqrt {-i x^{2}+1}\, \sqrt {i x^{2}+1}\, \EllipticPi \left (\left (-1\right )^{\frac {1}{4}} x , i \underline {\hspace {1.25 ex}}\alpha ^{2}-i, i\right )}{\sqrt {x^{4}+1}}\right )\right )}{2}\) | \(203\) |
default | \(\frac {\sqrt {x^{4}+1}\, x}{3}+\frac {2 \sqrt {-i x^{2}+1}\, \sqrt {i x^{2}+1}\, \EllipticF \left (x \left (\frac {\sqrt {2}}{2}+\frac {i \sqrt {2}}{2}\right ), i\right )}{\left (\frac {\sqrt {2}}{2}+\frac {i \sqrt {2}}{2}\right ) \sqrt {x^{4}+1}}+\frac {\left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\RootOf \left (\textit {\_Z}^{4}-\textit {\_Z}^{2}+1\right )}{\sum }\underline {\hspace {1.25 ex}}\alpha \left (-\frac {\arctanh \left (\frac {\underline {\hspace {1.25 ex}}\alpha ^{2} \left (-\underline {\hspace {1.25 ex}}\alpha ^{2}+x^{2}+1\right )}{\sqrt {\underline {\hspace {1.25 ex}}\alpha ^{2}}\, \sqrt {x^{4}+1}}\right )}{\sqrt {\underline {\hspace {1.25 ex}}\alpha ^{2}}}+\frac {2 \left (-1\right )^{\frac {3}{4}} \left (-\underline {\hspace {1.25 ex}}\alpha ^{3}+\underline {\hspace {1.25 ex}}\alpha \right ) \sqrt {-i x^{2}+1}\, \sqrt {i x^{2}+1}\, \EllipticPi \left (\left (-1\right )^{\frac {1}{4}} x , i \underline {\hspace {1.25 ex}}\alpha ^{2}-i, i\right )}{\sqrt {x^{4}+1}}\right )\right )}{2}+\frac {2 \sqrt {x^{4}+1}}{x}+\frac {\sqrt {x^{4}+1}}{3 x^{3}}\) | \(205\) |
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.41, size = 62, normalized size = 1.51 \begin {gather*} \frac {3 \, x^{3} \log \left (-\frac {x^{4} + x^{2} - 2 \, \sqrt {x^{4} + 1} x + 1}{x^{4} - x^{2} + 1}\right ) + {\left (x^{4} + 6 \, x^{2} + 1\right )} \sqrt {x^{4} + 1}}{3 \, x^{3}} \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^{4} + 1} \left (x^{2} - x + 1\right ) \left (x^{2} + x + 1\right )}{x^{4} \left (x^{4} - 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 [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\left (x^4-1\right )\,\sqrt {x^4+1}\,\left (x^4+x^2+1\right )}{x^4\,\left (x^4-x^2+1\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________