\(\int \frac {\sqrt {-1-2 x^2-2 x^3-x^8} (-1+x^3+3 x^8)}{(1+2 x^3+x^8) (1+x^2+2 x^3+x^8)} \, dx\) [1324]

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

Optimal result

Integrand size = 59, antiderivative size = 95 \[ \int \frac {\sqrt {-1-2 x^2-2 x^3-x^8} \left (-1+x^3+3 x^8\right )}{\left (1+2 x^3+x^8\right ) \left (1+x^2+2 x^3+x^8\right )} \, dx=\arctan \left (\frac {x \sqrt {-1-2 x^2-2 x^3-x^8}}{1+2 x^2+2 x^3+x^8}\right )-\sqrt {2} \arctan \left (\frac {\sqrt {2} x \sqrt {-1-2 x^2-2 x^3-x^8}}{1+2 x^2+2 x^3+x^8}\right ) \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.33 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.65 \[ \int \frac {\sqrt {-1-2 x^2-2 x^3-x^8} \left (-1+x^3+3 x^8\right )}{\left (1+2 x^3+x^8\right ) \left (1+x^2+2 x^3+x^8\right )} \, dx=-\arctan \left (\frac {x}{\sqrt {-1-2 x^2-2 x^3-x^8}}\right )+\sqrt {2} \arctan \left (\frac {\sqrt {2} x}{\sqrt {-1-2 x^2-2 x^3-x^8}}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 6.34 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.62

method result size
pseudoelliptic \(\arctan \left (\frac {\sqrt {-x^{8}-2 x^{3}-2 x^{2}-1}}{x}\right )-\sqrt {2}\, \arctan \left (\frac {\sqrt {-x^{8}-2 x^{3}-2 x^{2}-1}\, \sqrt {2}}{2 x}\right )\) \(59\)
trager \(\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) \ln \left (\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{8}+2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{3}+4 \operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right ) x^{2}-4 \sqrt {-x^{8}-2 x^{3}-2 x^{2}-1}\, x +\operatorname {RootOf}\left (\textit {\_Z}^{2}+2\right )}{\left (1+x \right ) \left (x^{7}-x^{6}+x^{5}-x^{4}+x^{3}+x^{2}-x +1\right )}\right )}{2}-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{8}-2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{3}-3 \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) x^{2}+2 \sqrt {-x^{8}-2 x^{3}-2 x^{2}-1}\, x -\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right )}{x^{8}+2 x^{3}+x^{2}+1}\right )}{2}\) \(197\)

[In]

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

[Out]

arctan((-x^8-2*x^3-2*x^2-1)^(1/2)/x)-2^(1/2)*arctan(1/2*(-x^8-2*x^3-2*x^2-1)^(1/2)/x*2^(1/2))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.58 (sec) , antiderivative size = 241, normalized size of antiderivative = 2.54 \[ \int \frac {\sqrt {-1-2 x^2-2 x^3-x^8} \left (-1+x^3+3 x^8\right )}{\left (1+2 x^3+x^8\right ) \left (1+x^2+2 x^3+x^8\right )} \, dx=-\frac {1}{4} \, \sqrt {-2} \log \left (-\frac {2 \, {\left (\sqrt {-2} {\left (x^{8} + 2 \, x^{3} + 4 \, x^{2} + 1\right )} + 4 \, \sqrt {-x^{8} - 2 \, x^{3} - 2 \, x^{2} - 1} x\right )}}{x^{8} + 2 \, x^{3} + 1}\right ) + \frac {1}{4} \, \sqrt {-2} \log \left (\frac {2 \, {\left (\sqrt {-2} {\left (x^{8} + 2 \, x^{3} + 4 \, x^{2} + 1\right )} - 4 \, \sqrt {-x^{8} - 2 \, x^{3} - 2 \, x^{2} - 1} x\right )}}{x^{8} + 2 \, x^{3} + 1}\right ) - \frac {1}{4} i \, \log \left (\frac {i \, x^{8} + 2 i \, x^{3} + 3 i \, x^{2} - 2 \, \sqrt {-x^{8} - 2 \, x^{3} - 2 \, x^{2} - 1} x + i}{x^{8} + 2 \, x^{3} + x^{2} + 1}\right ) + \frac {1}{4} i \, \log \left (\frac {-i \, x^{8} - 2 i \, x^{3} - 3 i \, x^{2} - 2 \, \sqrt {-x^{8} - 2 \, x^{3} - 2 \, x^{2} - 1} x - i}{x^{8} + 2 \, x^{3} + x^{2} + 1}\right ) \]

[In]

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

[Out]

-1/4*sqrt(-2)*log(-2*(sqrt(-2)*(x^8 + 2*x^3 + 4*x^2 + 1) + 4*sqrt(-x^8 - 2*x^3 - 2*x^2 - 1)*x)/(x^8 + 2*x^3 +
1)) + 1/4*sqrt(-2)*log(2*(sqrt(-2)*(x^8 + 2*x^3 + 4*x^2 + 1) - 4*sqrt(-x^8 - 2*x^3 - 2*x^2 - 1)*x)/(x^8 + 2*x^
3 + 1)) - 1/4*I*log((I*x^8 + 2*I*x^3 + 3*I*x^2 - 2*sqrt(-x^8 - 2*x^3 - 2*x^2 - 1)*x + I)/(x^8 + 2*x^3 + x^2 +
1)) + 1/4*I*log((-I*x^8 - 2*I*x^3 - 3*I*x^2 - 2*sqrt(-x^8 - 2*x^3 - 2*x^2 - 1)*x - I)/(x^8 + 2*x^3 + x^2 + 1))

Sympy [F]

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

[In]

integrate((-x**8-2*x**3-2*x**2-1)**(1/2)*(3*x**8+x**3-1)/(x**8+2*x**3+1)/(x**8+2*x**3+x**2+1),x)

[Out]

Integral((3*x**8 + x**3 - 1)*sqrt(-x**8 - 2*x**3 - 2*x**2 - 1)/((x + 1)*(x**8 + 2*x**3 + x**2 + 1)*(x**7 - x**
6 + x**5 - x**4 + x**3 + x**2 - x + 1)), x)

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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