Optimal. Leaf size=394 \[ \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}}{1+x^2+\sqrt {1+x^4}}\right )-\frac {\text {RootSum}\left [1+2 \text {$\#$1}^2-6 \text {$\#$1}^4-2 \text {$\#$1}^6+\text {$\#$1}^8\& ,\frac {\log \left (-1+x^2+\sqrt {1+x^4}\right )-\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}+x^2 \text {$\#$1}+\sqrt {1+x^4} \text {$\#$1}\right )+\log \left (-1+x^2+\sqrt {1+x^4}\right ) \text {$\#$1}^2-\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}+x^2 \text {$\#$1}+\sqrt {1+x^4} \text {$\#$1}\right ) \text {$\#$1}^2-\log \left (-1+x^2+\sqrt {1+x^4}\right ) \text {$\#$1}^4+\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}+x^2 \text {$\#$1}+\sqrt {1+x^4} \text {$\#$1}\right ) \text {$\#$1}^4-\log \left (-1+x^2+\sqrt {1+x^4}\right ) \text {$\#$1}^6+\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}+x^2 \text {$\#$1}+\sqrt {1+x^4} \text {$\#$1}\right ) \text {$\#$1}^6}{\text {$\#$1}-6 \text {$\#$1}^3-3 \text {$\#$1}^5+2 \text {$\#$1}^7}\& \right ]}{\sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains complex when optimal does not.
time = 2.18, antiderivative size = 621, normalized size of antiderivative = 1.58, number of steps
used = 30, number of rules used = 6, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {6860, 2157,
212, 6857, 2158, 739} \begin {gather*} -\frac {i \text {ArcTan}\left (\frac {(1+i) \left (\sqrt {2}-i \sqrt {\sqrt {5}-1} x\right )}{\sqrt {2 \left (\sqrt {5}+(-1-2 i)\right )} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left (\sqrt {5}+(-2+i)\right )}}+\frac {i \text {ArcTan}\left (\frac {(1+i) \left (\sqrt {2}+i \sqrt {\sqrt {5}-1} x\right )}{\sqrt {2 \left (\sqrt {5}+(-1-2 i)\right )} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left (\sqrt {5}+(-2+i)\right )}}-\frac {\text {ArcTan}\left (\frac {(1+i) \left (\sqrt {2}-\sqrt {1+\sqrt {5}} x\right )}{\sqrt {-2 \sqrt {5}+(-2-4 i)} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left (\sqrt {5}+(2-i)\right )}}+\frac {\text {ArcTan}\left (\frac {(1+i) \left (\sqrt {1+\sqrt {5}} x+\sqrt {2}\right )}{\sqrt {-2 \sqrt {5}+(-2-4 i)} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left (\sqrt {5}+(2-i)\right )}}-\frac {(1-i) \tanh ^{-1}\left (\frac {\sqrt {2}-i \sqrt {\sqrt {5}-1} x}{\sqrt {(2+i)-i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left (\sqrt {5}+(-2-i)\right )}}+\frac {(1-i) \tanh ^{-1}\left (\frac {\sqrt {2}+i \sqrt {\sqrt {5}-1} x}{\sqrt {(2+i)-i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left (\sqrt {5}+(-2-i)\right )}}+\frac {(1+i) \tanh ^{-1}\left (\frac {\sqrt {2}-\sqrt {1+\sqrt {5}} x}{\sqrt {(2+i)+i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left (\sqrt {5}+(2+i)\right )}}-\frac {(1+i) \tanh ^{-1}\left (\frac {\sqrt {1+\sqrt {5}} x+\sqrt {2}}{\sqrt {(2+i)+i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left (\sqrt {5}+(2+i)\right )}}+\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {\sqrt {x^4+1}+x^2}}\right )}{\sqrt {2}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 212
Rule 739
Rule 2157
Rule 2158
Rule 6857
Rule 6860
Rubi steps
\begin {align*} \int \frac {\left (1+x^2+x^4\right ) \sqrt {x^2+\sqrt {1+x^4}}}{\sqrt {1+x^4} \left (-1+x^2+x^4\right )} \, dx &=\int \left (\frac {\sqrt {x^2+\sqrt {1+x^4}}}{\sqrt {1+x^4}}+\frac {2 \sqrt {x^2+\sqrt {1+x^4}}}{\sqrt {1+x^4} \left (-1+x^2+x^4\right )}\right ) \, dx\\ &=2 \int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\sqrt {1+x^4} \left (-1+x^2+x^4\right )} \, dx+\int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\sqrt {1+x^4}} \, dx\\ &=2 \int \left (-\frac {2 \sqrt {x^2+\sqrt {1+x^4}}}{\sqrt {5} \left (-1+\sqrt {5}-2 x^2\right ) \sqrt {1+x^4}}-\frac {2 \sqrt {x^2+\sqrt {1+x^4}}}{\sqrt {5} \left (1+\sqrt {5}+2 x^2\right ) \sqrt {1+x^4}}\right ) \, dx+\text {Subst}\left (\int \frac {1}{1-2 x^2} \, dx,x,\frac {x}{\sqrt {x^2+\sqrt {1+x^4}}}\right )\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {x^2+\sqrt {1+x^4}}}\right )}{\sqrt {2}}-\frac {4 \int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\left (-1+\sqrt {5}-2 x^2\right ) \sqrt {1+x^4}} \, dx}{\sqrt {5}}-\frac {4 \int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\left (1+\sqrt {5}+2 x^2\right ) \sqrt {1+x^4}} \, dx}{\sqrt {5}}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {x^2+\sqrt {1+x^4}}}\right )}{\sqrt {2}}-\frac {4 \int \left (\frac {\sqrt {x^2+\sqrt {1+x^4}}}{2 \sqrt {-1+\sqrt {5}} \left (\sqrt {-1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1+x^4}}+\frac {\sqrt {x^2+\sqrt {1+x^4}}}{2 \sqrt {-1+\sqrt {5}} \left (\sqrt {-1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1+x^4}}\right ) \, dx}{\sqrt {5}}-\frac {4 \int \left (\frac {i \sqrt {x^2+\sqrt {1+x^4}}}{2 \sqrt {1+\sqrt {5}} \left (i \sqrt {1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1+x^4}}+\frac {i \sqrt {x^2+\sqrt {1+x^4}}}{2 \sqrt {1+\sqrt {5}} \left (i \sqrt {1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1+x^4}}\right ) \, dx}{\sqrt {5}}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {x^2+\sqrt {1+x^4}}}\right )}{\sqrt {2}}-\frac {2 \int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\left (\sqrt {-1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1+x^4}} \, dx}{\sqrt {5 \left (-1+\sqrt {5}\right )}}-\frac {2 \int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\left (\sqrt {-1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1+x^4}} \, dx}{\sqrt {5 \left (-1+\sqrt {5}\right )}}-\frac {(2 i) \int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\left (i \sqrt {1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1+x^4}} \, dx}{\sqrt {5 \left (1+\sqrt {5}\right )}}-\frac {(2 i) \int \frac {\sqrt {x^2+\sqrt {1+x^4}}}{\left (i \sqrt {1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1+x^4}} \, dx}{\sqrt {5 \left (1+\sqrt {5}\right )}}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {x^2+\sqrt {1+x^4}}}\right )}{\sqrt {2}}-\frac {(1-i) \int \frac {1}{\left (\sqrt {-1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1-i x^2}} \, dx}{\sqrt {5 \left (-1+\sqrt {5}\right )}}-\frac {(1-i) \int \frac {1}{\left (\sqrt {-1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1-i x^2}} \, dx}{\sqrt {5 \left (-1+\sqrt {5}\right )}}-\frac {(1+i) \int \frac {1}{\left (\sqrt {-1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1+i x^2}} \, dx}{\sqrt {5 \left (-1+\sqrt {5}\right )}}-\frac {(1+i) \int \frac {1}{\left (\sqrt {-1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1+i x^2}} \, dx}{\sqrt {5 \left (-1+\sqrt {5}\right )}}--\frac {(1-i) \int \frac {1}{\left (i \sqrt {1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1+i x^2}} \, dx}{\sqrt {5 \left (1+\sqrt {5}\right )}}--\frac {(1-i) \int \frac {1}{\left (i \sqrt {1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1+i x^2}} \, dx}{\sqrt {5 \left (1+\sqrt {5}\right )}}-\frac {(1+i) \int \frac {1}{\left (i \sqrt {1+\sqrt {5}}-\sqrt {2} x\right ) \sqrt {1-i x^2}} \, dx}{\sqrt {5 \left (1+\sqrt {5}\right )}}-\frac {(1+i) \int \frac {1}{\left (i \sqrt {1+\sqrt {5}}+\sqrt {2} x\right ) \sqrt {1-i x^2}} \, dx}{\sqrt {5 \left (1+\sqrt {5}\right )}}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {x^2+\sqrt {1+x^4}}}\right )}{\sqrt {2}}--\frac {(1+i) \text {Subst}\left (\int \frac {1}{2+i \left (-1+\sqrt {5}\right )-x^2} \, dx,x,\frac {-\sqrt {2}-i \sqrt {-1+\sqrt {5}} x}{\sqrt {1+i x^2}}\right )}{\sqrt {5 \left (-1+\sqrt {5}\right )}}--\frac {(1+i) \text {Subst}\left (\int \frac {1}{2+i \left (-1+\sqrt {5}\right )-x^2} \, dx,x,\frac {\sqrt {2}-i \sqrt {-1+\sqrt {5}} x}{\sqrt {1+i x^2}}\right )}{\sqrt {5 \left (-1+\sqrt {5}\right )}}--\frac {(1-i) \text {Subst}\left (\int \frac {1}{2-i \left (-1+\sqrt {5}\right )-x^2} \, dx,x,\frac {-\sqrt {2}+i \sqrt {-1+\sqrt {5}} x}{\sqrt {1-i x^2}}\right )}{\sqrt {5 \left (-1+\sqrt {5}\right )}}--\frac {(1-i) \text {Subst}\left (\int \frac {1}{2-i \left (-1+\sqrt {5}\right )-x^2} \, dx,x,\frac {\sqrt {2}+i \sqrt {-1+\sqrt {5}} x}{\sqrt {1-i x^2}}\right )}{\sqrt {5 \left (-1+\sqrt {5}\right )}}--\frac {(1+i) \text {Subst}\left (\int \frac {1}{2-i \left (-1-\sqrt {5}\right )-x^2} \, dx,x,\frac {-\sqrt {2}-\sqrt {1+\sqrt {5}} x}{\sqrt {1-i x^2}}\right )}{\sqrt {5 \left (1+\sqrt {5}\right )}}--\frac {(1+i) \text {Subst}\left (\int \frac {1}{2-i \left (-1-\sqrt {5}\right )-x^2} \, dx,x,\frac {\sqrt {2}-\sqrt {1+\sqrt {5}} x}{\sqrt {1-i x^2}}\right )}{\sqrt {5 \left (1+\sqrt {5}\right )}}-\frac {(1-i) \text {Subst}\left (\int \frac {1}{2+i \left (-1-\sqrt {5}\right )-x^2} \, dx,x,\frac {-\sqrt {2}+\sqrt {1+\sqrt {5}} x}{\sqrt {1+i x^2}}\right )}{\sqrt {5 \left (1+\sqrt {5}\right )}}-\frac {(1-i) \text {Subst}\left (\int \frac {1}{2+i \left (-1-\sqrt {5}\right )-x^2} \, dx,x,\frac {\sqrt {2}+\sqrt {1+\sqrt {5}} x}{\sqrt {1+i x^2}}\right )}{\sqrt {5 \left (1+\sqrt {5}\right )}}\\ &=-\frac {i \tan ^{-1}\left (\frac {(1+i) \left (\sqrt {2}-i \sqrt {-1+\sqrt {5}} x\right )}{\sqrt {2 \left ((-1-2 i)+\sqrt {5}\right )} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left ((-2+i)+\sqrt {5}\right )}}+\frac {i \tan ^{-1}\left (\frac {(1+i) \left (\sqrt {2}+i \sqrt {-1+\sqrt {5}} x\right )}{\sqrt {2 \left ((-1-2 i)+\sqrt {5}\right )} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left ((-2+i)+\sqrt {5}\right )}}-\frac {\tan ^{-1}\left (\frac {(1+i) \left (\sqrt {2}-\sqrt {1+\sqrt {5}} x\right )}{\sqrt {(-2-4 i)-2 \sqrt {5}} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left ((2-i)+\sqrt {5}\right )}}+\frac {\tan ^{-1}\left (\frac {(1+i) \left (\sqrt {2}+\sqrt {1+\sqrt {5}} x\right )}{\sqrt {(-2-4 i)-2 \sqrt {5}} \sqrt {1+i x^2}}\right )}{\sqrt {(-5-5 i) \left ((2-i)+\sqrt {5}\right )}}-\frac {(1-i) \tanh ^{-1}\left (\frac {\sqrt {2}-i \sqrt {-1+\sqrt {5}} x}{\sqrt {(2+i)-i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left ((-2-i)+\sqrt {5}\right )}}+\frac {(1-i) \tanh ^{-1}\left (\frac {\sqrt {2}+i \sqrt {-1+\sqrt {5}} x}{\sqrt {(2+i)-i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left ((-2-i)+\sqrt {5}\right )}}+\frac {(1+i) \tanh ^{-1}\left (\frac {\sqrt {2}-\sqrt {1+\sqrt {5}} x}{\sqrt {(2+i)+i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left ((2+i)+\sqrt {5}\right )}}-\frac {(1+i) \tanh ^{-1}\left (\frac {\sqrt {2}+\sqrt {1+\sqrt {5}} x}{\sqrt {(2+i)+i \sqrt {5}} \sqrt {1-i x^2}}\right )}{\sqrt {(10+10 i) \left ((2+i)+\sqrt {5}\right )}}+\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {x^2+\sqrt {1+x^4}}}\right )}{\sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.58, size = 399, normalized size = 1.01 \begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {-1+x^2+\sqrt {1+x^4}}{\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}}\right )+\text {RootSum}\left [1-2 \text {$\#$1}^2-6 \text {$\#$1}^4+2 \text {$\#$1}^6+\text {$\#$1}^8\&,\frac {\log \left (1+x^2+\sqrt {1+x^4}\right )-\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}-x^2 \text {$\#$1}-\sqrt {1+x^4} \text {$\#$1}\right )+\log \left (1+x^2+\sqrt {1+x^4}\right ) \text {$\#$1}^2-\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}-x^2 \text {$\#$1}-\sqrt {1+x^4} \text {$\#$1}\right ) \text {$\#$1}^2-\log \left (1+x^2+\sqrt {1+x^4}\right ) \text {$\#$1}^4+\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}-x^2 \text {$\#$1}-\sqrt {1+x^4} \text {$\#$1}\right ) \text {$\#$1}^4-\log \left (1+x^2+\sqrt {1+x^4}\right ) \text {$\#$1}^6+\log \left (\sqrt {2} x \sqrt {x^2+\sqrt {1+x^4}}-\text {$\#$1}-x^2 \text {$\#$1}-\sqrt {1+x^4} \text {$\#$1}\right ) \text {$\#$1}^6}{-\text {$\#$1}-6 \text {$\#$1}^3+3 \text {$\#$1}^5+2 \text {$\#$1}^7}\&\right ]}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (x^{4}+x^{2}+1\right ) \sqrt {x^{2}+\sqrt {x^{4}+1}}}{\sqrt {x^{4}+1}\, \left (x^{4}+x^{2}-1\right )}\, dx\]
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 [C] Result contains higher order function than in optimal. Order 3 vs. order
1.
time = 12.02, size = 10117, normalized size = 25.68 \begin {gather*} \text {Too large to display} \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 {\sqrt {x^{2} + \sqrt {x^{4} + 1}} \left (x^{2} - x + 1\right ) \left (x^{2} + x + 1\right )}{\sqrt {x^{4} + 1} \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.00 \begin {gather*} \int \frac {\sqrt {\sqrt {x^4+1}+x^2}\,\left (x^4+x^2+1\right )}{\sqrt {x^4+1}\,\left (x^4+x^2-1\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________