\(\int \frac {\sqrt {-1-x-x^2+x^4} (2+x+2 x^4)}{(-1-x+x^4) (-1-x+x^2+x^4)} \, dx\) [710]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 49, antiderivative size = 55 \[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=2 \arctan \left (\frac {x}{\sqrt {-1-x-x^2+x^4}}\right )-2 \sqrt {2} \arctan \left (\frac {\sqrt {2} x}{\sqrt {-1-x-x^2+x^4}}\right ) \]

[Out]

2*arctan(x/(x^4-x^2-x-1)^(1/2))-2*2^(1/2)*arctan(2^(1/2)*x/(x^4-x^2-x-1)^(1/2))

Rubi [F]

\[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=\int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx \]

[In]

Int[(Sqrt[-1 - x - x^2 + x^4]*(2 + x + 2*x^4))/((-1 - x + x^4)*(-1 - x + x^2 + x^4)),x]

[Out]

Defer[Int][Sqrt[-1 - x - x^2 + x^4]/(1 - x), x] + 2*Defer[Int][Sqrt[-1 - x - x^2 + x^4]/(1 + 2*x + x^2 + x^3),
 x] - Defer[Int][(x*Sqrt[-1 - x - x^2 + x^4])/(1 + 2*x + x^2 + x^3), x] + 2*Defer[Int][(x^2*Sqrt[-1 - x - x^2
+ x^4])/(1 + 2*x + x^2 + x^3), x] + Defer[Int][Sqrt[-1 - x - x^2 + x^4]/(-1 - x + x^4), x] + 4*Defer[Int][(x^2
*Sqrt[-1 - x - x^2 + x^4])/(-1 - x + x^4), x] - Defer[Int][(x^3*Sqrt[-1 - x - x^2 + x^4])/(-1 - x + x^4), x]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\sqrt {-1-x-x^2+x^4}}{1-x}+\frac {\left (2-x+2 x^2\right ) \sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3}+\frac {\left (1+4 x^2-x^3\right ) \sqrt {-1-x-x^2+x^4}}{-1-x+x^4}\right ) \, dx \\ & = \int \frac {\sqrt {-1-x-x^2+x^4}}{1-x} \, dx+\int \frac {\left (2-x+2 x^2\right ) \sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3} \, dx+\int \frac {\left (1+4 x^2-x^3\right ) \sqrt {-1-x-x^2+x^4}}{-1-x+x^4} \, dx \\ & = \int \frac {\sqrt {-1-x-x^2+x^4}}{1-x} \, dx+\int \left (\frac {2 \sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3}-\frac {x \sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3}+\frac {2 x^2 \sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3}\right ) \, dx+\int \left (\frac {\sqrt {-1-x-x^2+x^4}}{-1-x+x^4}+\frac {4 x^2 \sqrt {-1-x-x^2+x^4}}{-1-x+x^4}-\frac {x^3 \sqrt {-1-x-x^2+x^4}}{-1-x+x^4}\right ) \, dx \\ & = 2 \int \frac {\sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3} \, dx+2 \int \frac {x^2 \sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3} \, dx+4 \int \frac {x^2 \sqrt {-1-x-x^2+x^4}}{-1-x+x^4} \, dx+\int \frac {\sqrt {-1-x-x^2+x^4}}{1-x} \, dx-\int \frac {x \sqrt {-1-x-x^2+x^4}}{1+2 x+x^2+x^3} \, dx+\int \frac {\sqrt {-1-x-x^2+x^4}}{-1-x+x^4} \, dx-\int \frac {x^3 \sqrt {-1-x-x^2+x^4}}{-1-x+x^4} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=2 \arctan \left (\frac {x}{\sqrt {-1-x-x^2+x^4}}\right )-2 \sqrt {2} \arctan \left (\frac {\sqrt {2} x}{\sqrt {-1-x-x^2+x^4}}\right ) \]

[In]

Integrate[(Sqrt[-1 - x - x^2 + x^4]*(2 + x + 2*x^4))/((-1 - x + x^4)*(-1 - x + x^2 + x^4)),x]

[Out]

2*ArcTan[x/Sqrt[-1 - x - x^2 + x^4]] - 2*Sqrt[2]*ArcTan[(Sqrt[2]*x)/Sqrt[-1 - x - x^2 + x^4]]

Maple [A] (verified)

Time = 21.19 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.96

method result size
default \(2 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {x^{4}-x^{2}-x -1}}{2 x}\right )-2 \arctan \left (\frac {\sqrt {x^{4}-x^{2}-x -1}}{x}\right )\) \(53\)
pseudoelliptic \(2 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {x^{4}-x^{2}-x -1}}{2 x}\right )-2 \arctan \left (\frac {\sqrt {x^{4}-x^{2}-x -1}}{x}\right )\) \(53\)
trager \(\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{4}-2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{2}+2 \sqrt {x^{4}-x^{2}-x -1}\, x -\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x -\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )}{x^{4}-x -1}\right )+\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) \ln \left (-\frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{4}+3 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{2}+4 \sqrt {x^{4}-x^{2}-x -1}\, x +\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x +\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right )}{\left (x -1\right ) \left (x^{3}+x^{2}+2 x +1\right )}\right )\) \(162\)
elliptic \(\text {Expression too large to display}\) \(788632\)

[In]

int((x^4-x^2-x-1)^(1/2)*(2*x^4+x+2)/(x^4-x-1)/(x^4+x^2-x-1),x,method=_RETURNVERBOSE)

[Out]

2*2^(1/2)*arctan(1/2*2^(1/2)/x*(x^4-x^2-x-1)^(1/2))-2*arctan(1/x*(x^4-x^2-x-1)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.40 \[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=-\sqrt {2} \arctan \left (\frac {2 \, \sqrt {2} \sqrt {x^{4} - x^{2} - x - 1} x}{x^{4} - 3 \, x^{2} - x - 1}\right ) + \arctan \left (\frac {2 \, \sqrt {x^{4} - x^{2} - x - 1} x}{x^{4} - 2 \, x^{2} - x - 1}\right ) \]

[In]

integrate((x^4-x^2-x-1)^(1/2)*(2*x^4+x+2)/(x^4-x-1)/(x^4+x^2-x-1),x, algorithm="fricas")

[Out]

-sqrt(2)*arctan(2*sqrt(2)*sqrt(x^4 - x^2 - x - 1)*x/(x^4 - 3*x^2 - x - 1)) + arctan(2*sqrt(x^4 - x^2 - x - 1)*
x/(x^4 - 2*x^2 - x - 1))

Sympy [F(-1)]

Timed out. \[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=\text {Timed out} \]

[In]

integrate((x**4-x**2-x-1)**(1/2)*(2*x**4+x+2)/(x**4-x-1)/(x**4+x**2-x-1),x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=\int { \frac {{\left (2 \, x^{4} + x + 2\right )} \sqrt {x^{4} - x^{2} - x - 1}}{{\left (x^{4} + x^{2} - x - 1\right )} {\left (x^{4} - x - 1\right )}} \,d x } \]

[In]

integrate((x^4-x^2-x-1)^(1/2)*(2*x^4+x+2)/(x^4-x-1)/(x^4+x^2-x-1),x, algorithm="maxima")

[Out]

integrate((2*x^4 + x + 2)*sqrt(x^4 - x^2 - x - 1)/((x^4 + x^2 - x - 1)*(x^4 - x - 1)), x)

Giac [F]

\[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=\int { \frac {{\left (2 \, x^{4} + x + 2\right )} \sqrt {x^{4} - x^{2} - x - 1}}{{\left (x^{4} + x^{2} - x - 1\right )} {\left (x^{4} - x - 1\right )}} \,d x } \]

[In]

integrate((x^4-x^2-x-1)^(1/2)*(2*x^4+x+2)/(x^4-x-1)/(x^4+x^2-x-1),x, algorithm="giac")

[Out]

integrate((2*x^4 + x + 2)*sqrt(x^4 - x^2 - x - 1)/((x^4 + x^2 - x - 1)*(x^4 - x - 1)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {-1-x-x^2+x^4} \left (2+x+2 x^4\right )}{\left (-1-x+x^4\right ) \left (-1-x+x^2+x^4\right )} \, dx=\int \frac {\left (2\,x^4+x+2\right )\,\sqrt {x^4-x^2-x-1}}{\left (-x^4+x+1\right )\,\left (-x^4-x^2+x+1\right )} \,d x \]

[In]

int(((x + 2*x^4 + 2)*(x^4 - x^2 - x - 1)^(1/2))/((x - x^4 + 1)*(x - x^2 - x^4 + 1)),x)

[Out]

int(((x + 2*x^4 + 2)*(x^4 - x^2 - x - 1)^(1/2))/((x - x^4 + 1)*(x - x^2 - x^4 + 1)), x)