\(\int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx\) [64]

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

Optimal result

Integrand size = 29, antiderivative size = 158 \[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=-2 \sqrt {2} \arctan \left (1-\sqrt {2} x\right )+2 \sqrt {2} \arctan \left (1+\sqrt {2} x\right )+\sqrt {2} \arctan \left (1-\sqrt {2} x^2\right )-\sqrt {2} \arctan \left (1+\sqrt {2} x^2\right )-\sqrt {2} \log \left (1-\sqrt {2} x+x^2\right )+\sqrt {2} \log \left (1+\sqrt {2} x+x^2\right )+\frac {\log \left (1-\sqrt {2} x^2+x^4\right )}{\sqrt {2}}-\frac {\log \left (1+\sqrt {2} x^2+x^4\right )}{\sqrt {2}} \] Output:

2*2^(1/2)*arctan(-1+x*2^(1/2))+2*2^(1/2)*arctan(1+x*2^(1/2))-2^(1/2)*arcta 
n(-1+x^2*2^(1/2))-2^(1/2)*arctan(1+x^2*2^(1/2))-2^(1/2)*ln(1-x*2^(1/2)+x^2 
)+2^(1/2)*ln(1+x*2^(1/2)+x^2)+1/2*ln(1-x^2*2^(1/2)+x^4)*2^(1/2)-1/2*ln(1+x 
^2*2^(1/2)+x^4)*2^(1/2)
 

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.28 \[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=\frac {-4 \arctan \left (1-\sqrt {2} x\right )+4 \arctan \left (1+\sqrt {2} x\right )+2 \arctan \left (\left (x+\cos \left (\frac {\pi }{8}\right )\right ) \csc \left (\frac {\pi }{8}\right )\right )+2 \arctan \left (\cot \left (\frac {\pi }{8}\right )-x \csc \left (\frac {\pi }{8}\right )\right )+2 \arctan \left (\sec \left (\frac {\pi }{8}\right ) \left (x+\sin \left (\frac {\pi }{8}\right )\right )\right )-2 \arctan \left (x \sec \left (\frac {\pi }{8}\right )-\tan \left (\frac {\pi }{8}\right )\right )-2 \log \left (1-\sqrt {2} x+x^2\right )+2 \log \left (1+\sqrt {2} x+x^2\right )+\log \left (1+x^2-2 x \cos \left (\frac {\pi }{8}\right )\right )+\log \left (1+x^2+2 x \cos \left (\frac {\pi }{8}\right )\right )-\log \left (1+x^2-2 x \sin \left (\frac {\pi }{8}\right )\right )-\log \left (1+x^2+2 x \sin \left (\frac {\pi }{8}\right )\right )}{\sqrt {2}} \] Input:

Integrate[(8 - 8*x - 8*x^5 + 8*x^8)/(1 + x^4 + x^8 + x^12),x]
 

Output:

(-4*ArcTan[1 - Sqrt[2]*x] + 4*ArcTan[1 + Sqrt[2]*x] + 2*ArcTan[(x + Cos[Pi 
/8])*Csc[Pi/8]] + 2*ArcTan[Cot[Pi/8] - x*Csc[Pi/8]] + 2*ArcTan[Sec[Pi/8]*( 
x + Sin[Pi/8])] - 2*ArcTan[x*Sec[Pi/8] - Tan[Pi/8]] - 2*Log[1 - Sqrt[2]*x 
+ x^2] + 2*Log[1 + Sqrt[2]*x + x^2] + Log[1 + x^2 - 2*x*Cos[Pi/8]] + Log[1 
 + x^2 + 2*x*Cos[Pi/8]] - Log[1 + x^2 - 2*x*Sin[Pi/8]] - Log[1 + x^2 + 2*x 
*Sin[Pi/8]])/Sqrt[2]
 

Rubi [A] (verified)

Time = 0.61 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2460, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {8 x^8-8 x^5-8 x+8}{x^{12}+x^8+x^4+1} \, dx\)

\(\Big \downarrow \) 2460

\(\displaystyle \int \left (\frac {8}{x^4+1}-\frac {8 x}{x^8+1}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \sqrt {2} \arctan \left (1-\sqrt {2} x^2\right )-\sqrt {2} \arctan \left (\sqrt {2} x^2+1\right )-2 \sqrt {2} \arctan \left (1-\sqrt {2} x\right )+2 \sqrt {2} \arctan \left (\sqrt {2} x+1\right )-\sqrt {2} \log \left (x^2-\sqrt {2} x+1\right )+\sqrt {2} \log \left (x^2+\sqrt {2} x+1\right )+\frac {\log \left (x^4-\sqrt {2} x^2+1\right )}{\sqrt {2}}-\frac {\log \left (x^4+\sqrt {2} x^2+1\right )}{\sqrt {2}}\)

Input:

Int[(8 - 8*x - 8*x^5 + 8*x^8)/(1 + x^4 + x^8 + x^12),x]
 

Output:

-2*Sqrt[2]*ArcTan[1 - Sqrt[2]*x] + 2*Sqrt[2]*ArcTan[1 + Sqrt[2]*x] + Sqrt[ 
2]*ArcTan[1 - Sqrt[2]*x^2] - Sqrt[2]*ArcTan[1 + Sqrt[2]*x^2] - Sqrt[2]*Log 
[1 - Sqrt[2]*x + x^2] + Sqrt[2]*Log[1 + Sqrt[2]*x + x^2] + Log[1 - Sqrt[2] 
*x^2 + x^4]/Sqrt[2] - Log[1 + Sqrt[2]*x^2 + x^4]/Sqrt[2]
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2460
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{Qx = Factor[Px /. x -> Sqrt[x]]}, 
Int[ExpandIntegrand[u*(Qx /. x -> x^2)^p, x], x] /;  !SumQ[NonfreeFactors[Q 
x, x]]] /; PolyQ[Px, x^2] && GtQ[Expon[Px, x], 2] &&  !BinomialQ[Px, x] && 
 !TrinomialQ[Px, x] && ILtQ[p, 0] && RationalFunctionQ[u, x]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.08 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.24

method result size
risch \(2 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}+1\right )}{\sum }\textit {\_R} \ln \left (x +\textit {\_R} \right )\right )+\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}+1\right )}{\sum }\textit {\_R} \ln \left (x^{2}-\textit {\_R} \right )\right )\) \(38\)
default \(\sqrt {2}\, \left (\ln \left (\frac {1+\sqrt {2}\, x +x^{2}}{1-\sqrt {2}\, x +x^{2}}\right )+2 \arctan \left (1+\sqrt {2}\, x \right )+2 \arctan \left (-1+\sqrt {2}\, x \right )\right )-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\sqrt {2}\, x^{2}+x^{4}}{1-\sqrt {2}\, x^{2}+x^{4}}\right )+2 \arctan \left (1+\sqrt {2}\, x^{2}\right )+2 \arctan \left (-1+\sqrt {2}\, x^{2}\right )\right )}{2}\) \(111\)

Input:

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

Output:

2*sum(_R*ln(x+_R),_R=RootOf(_Z^4+1))+sum(_R*ln(x^2-_R),_R=RootOf(_Z^4+1))
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.80 \[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=-\sqrt {2} \arctan \left (\sqrt {2} x^{2} + 1\right ) - \sqrt {2} \arctan \left (\sqrt {2} x^{2} - 1\right ) + 2 \, \sqrt {2} \arctan \left (\sqrt {2} x + 1\right ) + 2 \, \sqrt {2} \arctan \left (\sqrt {2} x - 1\right ) - \frac {1}{2} \, \sqrt {2} \log \left (x^{4} + \sqrt {2} x^{2} + 1\right ) + \frac {1}{2} \, \sqrt {2} \log \left (x^{4} - \sqrt {2} x^{2} + 1\right ) + \sqrt {2} \log \left (x^{2} + \sqrt {2} x + 1\right ) - \sqrt {2} \log \left (x^{2} - \sqrt {2} x + 1\right ) \] Input:

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

Output:

-sqrt(2)*arctan(sqrt(2)*x^2 + 1) - sqrt(2)*arctan(sqrt(2)*x^2 - 1) + 2*sqr 
t(2)*arctan(sqrt(2)*x + 1) + 2*sqrt(2)*arctan(sqrt(2)*x - 1) - 1/2*sqrt(2) 
*log(x^4 + sqrt(2)*x^2 + 1) + 1/2*sqrt(2)*log(x^4 - sqrt(2)*x^2 + 1) + sqr 
t(2)*log(x^2 + sqrt(2)*x + 1) - sqrt(2)*log(x^2 - sqrt(2)*x + 1)
 

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.94 \[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=- \sqrt {2} \log {\left (x^{2} - \sqrt {2} x + 1 \right )} + \sqrt {2} \log {\left (x^{2} + \sqrt {2} x + 1 \right )} + \frac {\sqrt {2} \log {\left (x^{4} - \sqrt {2} x^{2} + 1 \right )}}{2} - \frac {\sqrt {2} \log {\left (x^{4} + \sqrt {2} x^{2} + 1 \right )}}{2} + 2 \sqrt {2} \operatorname {atan}{\left (\sqrt {2} x - 1 \right )} + 2 \sqrt {2} \operatorname {atan}{\left (\sqrt {2} x + 1 \right )} - \sqrt {2} \operatorname {atan}{\left (\sqrt {2} x^{2} - 1 \right )} - \sqrt {2} \operatorname {atan}{\left (\sqrt {2} x^{2} + 1 \right )} \] Input:

integrate((8*x**8-8*x**5-8*x+8)/(x**12+x**8+x**4+1),x)
                                                                                    
                                                                                    
 

Output:

-sqrt(2)*log(x**2 - sqrt(2)*x + 1) + sqrt(2)*log(x**2 + sqrt(2)*x + 1) + s 
qrt(2)*log(x**4 - sqrt(2)*x**2 + 1)/2 - sqrt(2)*log(x**4 + sqrt(2)*x**2 + 
1)/2 + 2*sqrt(2)*atan(sqrt(2)*x - 1) + 2*sqrt(2)*atan(sqrt(2)*x + 1) - sqr 
t(2)*atan(sqrt(2)*x**2 - 1) - sqrt(2)*atan(sqrt(2)*x**2 + 1)
 

Maxima [F]

\[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=\int { \frac {8 \, {\left (x^{8} - x^{5} - x + 1\right )}}{x^{12} + x^{8} + x^{4} + 1} \,d x } \] Input:

integrate((8*x^8-8*x^5-8*x+8)/(x^12+x^8+x^4+1),x, algorithm="maxima")
 

Output:

2*sqrt(2)*arctan(1/2*sqrt(2)*(2*x + sqrt(2))) + 2*sqrt(2)*arctan(1/2*sqrt( 
2)*(2*x - sqrt(2))) + sqrt(2)*log(x^2 + sqrt(2)*x + 1) - sqrt(2)*log(x^2 - 
 sqrt(2)*x + 1) - 8*integrate(x/(x^8 + 1), x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (126) = 252\).

Time = 0.23 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.69 \[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=2 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x + \sqrt {2}\right )}\right ) + 2 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x - \sqrt {2}\right )}\right ) + \sqrt {2} \arctan \left (\frac {2 \, x + \sqrt {-\sqrt {2} + 2}}{\sqrt {\sqrt {2} + 2}}\right ) - \sqrt {2} \arctan \left (\frac {2 \, x - \sqrt {-\sqrt {2} + 2}}{\sqrt {\sqrt {2} + 2}}\right ) + \sqrt {2} \arctan \left (\frac {2 \, x + \sqrt {\sqrt {2} + 2}}{\sqrt {-\sqrt {2} + 2}}\right ) - \sqrt {2} \arctan \left (\frac {2 \, x - \sqrt {\sqrt {2} + 2}}{\sqrt {-\sqrt {2} + 2}}\right ) + \sqrt {2} \log \left (x^{2} + \sqrt {2} x + 1\right ) - \sqrt {2} \log \left (x^{2} - \sqrt {2} x + 1\right ) + \frac {1}{2} \, \sqrt {2} \log \left (x^{2} + x \sqrt {\sqrt {2} + 2} + 1\right ) + \frac {1}{2} \, \sqrt {2} \log \left (x^{2} - x \sqrt {\sqrt {2} + 2} + 1\right ) - \frac {1}{2} \, \sqrt {2} \log \left (x^{2} + x \sqrt {-\sqrt {2} + 2} + 1\right ) - \frac {1}{2} \, \sqrt {2} \log \left (x^{2} - x \sqrt {-\sqrt {2} + 2} + 1\right ) \] Input:

integrate((8*x^8-8*x^5-8*x+8)/(x^12+x^8+x^4+1),x, algorithm="giac")
 

Output:

2*sqrt(2)*arctan(1/2*sqrt(2)*(2*x + sqrt(2))) + 2*sqrt(2)*arctan(1/2*sqrt( 
2)*(2*x - sqrt(2))) + sqrt(2)*arctan((2*x + sqrt(-sqrt(2) + 2))/sqrt(sqrt( 
2) + 2)) - sqrt(2)*arctan((2*x - sqrt(-sqrt(2) + 2))/sqrt(sqrt(2) + 2)) + 
sqrt(2)*arctan((2*x + sqrt(sqrt(2) + 2))/sqrt(-sqrt(2) + 2)) - sqrt(2)*arc 
tan((2*x - sqrt(sqrt(2) + 2))/sqrt(-sqrt(2) + 2)) + sqrt(2)*log(x^2 + sqrt 
(2)*x + 1) - sqrt(2)*log(x^2 - sqrt(2)*x + 1) + 1/2*sqrt(2)*log(x^2 + x*sq 
rt(sqrt(2) + 2) + 1) + 1/2*sqrt(2)*log(x^2 - x*sqrt(sqrt(2) + 2) + 1) - 1/ 
2*sqrt(2)*log(x^2 + x*sqrt(-sqrt(2) + 2) + 1) - 1/2*sqrt(2)*log(x^2 - x*sq 
rt(-sqrt(2) + 2) + 1)
 

Mupad [B] (verification not implemented)

Time = 9.95 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.44 \[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,x\,\left (\frac {1}{2}-\frac {1}{2}{}\mathrm {i}\right )\right )\,\left (2+2{}\mathrm {i}\right )+\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,x\,\left (\frac {1}{2}+\frac {1}{2}{}\mathrm {i}\right )\right )\,\left (2-2{}\mathrm {i}\right )+\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,x^2\,\left (\frac {1}{2}-\frac {1}{2}{}\mathrm {i}\right )\right )\,\left (-1-\mathrm {i}\right )+\sqrt {2}\,\mathrm {atan}\left (\sqrt {2}\,x^2\,\left (\frac {1}{2}+\frac {1}{2}{}\mathrm {i}\right )\right )\,\left (-1+1{}\mathrm {i}\right ) \] Input:

int(-(8*x + 8*x^5 - 8*x^8 - 8)/(x^4 + x^8 + x^12 + 1),x)
 

Output:

2^(1/2)*atan(2^(1/2)*x*(1/2 - 1i/2))*(2 + 2i) + 2^(1/2)*atan(2^(1/2)*x*(1/ 
2 + 1i/2))*(2 - 2i) - 2^(1/2)*atan(2^(1/2)*x^2*(1/2 - 1i/2))*(1 + 1i) - 2^ 
(1/2)*atan(2^(1/2)*x^2*(1/2 + 1i/2))*(1 - 1i)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.69 \[ \int \frac {8-8 x-8 x^5+8 x^8}{1+x^4+x^8+x^{12}} \, dx=\sqrt {\sqrt {2}+2}\, \sqrt {-\sqrt {2}+2}\, \mathit {atan} \left (\frac {\sqrt {-\sqrt {2}+2}-2 x}{\sqrt {\sqrt {2}+2}}\right )+\sqrt {\sqrt {2}+2}\, \sqrt {-\sqrt {2}+2}\, \mathit {atan} \left (\frac {\sqrt {-\sqrt {2}+2}+2 x}{\sqrt {\sqrt {2}+2}}\right )+\sqrt {\sqrt {2}+2}\, \sqrt {-\sqrt {2}+2}\, \mathit {atan} \left (\frac {\sqrt {\sqrt {2}+2}-2 x}{\sqrt {-\sqrt {2}+2}}\right )+\sqrt {\sqrt {2}+2}\, \sqrt {-\sqrt {2}+2}\, \mathit {atan} \left (\frac {\sqrt {\sqrt {2}+2}+2 x}{\sqrt {-\sqrt {2}+2}}\right )-2 \sqrt {2}\, \mathit {atan} \left (\frac {\sqrt {2}-2 x}{\sqrt {2}}\right )+2 \sqrt {2}\, \mathit {atan} \left (\frac {\sqrt {2}+2 x}{\sqrt {2}}\right )-\frac {\sqrt {2}\, \mathrm {log}\left (-\sqrt {-\sqrt {2}+2}\, x +x^{2}+1\right )}{2}+\frac {\sqrt {2}\, \mathrm {log}\left (-\sqrt {\sqrt {2}+2}\, x +x^{2}+1\right )}{2}-\sqrt {2}\, \mathrm {log}\left (-\sqrt {2}\, x +x^{2}+1\right )-\frac {\sqrt {2}\, \mathrm {log}\left (\sqrt {-\sqrt {2}+2}\, x +x^{2}+1\right )}{2}+\frac {\sqrt {2}\, \mathrm {log}\left (\sqrt {\sqrt {2}+2}\, x +x^{2}+1\right )}{2}+\sqrt {2}\, \mathrm {log}\left (\sqrt {2}\, x +x^{2}+1\right ) \] Input:

int((8*x^8-8*x^5-8*x+8)/(x^12+x^8+x^4+1),x)
 

Output:

(2*sqrt(sqrt(2) + 2)*sqrt( - sqrt(2) + 2)*atan((sqrt( - sqrt(2) + 2) - 2*x 
)/sqrt(sqrt(2) + 2)) + 2*sqrt(sqrt(2) + 2)*sqrt( - sqrt(2) + 2)*atan((sqrt 
( - sqrt(2) + 2) + 2*x)/sqrt(sqrt(2) + 2)) + 2*sqrt(sqrt(2) + 2)*sqrt( - s 
qrt(2) + 2)*atan((sqrt(sqrt(2) + 2) - 2*x)/sqrt( - sqrt(2) + 2)) + 2*sqrt( 
sqrt(2) + 2)*sqrt( - sqrt(2) + 2)*atan((sqrt(sqrt(2) + 2) + 2*x)/sqrt( - s 
qrt(2) + 2)) - 4*sqrt(2)*atan((sqrt(2) - 2*x)/sqrt(2)) + 4*sqrt(2)*atan((s 
qrt(2) + 2*x)/sqrt(2)) - sqrt(2)*log( - sqrt( - sqrt(2) + 2)*x + x**2 + 1) 
 + sqrt(2)*log( - sqrt(sqrt(2) + 2)*x + x**2 + 1) - 2*sqrt(2)*log( - sqrt( 
2)*x + x**2 + 1) - sqrt(2)*log(sqrt( - sqrt(2) + 2)*x + x**2 + 1) + sqrt(2 
)*log(sqrt(sqrt(2) + 2)*x + x**2 + 1) + 2*sqrt(2)*log(sqrt(2)*x + x**2 + 1 
))/2