Integrand size = 58, antiderivative size = 186 \[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\frac {\left (-1+x+x^2\right ) \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}{2 x}-\frac {3 \text {arctanh}\left (\frac {\sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}{\sqrt {2}}\right )}{2 \sqrt {2}}+\frac {1}{5} \sqrt {2 \left (5-\sqrt {5}\right )} \text {arctanh}\left (\sqrt {\frac {1}{2}+\frac {1}{2 \sqrt {5}}} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}\right )+\frac {1}{5} \sqrt {2 \left (5+\sqrt {5}\right )} \text {arctanh}\left (\sqrt {\frac {2}{5+\sqrt {5}}} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}\right ) \]
[Out]
\[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {-2+x+2 x^2} \int \frac {\left (1+x^2\right ) \sqrt {-1+x+x^2} \left (1-3 x^2+x^4\right )}{x^2 \sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}} \\ & = \frac {\sqrt {-2+x+2 x^2} \int \left (\frac {\sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2}}+\frac {\sqrt {-1+x+x^2}}{x^2 \sqrt {-2+x+2 x^2}}+\frac {\sqrt {-1+x+x^2}}{x \sqrt {-2+x+2 x^2}}+\frac {\sqrt {-1+x+x^2} \left (1+3 x-x^2-2 x^3\right )}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )}\right ) \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}} \\ & = \frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{x^2 \sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{x \sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2} \left (1+3 x-x^2-2 x^3\right )}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}} \\ & = \frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{x^2 \sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{x \sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \left (\frac {\sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )}+\frac {3 x \sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )}-\frac {x^2 \sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )}-\frac {2 x^3 \sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )}\right ) \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}} \\ & = \frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{x^2 \sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{x \sqrt {-2+x+2 x^2}} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\sqrt {-2+x+2 x^2} \int \frac {\sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}-\frac {\sqrt {-2+x+2 x^2} \int \frac {x^2 \sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}-\frac {\left (2 \sqrt {-2+x+2 x^2}\right ) \int \frac {x^3 \sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}}+\frac {\left (3 \sqrt {-2+x+2 x^2}\right ) \int \frac {x \sqrt {-1+x+x^2}}{\sqrt {-2+x+2 x^2} \left (1-x-3 x^2+x^3+x^4\right )} \, dx}{\sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}} \\ \end{align*}
Time = 4.57 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.41 \[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\frac {-20 \sqrt {-1+x+x^2}+10 x \sqrt {-1+x+x^2}+20 x^2 \sqrt {-1+x+x^2}-15 \sqrt {2} x \sqrt {-2+x+2 x^2} \text {arctanh}\left (\frac {\sqrt {-2+x+2 x^2}}{\sqrt {2} \sqrt {-1+x+x^2}}\right )+4 \sqrt {2 \left (5-\sqrt {5}\right )} x \sqrt {-2+x+2 x^2} \text {arctanh}\left (\frac {\sqrt {\frac {1}{10} \left (5+\sqrt {5}\right )} \sqrt {-2+x+2 x^2}}{\sqrt {-1+x+x^2}}\right )+4 \sqrt {2 \left (5+\sqrt {5}\right )} x \sqrt {-2+x+2 x^2} \text {arctanh}\left (\frac {\sqrt {-\left (\left (-5+\sqrt {5}\right ) \left (-2+x+2 x^2\right )\right )}}{\sqrt {10} \sqrt {-1+x+x^2}}\right )}{20 x \sqrt {-1+x+x^2} \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}}} \]
[In]
[Out]
Time = 6.06 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.42
method | result | size |
risch | \(\frac {2 x^{2}+x -2}{2 x \sqrt {\frac {2 x^{2}+x -2}{x^{2}+x -1}}}+\frac {\left (-\frac {3 \sqrt {2}\, \ln \left (\frac {4 \sqrt {2 x^{4}+3 x^{3}-3 x^{2}-3 x +2}+\sqrt {2}\, \left (4 x^{2}+3 x -4\right )}{x}\right )}{8}+\frac {\operatorname {arctanh}\left (\frac {\left (4 x^{2}+3 x -4\right ) \sqrt {5}+2 x^{2}+x -2}{2 \sqrt {10+2 \sqrt {5}}\, \sqrt {2 x^{4}+3 x^{3}-3 x^{2}-3 x +2}}\right ) \sqrt {10-2 \sqrt {5}}}{10}+\frac {\operatorname {arctanh}\left (\frac {\left (4 x^{2}+3 x -4\right ) \sqrt {5}-2 x^{2}-x +2}{2 \sqrt {10-2 \sqrt {5}}\, \sqrt {2 x^{4}+3 x^{3}-3 x^{2}-3 x +2}}\right ) \sqrt {10+2 \sqrt {5}}}{10}\right ) \sqrt {\left (2 x^{2}+x -2\right ) \left (x^{2}+x -1\right )}}{\sqrt {\frac {2 x^{2}+x -2}{x^{2}+x -1}}\, \left (x^{2}+x -1\right )}\) | \(265\) |
default | \(-\frac {\left (2 x^{2}+x -2\right ) \left (15 \sqrt {2}\, \ln \left (\frac {4 \sqrt {2}\, x^{2}+3 x \sqrt {2}-4 \sqrt {2}+4 \sqrt {2 x^{4}+3 x^{3}-3 x^{2}-3 x +2}}{x}\right ) x -4 \sqrt {10-2 \sqrt {5}}\, \operatorname {arctanh}\left (\frac {4 \sqrt {5}\, x^{2}+3 x \sqrt {5}+2 x^{2}-4 \sqrt {5}+x -2}{2 \sqrt {10+2 \sqrt {5}}\, \sqrt {2 x^{4}+3 x^{3}-3 x^{2}-3 x +2}}\right ) x -4 \sqrt {10+2 \sqrt {5}}\, \operatorname {arctanh}\left (\frac {4 \sqrt {5}\, x^{2}+3 x \sqrt {5}-2 x^{2}-4 \sqrt {5}-x +2}{2 \sqrt {10-2 \sqrt {5}}\, \sqrt {2 x^{4}+3 x^{3}-3 x^{2}-3 x +2}}\right ) x -20 \sqrt {2 x^{4}+3 x^{3}-3 x^{2}-3 x +2}\right )}{40 \sqrt {\frac {2 x^{2}+x -2}{x^{2}+x -1}}\, \sqrt {\left (2 x^{2}+x -2\right ) \left (x^{2}+x -1\right )}\, x}\) | \(278\) |
trager | \(\text {Expression too large to display}\) | \(1371\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 723 vs. \(2 (145) = 290\).
Time = 0.50 (sec) , antiderivative size = 723, normalized size of antiderivative = 3.89 \[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\frac {4 \, x \sqrt {2 \, \sqrt {5} + 10} \log \left (\frac {{\left (20575 \, x^{4} + 50235 \, x^{3} - 15795 \, x^{2} - \sqrt {5} {\left (10237 \, x^{4} + 22677 \, x^{3} - 9661 \, x^{2} - 22677 \, x + 10237\right )} - 50235 \, x + 20575\right )} \sqrt {2 \, \sqrt {5} + 10} + 20 \, {\left (1627 \, x^{4} + 4593 \, x^{3} - 288 \, x^{2} - \sqrt {5} {\left (861 \, x^{4} + 2105 \, x^{3} - 478 \, x^{2} - 2105 \, x + 861\right )} - 4593 \, x + 1627\right )} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}}}{x^{4} + x^{3} - 3 \, x^{2} - x + 1}\right ) - 4 \, x \sqrt {2 \, \sqrt {5} + 10} \log \left (-\frac {{\left (20575 \, x^{4} + 50235 \, x^{3} - 15795 \, x^{2} - \sqrt {5} {\left (10237 \, x^{4} + 22677 \, x^{3} - 9661 \, x^{2} - 22677 \, x + 10237\right )} - 50235 \, x + 20575\right )} \sqrt {2 \, \sqrt {5} + 10} - 20 \, {\left (1627 \, x^{4} + 4593 \, x^{3} - 288 \, x^{2} - \sqrt {5} {\left (861 \, x^{4} + 2105 \, x^{3} - 478 \, x^{2} - 2105 \, x + 861\right )} - 4593 \, x + 1627\right )} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}}}{x^{4} + x^{3} - 3 \, x^{2} - x + 1}\right ) + 4 \, x \sqrt {-2 \, \sqrt {5} + 10} \log \left (\frac {{\left (20575 \, x^{4} + 50235 \, x^{3} - 15795 \, x^{2} + \sqrt {5} {\left (10237 \, x^{4} + 22677 \, x^{3} - 9661 \, x^{2} - 22677 \, x + 10237\right )} - 50235 \, x + 20575\right )} \sqrt {-2 \, \sqrt {5} + 10} + 20 \, {\left (1627 \, x^{4} + 4593 \, x^{3} - 288 \, x^{2} + \sqrt {5} {\left (861 \, x^{4} + 2105 \, x^{3} - 478 \, x^{2} - 2105 \, x + 861\right )} - 4593 \, x + 1627\right )} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}}}{x^{4} + x^{3} - 3 \, x^{2} - x + 1}\right ) - 4 \, x \sqrt {-2 \, \sqrt {5} + 10} \log \left (-\frac {{\left (20575 \, x^{4} + 50235 \, x^{3} - 15795 \, x^{2} + \sqrt {5} {\left (10237 \, x^{4} + 22677 \, x^{3} - 9661 \, x^{2} - 22677 \, x + 10237\right )} - 50235 \, x + 20575\right )} \sqrt {-2 \, \sqrt {5} + 10} - 20 \, {\left (1627 \, x^{4} + 4593 \, x^{3} - 288 \, x^{2} + \sqrt {5} {\left (861 \, x^{4} + 2105 \, x^{3} - 478 \, x^{2} - 2105 \, x + 861\right )} - 4593 \, x + 1627\right )} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}}}{x^{4} + x^{3} - 3 \, x^{2} - x + 1}\right ) + 15 \, \sqrt {2} x \log \left (-\frac {32 \, x^{4} + 48 \, x^{3} - 47 \, x^{2} - 4 \, \sqrt {2} {\left (4 \, x^{4} + 7 \, x^{3} - 5 \, x^{2} - 7 \, x + 4\right )} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}} - 48 \, x + 32}{x^{2}}\right ) + 40 \, {\left (x^{2} + x - 1\right )} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}}}{80 \, x} \]
[In]
[Out]
Timed out. \[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\int { \frac {{\left (x^{4} - 3 \, x^{2} + 1\right )} {\left (x^{2} + 1\right )}}{{\left (x^{4} + x^{3} - 3 \, x^{2} - x + 1\right )} x^{2} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\int { \frac {{\left (x^{4} - 3 \, x^{2} + 1\right )} {\left (x^{2} + 1\right )}}{{\left (x^{4} + x^{3} - 3 \, x^{2} - x + 1\right )} x^{2} \sqrt {\frac {2 \, x^{2} + x - 2}{x^{2} + x - 1}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (1+x^2\right ) \left (1-3 x^2+x^4\right )}{x^2 \sqrt {\frac {-2+x+2 x^2}{-1+x+x^2}} \left (1-x-3 x^2+x^3+x^4\right )} \, dx=\int \frac {\left (x^2+1\right )\,\left (x^4-3\,x^2+1\right )}{x^2\,\sqrt {\frac {2\,x^2+x-2}{x^2+x-1}}\,\left (x^4+x^3-3\,x^2-x+1\right )} \,d x \]
[In]
[Out]