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

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

Optimal result

Integrand size = 61, antiderivative size = 163 \[ \int \frac {\sqrt {1+2 x^2-x^4} \left (-1+x^4\right ) \left (1+x^4\right )}{\left (-1-x^2+x^4\right ) \left (1+3 x^2-x^4-3 x^6+x^8\right )} \, dx=-\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \arctan \left (\frac {\sqrt {-\frac {1}{2}+\frac {\sqrt {5}}{2}} x \sqrt {1+2 x^2-x^4}}{-1-2 x^2+x^4}\right )-\text {arctanh}\left (\frac {x \sqrt {1+2 x^2-x^4}}{-1-2 x^2+x^4}\right )+\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {\frac {1}{2}+\frac {\sqrt {5}}{2}} x \sqrt {1+2 x^2-x^4}}{-1-2 x^2+x^4}\right ) \]

[Out]

-1/10*(10+10*5^(1/2))^(1/2)*arctan(1/2*(-2+2*5^(1/2))^(1/2)*x*(-x^4+2*x^2+1)^(1/2)/(x^4-2*x^2-1))-arctanh(x*(-
x^4+2*x^2+1)^(1/2)/(x^4-2*x^2-1))+1/10*(-10+10*5^(1/2))^(1/2)*arctanh(1/2*(2+2*5^(1/2))^(1/2)*x*(-x^4+2*x^2+1)
^(1/2)/(x^4-2*x^2-1))

Rubi [F]

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

[In]

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

[Out]

(2*EllipticE[ArcSin[Sqrt[-1 + Sqrt[2]]*x], -3 - 2*Sqrt[2]])/Sqrt[1 + Sqrt[2]] - ((1 + 2*Sqrt[2] - Sqrt[5])*Ell
ipticF[ArcSin[Sqrt[-1 + Sqrt[2]]*x], -3 - 2*Sqrt[2]])/(2*Sqrt[-1 + Sqrt[2]]) - ((1 + 2*Sqrt[2] + Sqrt[5])*Elli
pticF[ArcSin[Sqrt[-1 + Sqrt[2]]*x], -3 - 2*Sqrt[2]])/(2*Sqrt[-1 + Sqrt[2]]) + EllipticPi[(2*(1 + Sqrt[2]))/(1
- Sqrt[5]), ArcSin[Sqrt[-1 + Sqrt[2]]*x], -3 - 2*Sqrt[2]]/Sqrt[-1 + Sqrt[2]] + EllipticPi[(2*(1 + Sqrt[2]))/(1
 + Sqrt[5]), ArcSin[Sqrt[-1 + Sqrt[2]]*x], -3 - 2*Sqrt[2]]/Sqrt[-1 + Sqrt[2]] + 2*Defer[Int][Sqrt[1 + 2*x^2 -
x^4]/(1 + 3*x^2 - x^4 - 3*x^6 + x^8), x] - Defer[Int][(x^2*Sqrt[1 + 2*x^2 - x^4])/(1 + 3*x^2 - x^4 - 3*x^6 + x
^8), x] - 4*Defer[Int][(x^4*Sqrt[1 + 2*x^2 - x^4])/(1 + 3*x^2 - x^4 - 3*x^6 + x^8), x] + 2*Defer[Int][(x^6*Sqr
t[1 + 2*x^2 - x^4])/(1 + 3*x^2 - x^4 - 3*x^6 + x^8), x]

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

Mathematica [A] (verified)

Time = 0.75 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.69 \[ \int \frac {\sqrt {1+2 x^2-x^4} \left (-1+x^4\right ) \left (1+x^4\right )}{\left (-1-x^2+x^4\right ) \left (1+3 x^2-x^4-3 x^6+x^8\right )} \, dx=\sqrt {\frac {1}{10} \left (1+\sqrt {5}\right )} \arctan \left (\frac {\sqrt {-1+\sqrt {5}} x}{\sqrt {2+4 x^2-2 x^4}}\right )-\sqrt {\frac {1}{10} \left (-1+\sqrt {5}\right )} \text {arctanh}\left (\frac {\sqrt {1+\sqrt {5}} x}{\sqrt {2+4 x^2-2 x^4}}\right )+\text {arctanh}\left (\frac {x}{\sqrt {1+2 x^2-x^4}}\right ) \]

[In]

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

[Out]

Sqrt[(1 + Sqrt[5])/10]*ArcTan[(Sqrt[-1 + Sqrt[5]]*x)/Sqrt[2 + 4*x^2 - 2*x^4]] - Sqrt[(-1 + Sqrt[5])/10]*ArcTan
h[(Sqrt[1 + Sqrt[5]]*x)/Sqrt[2 + 4*x^2 - 2*x^4]] + ArcTanh[x/Sqrt[1 + 2*x^2 - x^4]]

Maple [A] (verified)

Time = 10.34 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.69

method result size
elliptic \(\frac {\left (-\frac {2 \sqrt {5}\, \arctan \left (\frac {\sqrt {-x^{4}+2 x^{2}+1}\, \sqrt {2}}{x \sqrt {\sqrt {5}-1}}\right )}{5 \sqrt {\sqrt {5}-1}}-\frac {2 \sqrt {5}\, \operatorname {arctanh}\left (\frac {\sqrt {-x^{4}+2 x^{2}+1}\, \sqrt {2}}{x \sqrt {\sqrt {5}+1}}\right )}{5 \sqrt {\sqrt {5}+1}}+\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {-x^{4}+2 x^{2}+1}}{x}\right )\right ) \sqrt {2}}{2}\) \(112\)
default \(\frac {\left (-\frac {1}{50}+\frac {i}{150}\right ) \left (\left (\left (-90-30 i\right ) \sqrt {2+2 i}\, \sqrt {-x^{4}+2 x^{2}+1}+\left (120+240 i\right ) x \right ) \operatorname {arctanh}\left (\frac {\sqrt {-x^{4}+2 x^{2}+1}}{x}\right )+\left (\arctan \left (\frac {-15 \sqrt {-x^{4}+2 x^{2}+1}\, \sqrt {2+2 i}\, x +3 \left (\left (-\frac {1}{3}+i\right ) x^{4}+\left (-2-\frac {2 i}{3}\right ) x^{2}+\frac {1}{3}-i\right ) \sqrt {5}+3 \left (-5+\frac {5 i}{3}\right ) x^{4}+20 x^{2}+15-5 i}{\sqrt {65+105 i+\left (15+55 i\right ) \sqrt {5}}\, \left (x^{2}+i\right )^{2}}\right ) \left (-1+3 i+\left (-3+i\right ) \sqrt {5}\right ) \sqrt {65+105 i+\left (-15-55 i\right ) \sqrt {5}}+120+240 i+\arctan \left (\frac {15 \sqrt {-x^{4}+2 x^{2}+1}\, \sqrt {2+2 i}\, x +3 \left (\left (-\frac {1}{3}+i\right ) x^{4}+\left (-2-\frac {2 i}{3}\right ) x^{2}+\frac {1}{3}-i\right ) \sqrt {5}+3 \left (5-\frac {5 i}{3}\right ) x^{4}-20 x^{2}-15+5 i}{\sqrt {65+105 i+\left (-15-55 i\right ) \sqrt {5}}\, \left (x^{2}+i\right )^{2}}\right ) \left (1-3 i+\left (-3+i\right ) \sqrt {5}\right ) \sqrt {65+105 i+\left (15+55 i\right ) \sqrt {5}}\right ) \left (\sqrt {2+2 i}\, x -\sqrt {-x^{4}+2 x^{2}+1}\right )\right ) x}{\left (i x^{2}-1-\sqrt {2+2 i}\, x +\sqrt {-x^{4}+2 x^{2}+1}\right ) \left (i x^{2}-1+\sqrt {2+2 i}\, x -\sqrt {-x^{4}+2 x^{2}+1}\right )}\) \(368\)
pseudoelliptic \(\frac {\left (-\frac {1}{50}+\frac {i}{150}\right ) \left (\left (\left (-90-30 i\right ) \sqrt {2+2 i}\, \sqrt {-x^{4}+2 x^{2}+1}+\left (120+240 i\right ) x \right ) \operatorname {arctanh}\left (\frac {\sqrt {-x^{4}+2 x^{2}+1}}{x}\right )+\left (\arctan \left (\frac {-15 \sqrt {-x^{4}+2 x^{2}+1}\, \sqrt {2+2 i}\, x +3 \left (\left (-\frac {1}{3}+i\right ) x^{4}+\left (-2-\frac {2 i}{3}\right ) x^{2}+\frac {1}{3}-i\right ) \sqrt {5}+3 \left (-5+\frac {5 i}{3}\right ) x^{4}+20 x^{2}+15-5 i}{\sqrt {65+105 i+\left (15+55 i\right ) \sqrt {5}}\, \left (x^{2}+i\right )^{2}}\right ) \left (-1+3 i+\left (-3+i\right ) \sqrt {5}\right ) \sqrt {65+105 i+\left (-15-55 i\right ) \sqrt {5}}+120+240 i+\arctan \left (\frac {15 \sqrt {-x^{4}+2 x^{2}+1}\, \sqrt {2+2 i}\, x +3 \left (\left (-\frac {1}{3}+i\right ) x^{4}+\left (-2-\frac {2 i}{3}\right ) x^{2}+\frac {1}{3}-i\right ) \sqrt {5}+3 \left (5-\frac {5 i}{3}\right ) x^{4}-20 x^{2}-15+5 i}{\sqrt {65+105 i+\left (-15-55 i\right ) \sqrt {5}}\, \left (x^{2}+i\right )^{2}}\right ) \left (1-3 i+\left (-3+i\right ) \sqrt {5}\right ) \sqrt {65+105 i+\left (15+55 i\right ) \sqrt {5}}\right ) \left (\sqrt {2+2 i}\, x -\sqrt {-x^{4}+2 x^{2}+1}\right )\right ) x}{\left (i x^{2}-1-\sqrt {2+2 i}\, x +\sqrt {-x^{4}+2 x^{2}+1}\right ) \left (i x^{2}-1+\sqrt {2+2 i}\, x -\sqrt {-x^{4}+2 x^{2}+1}\right )}\) \(368\)
trager \(-\frac {\ln \left (-\frac {x^{4}+2 \sqrt {-x^{4}+2 x^{2}+1}\, x -3 x^{2}-1}{x^{4}-x^{2}-1}\right )}{2}+\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \ln \left (-\frac {1200 \operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{4} x^{2}+60 \operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2} x^{4}-140 \operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right ) \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2} x^{2}-\operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right ) x^{4}+200 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2} \sqrt {-x^{4}+2 x^{2}+1}\, x -60 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2} \operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right )+2 \operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right ) x^{2}-10 \sqrt {-x^{4}+2 x^{2}+1}\, x +\operatorname {RootOf}\left (\textit {\_Z}^{2}+100 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+5\right )}{20 x^{2} \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}-x^{4}+2 x^{2}+1}\right )}{10}+\operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right ) \ln \left (\frac {-600 x^{2} \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{5}+30 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{3} x^{4}-130 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{3} x^{2}+2 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right ) x^{4}+10 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2} \sqrt {-x^{4}+2 x^{2}+1}\, x -30 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{3}-6 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right ) x^{2}+\sqrt {-x^{4}+2 x^{2}+1}\, x -2 \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )}{20 x^{2} \operatorname {RootOf}\left (400 \textit {\_Z}^{4}+20 \textit {\_Z}^{2}-1\right )^{2}+x^{4}-x^{2}-1}\right )\) \(631\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 627 vs. \(2 (132) = 264\).

Time = 0.40 (sec) , antiderivative size = 627, normalized size of antiderivative = 3.85 \[ \int \frac {\sqrt {1+2 x^2-x^4} \left (-1+x^4\right ) \left (1+x^4\right )}{\left (-1-x^2+x^4\right ) \left (1+3 x^2-x^4-3 x^6+x^8\right )} \, dx=\frac {1}{40} \, \sqrt {10} \sqrt {\sqrt {5} - 1} \log \left (\frac {\sqrt {10} {\left (5 \, x^{8} - 35 \, x^{6} + 45 \, x^{4} + 35 \, x^{2} + \sqrt {5} {\left (3 \, x^{8} - 17 \, x^{6} + 19 \, x^{4} + 17 \, x^{2} + 3\right )} + 5\right )} \sqrt {\sqrt {5} - 1} + 20 \, {\left (3 \, x^{5} - 7 \, x^{3} + \sqrt {5} {\left (x^{5} - 3 \, x^{3} - x\right )} - 3 \, x\right )} \sqrt {-x^{4} + 2 \, x^{2} + 1}}{x^{8} - 3 \, x^{6} - x^{4} + 3 \, x^{2} + 1}\right ) - \frac {1}{40} \, \sqrt {10} \sqrt {\sqrt {5} - 1} \log \left (-\frac {\sqrt {10} {\left (5 \, x^{8} - 35 \, x^{6} + 45 \, x^{4} + 35 \, x^{2} + \sqrt {5} {\left (3 \, x^{8} - 17 \, x^{6} + 19 \, x^{4} + 17 \, x^{2} + 3\right )} + 5\right )} \sqrt {\sqrt {5} - 1} - 20 \, {\left (3 \, x^{5} - 7 \, x^{3} + \sqrt {5} {\left (x^{5} - 3 \, x^{3} - x\right )} - 3 \, x\right )} \sqrt {-x^{4} + 2 \, x^{2} + 1}}{x^{8} - 3 \, x^{6} - x^{4} + 3 \, x^{2} + 1}\right ) + \frac {1}{40} \, \sqrt {10} \sqrt {-\sqrt {5} - 1} \log \left (\frac {\sqrt {10} {\left (5 \, x^{8} - 35 \, x^{6} + 45 \, x^{4} + 35 \, x^{2} - \sqrt {5} {\left (3 \, x^{8} - 17 \, x^{6} + 19 \, x^{4} + 17 \, x^{2} + 3\right )} + 5\right )} \sqrt {-\sqrt {5} - 1} + 20 \, {\left (3 \, x^{5} - 7 \, x^{3} - \sqrt {5} {\left (x^{5} - 3 \, x^{3} - x\right )} - 3 \, x\right )} \sqrt {-x^{4} + 2 \, x^{2} + 1}}{x^{8} - 3 \, x^{6} - x^{4} + 3 \, x^{2} + 1}\right ) - \frac {1}{40} \, \sqrt {10} \sqrt {-\sqrt {5} - 1} \log \left (-\frac {\sqrt {10} {\left (5 \, x^{8} - 35 \, x^{6} + 45 \, x^{4} + 35 \, x^{2} - \sqrt {5} {\left (3 \, x^{8} - 17 \, x^{6} + 19 \, x^{4} + 17 \, x^{2} + 3\right )} + 5\right )} \sqrt {-\sqrt {5} - 1} - 20 \, {\left (3 \, x^{5} - 7 \, x^{3} - \sqrt {5} {\left (x^{5} - 3 \, x^{3} - x\right )} - 3 \, x\right )} \sqrt {-x^{4} + 2 \, x^{2} + 1}}{x^{8} - 3 \, x^{6} - x^{4} + 3 \, x^{2} + 1}\right ) + \frac {1}{2} \, \log \left (-\frac {x^{4} - 3 \, x^{2} - 2 \, \sqrt {-x^{4} + 2 \, x^{2} + 1} x - 1}{x^{4} - x^{2} - 1}\right ) \]

[In]

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

[Out]

1/40*sqrt(10)*sqrt(sqrt(5) - 1)*log((sqrt(10)*(5*x^8 - 35*x^6 + 45*x^4 + 35*x^2 + sqrt(5)*(3*x^8 - 17*x^6 + 19
*x^4 + 17*x^2 + 3) + 5)*sqrt(sqrt(5) - 1) + 20*(3*x^5 - 7*x^3 + sqrt(5)*(x^5 - 3*x^3 - x) - 3*x)*sqrt(-x^4 + 2
*x^2 + 1))/(x^8 - 3*x^6 - x^4 + 3*x^2 + 1)) - 1/40*sqrt(10)*sqrt(sqrt(5) - 1)*log(-(sqrt(10)*(5*x^8 - 35*x^6 +
 45*x^4 + 35*x^2 + sqrt(5)*(3*x^8 - 17*x^6 + 19*x^4 + 17*x^2 + 3) + 5)*sqrt(sqrt(5) - 1) - 20*(3*x^5 - 7*x^3 +
 sqrt(5)*(x^5 - 3*x^3 - x) - 3*x)*sqrt(-x^4 + 2*x^2 + 1))/(x^8 - 3*x^6 - x^4 + 3*x^2 + 1)) + 1/40*sqrt(10)*sqr
t(-sqrt(5) - 1)*log((sqrt(10)*(5*x^8 - 35*x^6 + 45*x^4 + 35*x^2 - sqrt(5)*(3*x^8 - 17*x^6 + 19*x^4 + 17*x^2 +
3) + 5)*sqrt(-sqrt(5) - 1) + 20*(3*x^5 - 7*x^3 - sqrt(5)*(x^5 - 3*x^3 - x) - 3*x)*sqrt(-x^4 + 2*x^2 + 1))/(x^8
 - 3*x^6 - x^4 + 3*x^2 + 1)) - 1/40*sqrt(10)*sqrt(-sqrt(5) - 1)*log(-(sqrt(10)*(5*x^8 - 35*x^6 + 45*x^4 + 35*x
^2 - sqrt(5)*(3*x^8 - 17*x^6 + 19*x^4 + 17*x^2 + 3) + 5)*sqrt(-sqrt(5) - 1) - 20*(3*x^5 - 7*x^3 - sqrt(5)*(x^5
 - 3*x^3 - x) - 3*x)*sqrt(-x^4 + 2*x^2 + 1))/(x^8 - 3*x^6 - x^4 + 3*x^2 + 1)) + 1/2*log(-(x^4 - 3*x^2 - 2*sqrt
(-x^4 + 2*x^2 + 1)*x - 1)/(x^4 - x^2 - 1))

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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