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

Optimal. Leaf size=87 \[ \text {ArcTan}\left (\frac {x \sqrt {1-x^2-x^4-x^6}}{-1+x^2+x^4+x^6}\right )-\sqrt {2} \text {ArcTan}\left (\frac {\sqrt {2} x \sqrt {1-x^2-x^4-x^6}}{-1+x^2+x^4+x^6}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [F]
time = 1.72, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {\left (1-x^2+2 x^4\right ) \sqrt {1-x^2-x^4-x^6}}{\left (-1+x^2\right ) \left (1+x^2\right ) \left (-1+x^4+x^6\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.15, size = 62, normalized size = 0.71 \begin {gather*} -\text {ArcTan}\left (\frac {x}{\sqrt {1-x^2-x^4-x^6}}\right )+\sqrt {2} \text {ArcTan}\left (\frac {\sqrt {2} x}{\sqrt {1-x^2-x^4-x^6}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 1.63, size = 175, normalized size = 2.01

method result size
trager \(-\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}+2\right ) x^{6}+\RootOf \left (\textit {\_Z}^{2}+2\right ) x^{4}+3 \RootOf \left (\textit {\_Z}^{2}+2\right ) x^{2}+4 \sqrt {-x^{6}-x^{4}-x^{2}+1}\, x -\RootOf \left (\textit {\_Z}^{2}+2\right )}{\left (-1+x \right ) \left (1+x \right ) \left (x^{2}+1\right )^{2}}\right )}{2}+\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}+1\right ) x^{6}+\RootOf \left (\textit {\_Z}^{2}+1\right ) x^{4}+2 \RootOf \left (\textit {\_Z}^{2}+1\right ) x^{2}+2 \sqrt {-x^{6}-x^{4}-x^{2}+1}\, x -\RootOf \left (\textit {\_Z}^{2}+1\right )}{x^{6}+x^{4}-1}\right )}{2}\) \(175\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*RootOf(_Z^2+2)*ln(-(RootOf(_Z^2+2)*x^6+RootOf(_Z^2+2)*x^4+3*RootOf(_Z^2+2)*x^2+4*(-x^6-x^4-x^2+1)^(1/2)*x
-RootOf(_Z^2+2))/(-1+x)/(1+x)/(x^2+1)^2)+1/2*RootOf(_Z^2+1)*ln(-(RootOf(_Z^2+1)*x^6+RootOf(_Z^2+1)*x^4+2*RootO
f(_Z^2+1)*x^2+2*(-x^6-x^4-x^2+1)^(1/2)*x-RootOf(_Z^2+1))/(x^6+x^4-1))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (79) = 158\).
time = 0.48, size = 184, normalized size = 2.11 \begin {gather*} -\frac {1}{10} \, \sqrt {2} \arctan \left (\frac {2 \, \sqrt {2} {\left (6 \, x^{7} + x^{5} - 4 \, x^{3} + x\right )} \sqrt {-x^{6} - x^{4} - x^{2} + 1}}{17 \, x^{10} + 11 \, x^{8} - 2 \, x^{6} - 18 \, x^{4} + 9 \, x^{2} - 1}\right ) + \frac {1}{5} \, \sqrt {2} \arctan \left (\frac {2 \, \sqrt {2} {\left (x^{7} + x^{3} - 2 \, x\right )} \sqrt {-x^{6} - x^{4} - x^{2} + 1}}{3 \, x^{10} + 3 \, x^{8} + 10 \, x^{6} + 6 \, x^{4} + 11 \, x^{2} - 1}\right ) + \frac {1}{2} \, \arctan \left (\frac {2 \, \sqrt {-x^{6} - x^{4} - x^{2} + 1} x}{x^{6} + x^{4} + 2 \, x^{2} - 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/10*sqrt(2)*arctan(2*sqrt(2)*(6*x^7 + x^5 - 4*x^3 + x)*sqrt(-x^6 - x^4 - x^2 + 1)/(17*x^10 + 11*x^8 - 2*x^6
- 18*x^4 + 9*x^2 - 1)) + 1/5*sqrt(2)*arctan(2*sqrt(2)*(x^7 + x^3 - 2*x)*sqrt(-x^6 - x^4 - x^2 + 1)/(3*x^10 + 3
*x^8 + 10*x^6 + 6*x^4 + 11*x^2 - 1)) + 1/2*arctan(2*sqrt(-x^6 - x^4 - x^2 + 1)*x/(x^6 + x^4 + 2*x^2 - 1))

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (2\,x^4-x^2+1\right )\,\sqrt {-x^6-x^4-x^2+1}}{\left (x^2-1\right )\,\left (x^2+1\right )\,\left (x^6+x^4-1\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________