Integrand size = 39, antiderivative size = 133 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=-2 \arctan \left (\frac {\sqrt {1+x^2+x^4}}{1-x+x^2}\right )+\sqrt {\frac {1}{5} \left (2+2 \sqrt {5}\right )} \arctan \left (\frac {\sqrt {1+x^2+x^4}}{\sqrt {2+\sqrt {5}} \left (1-x+x^2\right )}\right )+\sqrt {\frac {1}{5} \left (-2+2 \sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {1+x^2+x^4}}{\sqrt {-2+\sqrt {5}} \left (1-x+x^2\right )}\right ) \]
[Out]
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {2 \sqrt {1+x^2+x^4}}{1+x^2}+\frac {\left (1+2 x+2 x^2\right ) \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4}\right ) \, dx \\ & = -\left (2 \int \frac {\sqrt {1+x^2+x^4}}{1+x^2} \, dx\right )+\int \frac {\left (1+2 x+2 x^2\right ) \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx \\ & = -\left (2 \int \frac {x^2}{\sqrt {1+x^2+x^4}} \, dx\right )-2 \int \frac {1}{\left (1+x^2\right ) \sqrt {1+x^2+x^4}} \, dx+\int \left (\frac {\sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4}+\frac {2 x \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4}+\frac {2 x^2 \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4}\right ) \, dx \\ & = -\left (2 \int \frac {1}{\sqrt {1+x^2+x^4}} \, dx\right )+2 \int \frac {1-x^2}{\sqrt {1+x^2+x^4}} \, dx+2 \int \frac {x \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx+2 \int \frac {x^2 \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx-\int \frac {1}{\sqrt {1+x^2+x^4}} \, dx-\int \frac {1-x^2}{\left (1+x^2\right ) \sqrt {1+x^2+x^4}} \, dx+\int \frac {\sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx \\ & = -\frac {2 x \sqrt {1+x^2+x^4}}{1+x^2}+\frac {2 \left (1+x^2\right ) \sqrt {\frac {1+x^2+x^4}{\left (1+x^2\right )^2}} E\left (2 \arctan (x)\left |\frac {1}{4}\right .\right )}{\sqrt {1+x^2+x^4}}-\frac {3 \left (1+x^2\right ) \sqrt {\frac {1+x^2+x^4}{\left (1+x^2\right )^2}} \operatorname {EllipticF}\left (2 \arctan (x),\frac {1}{4}\right )}{2 \sqrt {1+x^2+x^4}}+2 \int \frac {x \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx+2 \int \frac {x^2 \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx+\int \frac {\sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx-\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {x}{\sqrt {1+x^2+x^4}}\right ) \\ & = -\frac {2 x \sqrt {1+x^2+x^4}}{1+x^2}-\arctan \left (\frac {x}{\sqrt {1+x^2+x^4}}\right )+\frac {2 \left (1+x^2\right ) \sqrt {\frac {1+x^2+x^4}{\left (1+x^2\right )^2}} E\left (2 \arctan (x)\left |\frac {1}{4}\right .\right )}{\sqrt {1+x^2+x^4}}-\frac {3 \left (1+x^2\right ) \sqrt {\frac {1+x^2+x^4}{\left (1+x^2\right )^2}} \operatorname {EllipticF}\left (2 \arctan (x),\frac {1}{4}\right )}{2 \sqrt {1+x^2+x^4}}+2 \int \frac {x \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx+2 \int \frac {x^2 \sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx+\int \frac {\sqrt {1+x^2+x^4}}{1+x+x^2+x^3+x^4} \, dx \\ \end{align*}
Time = 0.97 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.97 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=-2 \arctan \left (\frac {\sqrt {1+x^2+x^4}}{1-x+x^2}\right )+\sqrt {\frac {2}{5} \left (1+\sqrt {5}\right )} \arctan \left (\frac {\sqrt {-2+\sqrt {5}} \sqrt {1+x^2+x^4}}{1-x+x^2}\right )+\sqrt {\frac {2}{5} \left (-1+\sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {2+\sqrt {5}} \sqrt {1+x^2+x^4}}{1-x+x^2}\right ) \]
[In]
[Out]
Time = 3.16 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.89
method | result | size |
default | \(-\frac {\sqrt {5}\, \sqrt {2+2 \sqrt {5}}\, \arctan \left (\frac {\left (x^{2}+1\right ) \sqrt {5}-\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {-2+2 \sqrt {5}}}\right )}{10}+\frac {\sqrt {5}\, \sqrt {-2+2 \sqrt {5}}\, \operatorname {arctanh}\left (\frac {\left (x^{2}+1\right ) \sqrt {5}+\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {2+2 \sqrt {5}}}\right )}{10}-\arctan \left (\frac {x}{\sqrt {x^{4}+x^{2}+1}}\right )\) | \(119\) |
pseudoelliptic | \(-\frac {\sqrt {5}\, \sqrt {2+2 \sqrt {5}}\, \arctan \left (\frac {\left (x^{2}+1\right ) \sqrt {5}-\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {-2+2 \sqrt {5}}}\right )}{10}+\frac {\sqrt {5}\, \sqrt {-2+2 \sqrt {5}}\, \operatorname {arctanh}\left (\frac {\left (x^{2}+1\right ) \sqrt {5}+\left (1+x \right )^{2}}{\sqrt {x^{4}+x^{2}+1}\, \sqrt {2+2 \sqrt {5}}}\right )}{10}-\arctan \left (\frac {x}{\sqrt {x^{4}+x^{2}+1}}\right )\) | \(119\) |
elliptic | \(-\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (25 \textit {\_Z}^{4}+5 \textit {\_Z}^{2}-1\right )}{\sum }\textit {\_R} \ln \left (\left (\sqrt {x^{4}+x^{2}+1}-x^{2}\right )^{2}+\left (-15 \textit {\_R}^{3}+5 \textit {\_R}^{2}-4 \textit {\_R} \right ) \left (\sqrt {x^{4}+x^{2}+1}-x^{2}\right )-15 \textit {\_R}^{3}+5 \textit {\_R}^{2}-4 \textit {\_R} +2\right )\right )}{2}+\frac {\left (\sqrt {2}\, \arctan \left (\frac {\sqrt {x^{4}+x^{2}+1}}{x}\right )-\frac {2 \sqrt {5}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{4}+x^{2}+1}\, \sqrt {2}}{x \sqrt {\sqrt {5}+1}}\right )}{5 \sqrt {\sqrt {5}+1}}-\frac {2 \sqrt {5}\, \arctan \left (\frac {\sqrt {x^{4}+x^{2}+1}\, \sqrt {2}}{x \sqrt {\sqrt {5}-1}}\right )}{5 \sqrt {\sqrt {5}-1}}\right ) \sqrt {2}}{2}\) | \(186\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 378 vs. \(2 (105) = 210\).
Time = 0.41 (sec) , antiderivative size = 378, normalized size of antiderivative = 2.84 \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=-\frac {1}{20} \, \sqrt {5} \sqrt {-2 \, \sqrt {5} - 2} \log \left (-\frac {2 \, \sqrt {x^{4} + x^{2} + 1} {\left (2 \, x^{2} + \sqrt {5} x + x + 2\right )} + {\left (x^{4} + 3 \, x^{2} - \sqrt {5} {\left (x^{4} + x^{2} + 1\right )} + 1\right )} \sqrt {-2 \, \sqrt {5} - 2}}{x^{4} + x^{3} + x^{2} + x + 1}\right ) + \frac {1}{20} \, \sqrt {5} \sqrt {-2 \, \sqrt {5} - 2} \log \left (-\frac {2 \, \sqrt {x^{4} + x^{2} + 1} {\left (2 \, x^{2} + \sqrt {5} x + x + 2\right )} - {\left (x^{4} + 3 \, x^{2} - \sqrt {5} {\left (x^{4} + x^{2} + 1\right )} + 1\right )} \sqrt {-2 \, \sqrt {5} - 2}}{x^{4} + x^{3} + x^{2} + x + 1}\right ) + \frac {1}{20} \, \sqrt {5} \sqrt {2 \, \sqrt {5} - 2} \log \left (-\frac {2 \, \sqrt {x^{4} + x^{2} + 1} {\left (2 \, x^{2} - \sqrt {5} x + x + 2\right )} + {\left (x^{4} + 3 \, x^{2} + \sqrt {5} {\left (x^{4} + x^{2} + 1\right )} + 1\right )} \sqrt {2 \, \sqrt {5} - 2}}{x^{4} + x^{3} + x^{2} + x + 1}\right ) - \frac {1}{20} \, \sqrt {5} \sqrt {2 \, \sqrt {5} - 2} \log \left (-\frac {2 \, \sqrt {x^{4} + x^{2} + 1} {\left (2 \, x^{2} - \sqrt {5} x + x + 2\right )} - {\left (x^{4} + 3 \, x^{2} + \sqrt {5} {\left (x^{4} + x^{2} + 1\right )} + 1\right )} \sqrt {2 \, \sqrt {5} - 2}}{x^{4} + x^{3} + x^{2} + x + 1}\right ) - \arctan \left (\frac {x}{\sqrt {x^{4} + x^{2} + 1}}\right ) \]
[In]
[Out]
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int \frac {\sqrt {\left (x^{2} - x + 1\right ) \left (x^{2} + x + 1\right )} \left (x - 1\right ) \left (x + 1\right )}{\left (x^{2} + 1\right ) \left (x^{4} + x^{3} + x^{2} + x + 1\right )}\, dx \]
[In]
[Out]
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int { \frac {\sqrt {x^{4} + x^{2} + 1} {\left (x^{2} - 1\right )}}{{\left (x^{4} + x^{3} + x^{2} + x + 1\right )} {\left (x^{2} + 1\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int { \frac {\sqrt {x^{4} + x^{2} + 1} {\left (x^{2} - 1\right )}}{{\left (x^{4} + x^{3} + x^{2} + x + 1\right )} {\left (x^{2} + 1\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (-1+x^2\right ) \sqrt {1+x^2+x^4}}{\left (1+x^2\right ) \left (1+x+x^2+x^3+x^4\right )} \, dx=\int \frac {\left (x^2-1\right )\,\sqrt {x^4+x^2+1}}{\left (x^2+1\right )\,\left (x^4+x^3+x^2+x+1\right )} \,d x \]
[In]
[Out]