Integrand size = 27, antiderivative size = 28 \[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=-\arctan \left (\frac {\sqrt {-1-x^2+x^4}}{x \left (-2+x^2\right )}\right ) \]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 0.25 (sec) , antiderivative size = 520, normalized size of antiderivative = 18.57, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {1724, 1112, 1228, 1470, 554, 432, 430, 552, 551} \[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=\frac {3 \left (1+\sqrt {5}\right ) \sqrt {2 x^2+\sqrt {5}-1} \sqrt {1-\frac {2 x^2}{1+\sqrt {5}}} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right ),\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{\sqrt {2} \left (1-\sqrt {5}\right ) \sqrt {x^4-x^2-1}}-\frac {3 \sqrt {-\left (\left (1-\sqrt {5}\right ) x^2\right )-2} \sqrt {\frac {\left (1+\sqrt {5}\right ) x^2+2}{\left (1-\sqrt {5}\right ) x^2+2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-\left (\left (1-\sqrt {5}\right ) x^2\right )-2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{\left (1-\sqrt {5}\right ) x^2+2}} \sqrt {x^4-x^2-1}}+\frac {\sqrt {-\left (\left (1-\sqrt {5}\right ) x^2\right )-2} \sqrt {\frac {\left (1+\sqrt {5}\right ) x^2+2}{\left (1-\sqrt {5}\right ) x^2+2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-\left (\left (1-\sqrt {5}\right ) x^2\right )-2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{2 \sqrt [4]{5} \sqrt {\frac {1}{\left (1-\sqrt {5}\right ) x^2+2}} \sqrt {x^4-x^2-1}}+\frac {3 \sqrt {2} \sqrt {2 x^2+\sqrt {5}-1} \sqrt {1-\frac {2 x^2}{1+\sqrt {5}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (1+\sqrt {5}\right ),\arcsin \left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right ),\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{\left (1-\sqrt {5}\right ) \sqrt {x^4-x^2-1}} \]
[In]
[Out]
Rule 430
Rule 432
Rule 551
Rule 552
Rule 554
Rule 1112
Rule 1228
Rule 1470
Rule 1724
Rubi steps \begin{align*} \text {integral}& = 3 \int \frac {1}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx+\int \frac {1}{\sqrt {-1-x^2+x^4}} \, dx \\ & = \frac {\sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{2 \sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {3 \int \frac {-1-\sqrt {5}+2 x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx}{-1+\sqrt {5}}+\frac {6 \int \frac {1}{\sqrt {-1-x^2+x^4}} \, dx}{-1+\sqrt {5}} \\ & = \frac {\sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{2 \sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {3 \sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {\left (3 \sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {-1-\sqrt {5}+2 x^2}\right ) \int \frac {\sqrt {-1-\sqrt {5}+2 x^2}}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \left (-1+x^2\right )} \, dx}{\left (-1+\sqrt {5}\right ) \sqrt {-1-x^2+x^4}} \\ & = \frac {\sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{2 \sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {3 \sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {\left (6 \sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {-1-\sqrt {5}+2 x^2}\right ) \int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {-1-\sqrt {5}+2 x^2}} \, dx}{\left (-1+\sqrt {5}\right ) \sqrt {-1-x^2+x^4}}-\frac {\left (3 \left (1-\sqrt {5}\right ) \sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {-1-\sqrt {5}+2 x^2}\right ) \int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \left (-1+x^2\right ) \sqrt {-1-\sqrt {5}+2 x^2}} \, dx}{\left (-1+\sqrt {5}\right ) \sqrt {-1-x^2+x^4}} \\ & = \frac {\sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{2 \sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {3 \sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {\left (6 \sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}\right ) \int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx}{\left (-1+\sqrt {5}\right ) \sqrt {-1-x^2+x^4}}-\frac {\left (3 \left (1-\sqrt {5}\right ) \sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}\right ) \int \frac {1}{\sqrt {-\frac {1}{-1-\sqrt {5}}+\frac {x^2}{2}} \left (-1+x^2\right ) \sqrt {1+\frac {2 x^2}{-1-\sqrt {5}}}} \, dx}{\left (-1+\sqrt {5}\right ) \sqrt {-1-x^2+x^4}} \\ & = \frac {3 \left (1+\sqrt {5}\right ) \sqrt {-1+\sqrt {5}+2 x^2} \sqrt {1-\frac {2 x^2}{1+\sqrt {5}}} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right ),\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{\sqrt {2} \left (1-\sqrt {5}\right ) \sqrt {-1-x^2+x^4}}+\frac {\sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{2 \sqrt [4]{5} \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {3 \sqrt {-2-\left (1-\sqrt {5}\right ) x^2} \sqrt {\frac {2+\left (1+\sqrt {5}\right ) x^2}{2+\left (1-\sqrt {5}\right ) x^2}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {2} \sqrt [4]{5} x}{\sqrt {-2-\left (1-\sqrt {5}\right ) x^2}}\right ),\frac {1}{10} \left (5-\sqrt {5}\right )\right )}{\sqrt [4]{5} \left (1-\sqrt {5}\right ) \sqrt {\frac {1}{2+\left (1-\sqrt {5}\right ) x^2}} \sqrt {-1-x^2+x^4}}-\frac {3 \left (1+\sqrt {5}\right ) \sqrt {-1+\sqrt {5}+2 x^2} \sqrt {1-\frac {2 x^2}{1+\sqrt {5}}} \operatorname {EllipticPi}\left (\frac {1}{2} \left (1+\sqrt {5}\right ),\arcsin \left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right ),\frac {1}{2} \left (-3-\sqrt {5}\right )\right )}{2 \sqrt {2} \sqrt {-1-x^2+x^4}} \\ \end{align*}
Time = 0.71 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00 \[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=-\arctan \left (\frac {\sqrt {-1-x^2+x^4}}{x \left (-2+x^2\right )}\right ) \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 2.16 (sec) , antiderivative size = 96, normalized size of antiderivative = 3.43
method | result | size |
trager | \(\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{6}+5 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{4}+2 \sqrt {x^{4}-x^{2}-1}\, x^{3}-5 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{2}-4 x \sqrt {x^{4}-x^{2}-1}-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )}{\left (x -1\right )^{3} \left (1+x \right )^{3}}\right )}{2}\) | \(96\) |
default | \(\frac {2 \sqrt {1-\left (-\frac {1}{2}-\frac {\sqrt {5}}{2}\right ) x^{2}}\, \sqrt {1-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) x^{2}}\, \operatorname {EllipticF}\left (\frac {x \sqrt {-2-2 \sqrt {5}}}{2}, \frac {i \sqrt {5}}{2}-\frac {i}{2}\right )}{\sqrt {-2-2 \sqrt {5}}\, \sqrt {x^{4}-x^{2}-1}}-\frac {3 \sqrt {1-\left (-\frac {1}{2}-\frac {\sqrt {5}}{2}\right ) x^{2}}\, \sqrt {1-\left (\frac {\sqrt {5}}{2}-\frac {1}{2}\right ) x^{2}}\, \operatorname {EllipticPi}\left (\sqrt {-\frac {1}{2}-\frac {\sqrt {5}}{2}}\, x , \frac {1}{-\frac {1}{2}-\frac {\sqrt {5}}{2}}, \frac {\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}}{\sqrt {-\frac {1}{2}-\frac {\sqrt {5}}{2}}}\right )}{\sqrt {-\frac {1}{2}-\frac {\sqrt {5}}{2}}\, \sqrt {x^{4}-x^{2}-1}}\) | \(174\) |
elliptic | \(\frac {2 \sqrt {1+\frac {x^{2}}{2}+\frac {\sqrt {5}\, x^{2}}{2}}\, \sqrt {1-\frac {\sqrt {5}\, x^{2}}{2}+\frac {x^{2}}{2}}\, \operatorname {EllipticF}\left (\frac {x \sqrt {-2-2 \sqrt {5}}}{2}, \frac {i \sqrt {5}}{2}-\frac {i}{2}\right )}{\sqrt {-2-2 \sqrt {5}}\, \sqrt {x^{4}-x^{2}-1}}-\frac {3 \sqrt {1+\frac {x^{2}}{2}+\frac {\sqrt {5}\, x^{2}}{2}}\, \sqrt {1-\frac {\sqrt {5}\, x^{2}}{2}+\frac {x^{2}}{2}}\, \operatorname {EllipticPi}\left (\sqrt {-\frac {1}{2}-\frac {\sqrt {5}}{2}}\, x , \frac {1}{-\frac {1}{2}-\frac {\sqrt {5}}{2}}, \frac {\sqrt {\frac {\sqrt {5}}{2}-\frac {1}{2}}}{\sqrt {-\frac {1}{2}-\frac {\sqrt {5}}{2}}}\right )}{\sqrt {-\frac {1}{2}-\frac {\sqrt {5}}{2}}\, \sqrt {x^{4}-x^{2}-1}}\) | \(178\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.46 \[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=-\frac {1}{2} \, \arctan \left (\frac {2 \, \sqrt {x^{4} - x^{2} - 1} {\left (x^{3} - 2 \, x\right )}}{x^{6} - 5 \, x^{4} + 5 \, x^{2} + 1}\right ) \]
[In]
[Out]
\[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=\int \frac {x^{2} + 2}{\left (x - 1\right ) \left (x + 1\right ) \sqrt {x^{4} - x^{2} - 1}}\, dx \]
[In]
[Out]
\[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=\int { \frac {x^{2} + 2}{\sqrt {x^{4} - x^{2} - 1} {\left (x^{2} - 1\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=\int { \frac {x^{2} + 2}{\sqrt {x^{4} - x^{2} - 1} {\left (x^{2} - 1\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {2+x^2}{\left (-1+x^2\right ) \sqrt {-1-x^2+x^4}} \, dx=\int \frac {x^2+2}{\left (x^2-1\right )\,\sqrt {x^4-x^2-1}} \,d x \]
[In]
[Out]