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

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

[Out]

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

________________________________________________________________________________________

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

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.27, size = 72, normalized size = 1.00 \begin {gather*} -\frac {\sqrt {1+x^2+2 x^4+x^8}}{2 \left (1-x+x^4\right )}-\frac {\tanh ^{-1}\left (\frac {\sqrt {2} x}{1+x+x^4+\sqrt {1+x^2+2 x^4+x^8}}\right )}{\sqrt {2}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 1.61, size = 91, normalized size = 1.26

method result size
risch \(-\frac {\sqrt {x^{8}+2 x^{4}+x^{2}+1}}{2 \left (x^{4}-x +1\right )}+\frac {\RootOf \left (\textit {\_Z}^{2}-2\right ) \ln \left (-\frac {\RootOf \left (\textit {\_Z}^{2}-2\right ) x^{4}-\RootOf \left (\textit {\_Z}^{2}-2\right ) x +2 \sqrt {x^{8}+2 x^{4}+x^{2}+1}+\RootOf \left (\textit {\_Z}^{2}-2\right )}{x^{4}+x +1}\right )}{4}\) \(91\)
trager \(-\frac {\sqrt {x^{8}+2 x^{4}+x^{2}+1}}{2 \left (x^{4}-x +1\right )}-\frac {\RootOf \left (\textit {\_Z}^{2}-2\right ) \ln \left (-\frac {-\RootOf \left (\textit {\_Z}^{2}-2\right ) x^{4}+\RootOf \left (\textit {\_Z}^{2}-2\right ) x +2 \sqrt {x^{8}+2 x^{4}+x^{2}+1}-\RootOf \left (\textit {\_Z}^{2}-2\right )}{x^{4}+x +1}\right )}{4}\) \(93\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.50, size = 120, normalized size = 1.67 \begin {gather*} \frac {\sqrt {2} {\left (x^{4} - x + 1\right )} \log \left (\frac {3 \, x^{8} - 2 \, x^{5} + 6 \, x^{4} + 2 \, \sqrt {2} \sqrt {x^{8} + 2 \, x^{4} + x^{2} + 1} {\left (x^{4} - x + 1\right )} + 3 \, x^{2} - 2 \, x + 3}{x^{8} + 2 \, x^{5} + 2 \, x^{4} + x^{2} + 2 \, x + 1}\right ) - 4 \, \sqrt {x^{8} + 2 \, x^{4} + x^{2} + 1}}{8 \, {\left (x^{4} - x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________