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

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

Optimal result

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

[Out]

-x*(x^6+1)^(1/2)/(x^4-x^2+1)

Rubi [F]

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

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {2}{\sqrt {1+x^6}}-\frac {3}{\left (1-x^2+x^4\right ) \sqrt {1+x^6}}\right ) \, dx \\ & = 2 \int \frac {1}{\sqrt {1+x^6}} \, dx-3 \int \frac {1}{\left (1-x^2+x^4\right ) \sqrt {1+x^6}} \, dx \\ & = \frac {x \left (1+x^2\right ) \sqrt {\frac {1-x^2+x^4}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x^2}{1+\left (1+\sqrt {3}\right ) x^2}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x^2 \left (1+x^2\right )}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \sqrt {1+x^6}}-3 \int \left (\frac {2 i}{\sqrt {3} \left (1+i \sqrt {3}-2 x^2\right ) \sqrt {1+x^6}}+\frac {2 i}{\sqrt {3} \left (-1+i \sqrt {3}+2 x^2\right ) \sqrt {1+x^6}}\right ) \, dx \\ & = \frac {x \left (1+x^2\right ) \sqrt {\frac {1-x^2+x^4}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x^2}{1+\left (1+\sqrt {3}\right ) x^2}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x^2 \left (1+x^2\right )}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \sqrt {1+x^6}}-\left (2 i \sqrt {3}\right ) \int \frac {1}{\left (1+i \sqrt {3}-2 x^2\right ) \sqrt {1+x^6}} \, dx-\left (2 i \sqrt {3}\right ) \int \frac {1}{\left (-1+i \sqrt {3}+2 x^2\right ) \sqrt {1+x^6}} \, dx \\ & = \frac {x \left (1+x^2\right ) \sqrt {\frac {1-x^2+x^4}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x^2}{1+\left (1+\sqrt {3}\right ) x^2}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x^2 \left (1+x^2\right )}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \sqrt {1+x^6}}-\left (2 i \sqrt {3}\right ) \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-\left (2 i \sqrt {3}\right ) \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 \\ & = \frac {x \left (1+x^2\right ) \sqrt {\frac {1-x^2+x^4}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \operatorname {EllipticF}\left (\arccos \left (\frac {1+\left (1-\sqrt {3}\right ) x^2}{1+\left (1+\sqrt {3}\right ) x^2}\right ),\frac {1}{4} \left (2+\sqrt {3}\right )\right )}{\sqrt [4]{3} \sqrt {\frac {x^2 \left (1+x^2\right )}{\left (1+\left (1+\sqrt {3}\right ) x^2\right )^2}} \sqrt {1+x^6}}+\frac {i \int \frac {1}{\left (\sqrt {1-i \sqrt {3}}-\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx}{\sqrt {\frac {1}{3} \left (1-i \sqrt {3}\right )}}+\frac {i \int \frac {1}{\left (\sqrt {1-i \sqrt {3}}+\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx}{\sqrt {\frac {1}{3} \left (1-i \sqrt {3}\right )}}-\frac {i \int \frac {1}{\left (\sqrt {1+i \sqrt {3}}-\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx}{\sqrt {\frac {1}{3} \left (1+i \sqrt {3}\right )}}-\frac {i \int \frac {1}{\left (\sqrt {1+i \sqrt {3}}+\sqrt {2} x\right ) \sqrt {1+x^6}} \, dx}{\sqrt {\frac {1}{3} \left (1+i \sqrt {3}\right )}} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 1.30 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.67

method result size
gosper \(-\frac {\left (x^{2}+1\right ) x}{\sqrt {x^{6}+1}}\) \(16\)
risch \(-\frac {\left (x^{2}+1\right ) x}{\sqrt {x^{6}+1}}\) \(16\)
trager \(-\frac {x \sqrt {x^{6}+1}}{x^{4}-x^{2}+1}\) \(23\)

[In]

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

[Out]

-(x^2+1)*x/(x^6+1)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92 \[ \int \frac {-1-2 x^2+2 x^4}{\left (1-x^2+x^4\right ) \sqrt {1+x^6}} \, dx=-\frac {\sqrt {x^{6} + 1} x}{x^{4} - x^{2} + 1} \]

[In]

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

[Out]

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

Sympy [F]

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08 \[ \int \frac {-1-2 x^2+2 x^4}{\left (1-x^2+x^4\right ) \sqrt {1+x^6}} \, dx=-\frac {x^{3} + x}{\sqrt {x^{4} - x^{2} + 1} \sqrt {x^{2} + 1}} \]

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92 \[ \int \frac {-1-2 x^2+2 x^4}{\left (1-x^2+x^4\right ) \sqrt {1+x^6}} \, dx=-\frac {x\,\sqrt {x^6+1}}{x^4-x^2+1} \]

[In]

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

[Out]

-(x*(x^6 + 1)^(1/2))/(x^4 - x^2 + 1)