Integrand size = 30, antiderivative size = 21 \[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=-\frac {2 \sqrt {x+x^4}}{1-x+x^2} \]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=\int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \frac {-1-2 x+2 x^2}{\sqrt {x} \left (1-x+x^2\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}} \\ & = \frac {\left (\sqrt {x} \sqrt {1+x^3}\right ) \int \left (\frac {2}{\sqrt {x} \sqrt {1+x^3}}-\frac {3}{\sqrt {x} \left (1-x+x^2\right ) \sqrt {1+x^3}}\right ) \, dx}{\sqrt {x+x^4}} \\ & = \frac {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}-\frac {\left (3 \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (1-x+x^2\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}} \\ & = -\frac {\left (3 \sqrt {x} \sqrt {1+x^3}\right ) \int \left (\frac {2 i}{\sqrt {3} \left (1+i \sqrt {3}-2 x\right ) \sqrt {x} \sqrt {1+x^3}}+\frac {2 i}{\sqrt {3} \sqrt {x} \left (-1+i \sqrt {3}+2 x\right ) \sqrt {1+x^3}}\right ) \, dx}{\sqrt {x+x^4}}+\frac {\left (4 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}} \\ & = \frac {2 x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x}{1+\left (1+\sqrt {3}\right ) x}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (2 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\left (1+i \sqrt {3}-2 x\right ) \sqrt {x} \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}}-\frac {\left (2 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \int \frac {1}{\sqrt {x} \left (-1+i \sqrt {3}+2 x\right ) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}} \\ & = \frac {2 x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x}{1+\left (1+\sqrt {3}\right ) x}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (4 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (1+i \sqrt {3}-2 x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}-\frac {\left (4 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+i \sqrt {3}+2 x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}} \\ & = \frac {2 x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x}{1+\left (1+\sqrt {3}\right ) x}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}-\frac {\left (4 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \left (\frac {\sqrt {1-i \sqrt {3}}}{2 \left (-1+i \sqrt {3}\right ) \left (\sqrt {1-i \sqrt {3}}-\sqrt {2} x\right ) \sqrt {1+x^6}}+\frac {\sqrt {1-i \sqrt {3}}}{2 \left (-1+i \sqrt {3}\right ) \left (\sqrt {1-i \sqrt {3}}+\sqrt {2} x\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}-\frac {\left (4 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \left (\frac {1}{2 \sqrt {1+i \sqrt {3}} \left (\sqrt {1+i \sqrt {3}}-\sqrt {2} x\right ) \sqrt {1+x^6}}+\frac {1}{2 \sqrt {1+i \sqrt {3}} \left (\sqrt {1+i \sqrt {3}}+\sqrt {2} x\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}} \\ & = \frac {2 x (1+x) \sqrt {\frac {1-x+x^2}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x}{1+\left (1+\sqrt {3}\right ) x}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}+\frac {\left (2 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1-i \sqrt {3}}-\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {1-i \sqrt {3}} \sqrt {x+x^4}}+\frac {\left (2 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1-i \sqrt {3}}+\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {1-i \sqrt {3}} \sqrt {x+x^4}}-\frac {\left (2 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1+i \sqrt {3}}-\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {1+i \sqrt {3}} \sqrt {x+x^4}}-\frac {\left (2 i \sqrt {3} \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (\sqrt {1+i \sqrt {3}}+\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {1+i \sqrt {3}} \sqrt {x+x^4}} \\ \end{align*}
Time = 6.89 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.71 \[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=-\frac {2 x (1+x)}{\sqrt {x+x^4}} \]
[In]
[Out]
Time = 4.75 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.67
method | result | size |
gosper | \(-\frac {2 x \left (1+x \right )}{\sqrt {x^{4}+x}}\) | \(14\) |
trager | \(-\frac {2 \sqrt {x^{4}+x}}{x^{2}-x +1}\) | \(20\) |
default | \(-\frac {2 \left (x^{2}+x \right )}{\sqrt {\left (x^{2}-x +1\right ) \left (x^{2}+x \right )}}\) | \(24\) |
elliptic | \(-\frac {2 \left (x^{2}+x \right )}{\sqrt {\left (x^{2}-x +1\right ) \left (x^{2}+x \right )}}\) | \(24\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=-\frac {2 \, \sqrt {x^{4} + x}}{x^{2} - x + 1} \]
[In]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=\int \frac {2 x^{2} - 2 x - 1}{\sqrt {x \left (x + 1\right ) \left (x^{2} - x + 1\right )} \left (x^{2} - x + 1\right )}\, dx \]
[In]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=\int { \frac {2 \, x^{2} - 2 \, x - 1}{\sqrt {x^{4} + x} {\left (x^{2} - x + 1\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=\int { \frac {2 \, x^{2} - 2 \, x - 1}{\sqrt {x^{4} + x} {\left (x^{2} - x + 1\right )}} \,d x } \]
[In]
[Out]
Time = 5.34 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {-1-2 x+2 x^2}{\left (1-x+x^2\right ) \sqrt {x+x^4}} \, dx=-\frac {2\,\sqrt {x^4+x}}{x^2-x+1} \]
[In]
[Out]