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

Optimal. Leaf size=59 \[ 2 \tanh ^{-1}\left (\frac {x}{\sqrt {-2+x^2-2 x^3+2 x^4}}\right )-2 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} x}{\sqrt {-2+x^2-2 x^3+2 x^4}}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [F]
time = 1.23, 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 {\sqrt {-2+x^2-2 x^3+2 x^4} \left (2-x^3+2 x^4\right )}{\left (-1-x^3+x^4\right ) \left (-2-x^2-2 x^3+2 x^4\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.19, size = 56, normalized size = 0.95 \begin {gather*} -2 \sqrt {2} \tanh ^{-1}\left (\frac {x}{\sqrt {-1+\frac {x^2}{2}-x^3+x^4}}\right )+2 \tanh ^{-1}\left (\frac {x}{\sqrt {-2+x^2-2 x^3+2 x^4}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 8.78, size = 12512, normalized size = 212.07

method result size
trager \(-\ln \left (-\frac {-x^{4}+x^{3}+\sqrt {2 x^{4}-2 x^{3}+x^{2}-2}\, x -x^{2}+1}{x^{4}-x^{3}-1}\right )+\RootOf \left (\textit {\_Z}^{2}-2\right ) \ln \left (-\frac {-2 \RootOf \left (\textit {\_Z}^{2}-2\right ) x^{4}+2 \RootOf \left (\textit {\_Z}^{2}-2\right ) x^{3}-3 \RootOf \left (\textit {\_Z}^{2}-2\right ) x^{2}+4 \sqrt {2 x^{4}-2 x^{3}+x^{2}-2}\, x +2 \RootOf \left (\textit {\_Z}^{2}-2\right )}{2 x^{4}-2 x^{3}-x^{2}-2}\right )\) \(144\)
default \(\text {Expression too large to display}\) \(12512\)
elliptic \(\text {Expression too large to display}\) \(1160147\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

result too large to display

________________________________________________________________________________________

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-2*x^3+x^2-2)^(1/2)*(2*x^4-x^3+2)/(x^4-x^3-1)/(2*x^4-2*x^3-x^2-2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (51) = 102\).
time = 0.45, size = 168, normalized size = 2.85 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (-\frac {4 \, x^{8} - 8 \, x^{7} + 32 \, x^{6} - 28 \, x^{5} + 9 \, x^{4} + 8 \, x^{3} - 4 \, \sqrt {2} {\left (2 \, x^{5} - 2 \, x^{4} + 3 \, x^{3} - 2 \, x\right )} \sqrt {2 \, x^{4} - 2 \, x^{3} + x^{2} - 2} - 28 \, x^{2} + 4}{4 \, x^{8} - 8 \, x^{7} + 4 \, x^{5} - 7 \, x^{4} + 8 \, x^{3} + 4 \, x^{2} + 4}\right ) + \log \left (-\frac {x^{4} - x^{3} + x^{2} + \sqrt {2 \, x^{4} - 2 \, x^{3} + x^{2} - 2} x - 1}{x^{4} - x^{3} - 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*sqrt(2)*log(-(4*x^8 - 8*x^7 + 32*x^6 - 28*x^5 + 9*x^4 + 8*x^3 - 4*sqrt(2)*(2*x^5 - 2*x^4 + 3*x^3 - 2*x)*sq
rt(2*x^4 - 2*x^3 + x^2 - 2) - 28*x^2 + 4)/(4*x^8 - 8*x^7 + 4*x^5 - 7*x^4 + 8*x^3 + 4*x^2 + 4)) + log(-(x^4 - x
^3 + x^2 + sqrt(2*x^4 - 2*x^3 + x^2 - 2)*x - 1)/(x^4 - x^3 - 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-2*x**3+x**2-2)**(1/2)*(2*x**4-x**3+2)/(x**4-x**3-1)/(2*x**4-2*x**3-x**2-2),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-2*x^3+x^2-2)^(1/2)*(2*x^4-x^3+2)/(x^4-x^3-1)/(2*x^4-2*x^3-x^2-2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________