Integrand size = 27, antiderivative size = 21 \[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \sqrt {x+x^4}} \, dx=\text {arctanh}\left (\frac {2 \sqrt {x+x^4}}{1+2 x^2}\right ) \]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \sqrt {x+x^4}} \, dx=\int \frac {-1-2 x+2 x^2}{(-1+2 x) \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} (-1+2 x) \sqrt {1+x^3}} \, dx}{\sqrt {x+x^4}} \\ & = \frac {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {-1-2 x^2+2 x^4}{\left (-1+2 x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}} \\ & = \frac {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \left (-\frac {1}{2 \sqrt {1+x^6}}+\frac {x^2}{\sqrt {1+x^6}}-\frac {3}{2 \left (-1+2 x^2\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}} \\ & = -\frac {\left (\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 {\left (2 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {x^2}{\sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}}-\frac {\left (3 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (-1+2 x^2\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}} \\ & = -\frac {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 )}{2 \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 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+x^2}} \, dx,x,x^{3/2}\right )}{3 \sqrt {x+x^4}}-\frac {\left (3 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \left (-\frac {1}{2 \left (1-\sqrt {2} x\right ) \sqrt {1+x^6}}-\frac {1}{2 \left (1+\sqrt {2} x\right ) \sqrt {1+x^6}}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x+x^4}} \\ & = \frac {2 \sqrt {x} \sqrt {1+x^3} \text {arcsinh}\left (x^{3/2}\right )}{3 \sqrt {x+x^4}}-\frac {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 )}{2 \sqrt [4]{3} \sqrt {\frac {x (1+x)}{\left (1+\left (1+\sqrt {3}\right ) x\right )^2}} \sqrt {x+x^4}}+\frac {\left (3 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (1-\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^4}}+\frac {\left (3 \sqrt {x} \sqrt {1+x^3}\right ) \text {Subst}\left (\int \frac {1}{\left (1+\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx,x,\sqrt {x}\right )}{2 \sqrt {x+x^4}} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(21)=42\).
Time = 7.51 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.43 \[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \sqrt {x+x^4}} \, dx=\frac {2 \sqrt {x} \sqrt {1+x^3} \text {arctanh}\left (\frac {\sqrt {x} \sqrt {1+x^3}}{1-x+x^2}\right )}{\sqrt {x+x^4}} \]
[In]
[Out]
Time = 2.16 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33
method | result | size |
trager | \(-\ln \left (\frac {-2 x^{2}+2 \sqrt {x^{4}+x}-1}{-1+2 x}\right )\) | \(28\) |
default | \(\frac {\ln \left (-2 x^{3}-2 x \sqrt {x^{4}+x}-1\right )}{3}+\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) x}{\left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}\, \left (1+x \right )^{2} \sqrt {-\frac {x -\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\left (\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}\, \sqrt {-\frac {x -\frac {1}{2}-\frac {i \sqrt {3}}{2}}{\left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}\, \operatorname {EllipticF}\left (\sqrt {\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) x}{\left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}, \sqrt {\frac {\left (-\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\right )}{\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {x \left (1+x \right ) \left (x -\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (x -\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}}-\frac {\left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \sqrt {\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) x}{\left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}\, \left (1+x \right )^{2} \sqrt {-\frac {x -\frac {1}{2}+\frac {i \sqrt {3}}{2}}{\left (\frac {1}{2}-\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}\, \sqrt {-\frac {x -\frac {1}{2}-\frac {i \sqrt {3}}{2}}{\left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}\, \left (\operatorname {EllipticF}\left (\sqrt {\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) x}{\left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}, \sqrt {\frac {\left (-\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\right )+2 \operatorname {EllipticPi}\left (\sqrt {\frac {\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) x}{\left (\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (1+x \right )}}, \frac {\frac {3}{2}+\frac {3 i \sqrt {3}}{2}}{\frac {3}{2}+\frac {i \sqrt {3}}{2}}, \sqrt {\frac {\left (-\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \left (-\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}{\left (-\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (-\frac {3}{2}-\frac {i \sqrt {3}}{2}\right )}}\right )\right )}{\left (\frac {3}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {x \left (1+x \right ) \left (x -\frac {1}{2}+\frac {i \sqrt {3}}{2}\right ) \left (x -\frac {1}{2}-\frac {i \sqrt {3}}{2}\right )}}\) | \(511\) |
elliptic | \(\text {Expression too large to display}\) | \(780\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19 \[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \sqrt {x+x^4}} \, dx=\log \left (\frac {2 \, x^{2} + 2 \, \sqrt {x^{4} + x} + 1}{2 \, x - 1}\right ) \]
[In]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \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 (2 x - 1\right )}\, dx \]
[In]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \sqrt {x+x^4}} \, dx=\int { \frac {2 \, x^{2} - 2 \, x - 1}{\sqrt {x^{4} + x} {\left (2 \, x - 1\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \sqrt {x+x^4}} \, dx=\int { \frac {2 \, x^{2} - 2 \, x - 1}{\sqrt {x^{4} + x} {\left (2 \, x - 1\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {-1-2 x+2 x^2}{(-1+2 x) \sqrt {x+x^4}} \, dx=\int -\frac {-2\,x^2+2\,x+1}{\left (2\,x-1\right )\,\sqrt {x^4+x}} \,d x \]
[In]
[Out]