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

   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 = 59, antiderivative size = 57 \[ \int \frac {\sqrt {-1+x^2-2 x^3+x^4} \left (1-x^3+x^4\right )}{\left (-1-2 x^3+x^4\right ) \left (-2-x^2-4 x^3+2 x^4\right )} \, dx=\text {arctanh}\left (\frac {x}{\sqrt {-1+x^2-2 x^3+x^4}}\right )-\sqrt {\frac {3}{2}} \text {arctanh}\left (\frac {\sqrt {\frac {3}{2}} x}{\sqrt {-1+x^2-2 x^3+x^4}}\right ) \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.83 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {-1+x^2-2 x^3+x^4} \left (1-x^3+x^4\right )}{\left (-1-2 x^3+x^4\right ) \left (-2-x^2-4 x^3+2 x^4\right )} \, dx=\text {arctanh}\left (\frac {x}{\sqrt {-1+x^2-2 x^3+x^4}}\right )-\sqrt {\frac {3}{2}} \text {arctanh}\left (\frac {\sqrt {\frac {3}{2}} x}{\sqrt {-1+x^2-2 x^3+x^4}}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 6.58 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.42

method result size
default \(-\frac {\ln \left (\frac {\sqrt {x^{4}-2 x^{3}+x^{2}-1}-x}{x}\right )}{2}-\frac {\sqrt {6}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{4}-2 x^{3}+x^{2}-1}\, \sqrt {6}}{3 x}\right )}{2}+\frac {\ln \left (\frac {\sqrt {x^{4}-2 x^{3}+x^{2}-1}+x}{x}\right )}{2}\) \(81\)
pseudoelliptic \(-\frac {\ln \left (\frac {\sqrt {x^{4}-2 x^{3}+x^{2}-1}-x}{x}\right )}{2}-\frac {\sqrt {6}\, \operatorname {arctanh}\left (\frac {\sqrt {x^{4}-2 x^{3}+x^{2}-1}\, \sqrt {6}}{3 x}\right )}{2}+\frac {\ln \left (\frac {\sqrt {x^{4}-2 x^{3}+x^{2}-1}+x}{x}\right )}{2}\) \(81\)
trager \(\frac {\ln \left (-\frac {x^{4}-2 x^{3}+2 \sqrt {x^{4}-2 x^{3}+x^{2}-1}\, x +2 x^{2}-1}{x^{4}-2 x^{3}-1}\right )}{2}-\frac {\operatorname {RootOf}\left (\textit {\_Z}^{2}-6\right ) \ln \left (-\frac {2 \operatorname {RootOf}\left (\textit {\_Z}^{2}-6\right ) x^{4}-4 \operatorname {RootOf}\left (\textit {\_Z}^{2}-6\right ) x^{3}+5 \operatorname {RootOf}\left (\textit {\_Z}^{2}-6\right ) x^{2}+12 \sqrt {x^{4}-2 x^{3}+x^{2}-1}\, x -2 \operatorname {RootOf}\left (\textit {\_Z}^{2}-6\right )}{2 x^{4}-4 x^{3}-x^{2}-2}\right )}{4}\) \(142\)
elliptic \(\text {Expression too large to display}\) \(15410\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (46) = 92\).

Time = 0.35 (sec) , antiderivative size = 180, normalized size of antiderivative = 3.16 \[ \int \frac {\sqrt {-1+x^2-2 x^3+x^4} \left (1-x^3+x^4\right )}{\left (-1-2 x^3+x^4\right ) \left (-2-x^2-4 x^3+2 x^4\right )} \, dx=\frac {1}{8} \, \sqrt {3} \sqrt {2} \log \left (-\frac {4 \, x^{8} - 16 \, x^{7} + 60 \, x^{6} - 88 \, x^{5} + 41 \, x^{4} + 16 \, x^{3} - 4 \, \sqrt {3} \sqrt {2} {\left (2 \, x^{5} - 4 \, x^{4} + 5 \, x^{3} - 2 \, x\right )} \sqrt {x^{4} - 2 \, x^{3} + x^{2} - 1} - 44 \, x^{2} + 4}{4 \, x^{8} - 16 \, x^{7} + 12 \, x^{6} + 8 \, x^{5} - 7 \, x^{4} + 16 \, x^{3} + 4 \, x^{2} + 4}\right ) + \frac {1}{2} \, \log \left (-\frac {x^{4} - 2 \, x^{3} + 2 \, x^{2} + 2 \, \sqrt {x^{4} - 2 \, x^{3} + x^{2} - 1} x - 1}{x^{4} - 2 \, x^{3} - 1}\right ) \]

[In]

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

[Out]

1/8*sqrt(3)*sqrt(2)*log(-(4*x^8 - 16*x^7 + 60*x^6 - 88*x^5 + 41*x^4 + 16*x^3 - 4*sqrt(3)*sqrt(2)*(2*x^5 - 4*x^
4 + 5*x^3 - 2*x)*sqrt(x^4 - 2*x^3 + x^2 - 1) - 44*x^2 + 4)/(4*x^8 - 16*x^7 + 12*x^6 + 8*x^5 - 7*x^4 + 16*x^3 +
 4*x^2 + 4)) + 1/2*log(-(x^4 - 2*x^3 + 2*x^2 + 2*sqrt(x^4 - 2*x^3 + x^2 - 1)*x - 1)/(x^4 - 2*x^3 - 1))

Sympy [F(-1)]

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

[In]

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

[Out]

Timed out

Maxima [F]

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

[In]

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

[Out]

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

Giac [F]

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

[In]

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

[Out]

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

Mupad [F(-1)]

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

[In]

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

[Out]

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