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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.90 \[ \int \frac {x^2}{1-3 x^4+x^8} \, dx=-\frac {\arctan \left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )}{\sqrt {10 \left (-1+\sqrt {5}\right )}}+\frac {\arctan \left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )}{\sqrt {10 \left (1+\sqrt {5}\right )}}+\frac {\text {arctanh}\left (\sqrt {\frac {2}{-1+\sqrt {5}}} x\right )}{\sqrt {10 \left (-1+\sqrt {5}\right )}}-\frac {\text {arctanh}\left (\sqrt {\frac {2}{1+\sqrt {5}}} x\right )}{\sqrt {10 \left (1+\sqrt {5}\right )}} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.19, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {1711, 27, 827, 216, 219}

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 {x^2}{x^8-3 x^4+1} \, dx\)

\(\Big \downarrow \) 1711

\(\displaystyle \frac {\int -\frac {2 x^2}{-2 x^4+\sqrt {5}+3}dx}{\sqrt {5}}-\frac {\int -\frac {2 x^2}{-2 x^4-\sqrt {5}+3}dx}{\sqrt {5}}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2 \int \frac {x^2}{-2 x^4-\sqrt {5}+3}dx}{\sqrt {5}}-\frac {2 \int \frac {x^2}{-2 x^4+\sqrt {5}+3}dx}{\sqrt {5}}\)

\(\Big \downarrow \) 827

\(\displaystyle \frac {2 \left (\frac {\int \frac {1}{\sqrt {3-\sqrt {5}}-\sqrt {2} x^2}dx}{2 \sqrt {2}}-\frac {\int \frac {1}{\sqrt {2} x^2+\sqrt {3-\sqrt {5}}}dx}{2 \sqrt {2}}\right )}{\sqrt {5}}-\frac {2 \left (\frac {\int \frac {1}{\sqrt {3+\sqrt {5}}-\sqrt {2} x^2}dx}{2 \sqrt {2}}-\frac {\int \frac {1}{\sqrt {2} x^2+\sqrt {3+\sqrt {5}}}dx}{2 \sqrt {2}}\right )}{\sqrt {5}}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {2 \left (\frac {\int \frac {1}{\sqrt {3-\sqrt {5}}-\sqrt {2} x^2}dx}{2 \sqrt {2}}-\frac {\arctan \left (\sqrt [4]{\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )}{2\ 2^{3/4} \sqrt [4]{3-\sqrt {5}}}\right )}{\sqrt {5}}-\frac {2 \left (\frac {\int \frac {1}{\sqrt {3+\sqrt {5}}-\sqrt {2} x^2}dx}{2 \sqrt {2}}-\frac {\arctan \left (\sqrt [4]{\frac {2}{3+\sqrt {5}}} x\right )}{2\ 2^{3/4} \sqrt [4]{3+\sqrt {5}}}\right )}{\sqrt {5}}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {2 \left (\frac {\text {arctanh}\left (\sqrt [4]{\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )}{2\ 2^{3/4} \sqrt [4]{3-\sqrt {5}}}-\frac {\arctan \left (\sqrt [4]{\frac {1}{2} \left (3+\sqrt {5}\right )} x\right )}{2\ 2^{3/4} \sqrt [4]{3-\sqrt {5}}}\right )}{\sqrt {5}}-\frac {2 \left (\frac {\text {arctanh}\left (\sqrt [4]{\frac {2}{3+\sqrt {5}}} x\right )}{2\ 2^{3/4} \sqrt [4]{3+\sqrt {5}}}-\frac {\arctan \left (\sqrt [4]{\frac {2}{3+\sqrt {5}}} x\right )}{2\ 2^{3/4} \sqrt [4]{3+\sqrt {5}}}\right )}{\sqrt {5}}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 827
Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 
 2]], s = Denominator[Rt[-a/b, 2]]}, Simp[s/(2*b)   Int[1/(r + s*x^2), x], 
x] - Simp[s/(2*b)   Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !GtQ 
[a/b, 0]
 

rule 1711
Int[((d_.)*(x_))^(m_.)/((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_)), x_Symb 
ol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[c/q   Int[(d*x)^m/(b/2 - q/2 + c 
*x^n), x], x] - Simp[c/q   Int[(d*x)^m/(b/2 + q/2 + c*x^n), x], x]] /; Free 
Q[{a, b, c, d, m}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IGtQ[n, 0]
 
Maple [C] (verified)

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

Time = 0.06 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.44

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.23 \[ \int \frac {x^2}{1-3 x^4+x^8} \, dx=-\frac {1}{2} \, \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}} \arctan \left (\sqrt {5} x \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}}\right ) + \frac {1}{2} \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} \arctan \left (\sqrt {5} x \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}}\right ) - \frac {1}{4} \, \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}} \log \left ({\left (\sqrt {5} - 5\right )} \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}} + 2 \, x\right ) + \frac {1}{4} \, \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}} \log \left (-{\left (\sqrt {5} - 5\right )} \sqrt {\frac {1}{10} \, \sqrt {5} + \frac {1}{10}} + 2 \, x\right ) - \frac {1}{4} \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} \log \left ({\left (\sqrt {5} + 5\right )} \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} + 2 \, x\right ) + \frac {1}{4} \, \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} \log \left (-{\left (\sqrt {5} + 5\right )} \sqrt {\frac {1}{10} \, \sqrt {5} - \frac {1}{10}} + 2 \, x\right ) \] Input:

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

Output:

-1/2*sqrt(1/10*sqrt(5) + 1/10)*arctan(sqrt(5)*x*sqrt(1/10*sqrt(5) + 1/10)) 
 + 1/2*sqrt(1/10*sqrt(5) - 1/10)*arctan(sqrt(5)*x*sqrt(1/10*sqrt(5) - 1/10 
)) - 1/4*sqrt(1/10*sqrt(5) + 1/10)*log((sqrt(5) - 5)*sqrt(1/10*sqrt(5) + 1 
/10) + 2*x) + 1/4*sqrt(1/10*sqrt(5) + 1/10)*log(-(sqrt(5) - 5)*sqrt(1/10*s 
qrt(5) + 1/10) + 2*x) - 1/4*sqrt(1/10*sqrt(5) - 1/10)*log((sqrt(5) + 5)*sq 
rt(1/10*sqrt(5) - 1/10) + 2*x) + 1/4*sqrt(1/10*sqrt(5) - 1/10)*log(-(sqrt( 
5) + 5)*sqrt(1/10*sqrt(5) - 1/10) + 2*x)
 

Sympy [A] (verification not implemented)

Time = 0.85 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.37 \[ \int \frac {x^2}{1-3 x^4+x^8} \, dx=\operatorname {RootSum} {\left (6400 t^{4} - 80 t^{2} - 1, \left ( t \mapsto t \log {\left (6144000 t^{7} - 2240 t^{3} + x \right )} \right )\right )} + \operatorname {RootSum} {\left (6400 t^{4} + 80 t^{2} - 1, \left ( t \mapsto t \log {\left (6144000 t^{7} - 2240 t^{3} + x \right )} \right )\right )} \] Input:

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

Output:

RootSum(6400*_t**4 - 80*_t**2 - 1, Lambda(_t, _t*log(6144000*_t**7 - 2240* 
_t**3 + x))) + RootSum(6400*_t**4 + 80*_t**2 - 1, Lambda(_t, _t*log(614400 
0*_t**7 - 2240*_t**3 + x)))
 

Maxima [F]

\[ \int \frac {x^2}{1-3 x^4+x^8} \, dx=\int { \frac {x^{2}}{x^{8} - 3 \, x^{4} + 1} \,d x } \] Input:

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

Output:

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

Giac [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.01 \[ \int \frac {x^2}{1-3 x^4+x^8} \, dx=\frac {1}{20} \, \sqrt {10 \, \sqrt {5} - 10} \arctan \left (\frac {x}{\sqrt {\frac {1}{2} \, \sqrt {5} + \frac {1}{2}}}\right ) - \frac {1}{20} \, \sqrt {10 \, \sqrt {5} + 10} \arctan \left (\frac {x}{\sqrt {\frac {1}{2} \, \sqrt {5} - \frac {1}{2}}}\right ) - \frac {1}{40} \, \sqrt {10 \, \sqrt {5} - 10} \log \left ({\left | x + \sqrt {\frac {1}{2} \, \sqrt {5} + \frac {1}{2}} \right |}\right ) + \frac {1}{40} \, \sqrt {10 \, \sqrt {5} - 10} \log \left ({\left | x - \sqrt {\frac {1}{2} \, \sqrt {5} + \frac {1}{2}} \right |}\right ) + \frac {1}{40} \, \sqrt {10 \, \sqrt {5} + 10} \log \left ({\left | x + \sqrt {\frac {1}{2} \, \sqrt {5} - \frac {1}{2}} \right |}\right ) - \frac {1}{40} \, \sqrt {10 \, \sqrt {5} + 10} \log \left ({\left | x - \sqrt {\frac {1}{2} \, \sqrt {5} - \frac {1}{2}} \right |}\right ) \] Input:

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

Output:

1/20*sqrt(10*sqrt(5) - 10)*arctan(x/sqrt(1/2*sqrt(5) + 1/2)) - 1/20*sqrt(1 
0*sqrt(5) + 10)*arctan(x/sqrt(1/2*sqrt(5) - 1/2)) - 1/40*sqrt(10*sqrt(5) - 
 10)*log(abs(x + sqrt(1/2*sqrt(5) + 1/2))) + 1/40*sqrt(10*sqrt(5) - 10)*lo 
g(abs(x - sqrt(1/2*sqrt(5) + 1/2))) + 1/40*sqrt(10*sqrt(5) + 10)*log(abs(x 
 + sqrt(1/2*sqrt(5) - 1/2))) - 1/40*sqrt(10*sqrt(5) + 10)*log(abs(x - sqrt 
(1/2*sqrt(5) - 1/2)))
 

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.86 \[ \int \frac {x^2}{1-3 x^4+x^8} \, dx=\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {\sqrt {10}\,x\,\sqrt {\sqrt {5}-1}\,3{}\mathrm {i}}{2\,\left (3\,\sqrt {5}-7\right )}-\frac {\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}-1}\,7{}\mathrm {i}}{10\,\left (3\,\sqrt {5}-7\right )}\right )\,\sqrt {\sqrt {5}-1}\,1{}\mathrm {i}}{20}-\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,3{}\mathrm {i}}{2\,\left (3\,\sqrt {5}+7\right )}+\frac {\sqrt {5}\,\sqrt {10}\,x\,\sqrt {\sqrt {5}+1}\,7{}\mathrm {i}}{10\,\left (3\,\sqrt {5}+7\right )}\right )\,\sqrt {\sqrt {5}+1}\,1{}\mathrm {i}}{20}+\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,3{}\mathrm {i}}{2\,\left (3\,\sqrt {5}-7\right )}-\frac {\sqrt {5}\,\sqrt {10}\,x\,\sqrt {1-\sqrt {5}}\,7{}\mathrm {i}}{10\,\left (3\,\sqrt {5}-7\right )}\right )\,\sqrt {1-\sqrt {5}}\,1{}\mathrm {i}}{20}-\frac {\sqrt {10}\,\mathrm {atan}\left (\frac {\sqrt {10}\,x\,\sqrt {-\sqrt {5}-1}\,3{}\mathrm {i}}{2\,\left (3\,\sqrt {5}+7\right )}+\frac {\sqrt {5}\,\sqrt {10}\,x\,\sqrt {-\sqrt {5}-1}\,7{}\mathrm {i}}{10\,\left (3\,\sqrt {5}+7\right )}\right )\,\sqrt {-\sqrt {5}-1}\,1{}\mathrm {i}}{20} \] Input:

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

Output:

(10^(1/2)*atan((10^(1/2)*x*(5^(1/2) - 1)^(1/2)*3i)/(2*(3*5^(1/2) - 7)) - ( 
5^(1/2)*10^(1/2)*x*(5^(1/2) - 1)^(1/2)*7i)/(10*(3*5^(1/2) - 7)))*(5^(1/2) 
- 1)^(1/2)*1i)/20 - (10^(1/2)*atan((10^(1/2)*x*(5^(1/2) + 1)^(1/2)*3i)/(2* 
(3*5^(1/2) + 7)) + (5^(1/2)*10^(1/2)*x*(5^(1/2) + 1)^(1/2)*7i)/(10*(3*5^(1 
/2) + 7)))*(5^(1/2) + 1)^(1/2)*1i)/20 + (10^(1/2)*atan((10^(1/2)*x*(1 - 5^ 
(1/2))^(1/2)*3i)/(2*(3*5^(1/2) - 7)) - (5^(1/2)*10^(1/2)*x*(1 - 5^(1/2))^( 
1/2)*7i)/(10*(3*5^(1/2) - 7)))*(1 - 5^(1/2))^(1/2)*1i)/20 - (10^(1/2)*atan 
((10^(1/2)*x*(- 5^(1/2) - 1)^(1/2)*3i)/(2*(3*5^(1/2) + 7)) + (5^(1/2)*10^( 
1/2)*x*(- 5^(1/2) - 1)^(1/2)*7i)/(10*(3*5^(1/2) + 7)))*(- 5^(1/2) - 1)^(1/ 
2)*1i)/20
 

Reduce [F]

\[ \int \frac {x^2}{1-3 x^4+x^8} \, dx=\int \frac {x^{2}}{x^{8}-3 x^{4}+1}d x \] Input:

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

Output:

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