\(\int \frac {1+x^6}{-1+x^6} \, dx\) [2]

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

Optimal result

Integrand size = 13, antiderivative size = 59 \[ \int \frac {1+x^6}{-1+x^6} \, dx=x+\frac {\arctan \left (\frac {1-2 x}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {\arctan \left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {2 \text {arctanh}(x)}{3}-\frac {1}{3} \text {arctanh}\left (\frac {x}{1+x^2}\right ) \] Output:

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.32 \[ \int \frac {1+x^6}{-1+x^6} \, dx=\frac {1}{6} \left (6 x-2 \sqrt {3} \arctan \left (\frac {-1+2 x}{\sqrt {3}}\right )-2 \sqrt {3} \arctan \left (\frac {1+2 x}{\sqrt {3}}\right )+2 \log (1-x)-2 \log (1+x)+\log \left (1-x+x^2\right )-\log \left (1+x+x^2\right )\right ) \] Input:

Integrate[(1 + x^6)/(-1 + x^6),x]
 

Output:

(6*x - 2*Sqrt[3]*ArcTan[(-1 + 2*x)/Sqrt[3]] - 2*Sqrt[3]*ArcTan[(1 + 2*x)/S 
qrt[3]] + 2*Log[1 - x] - 2*Log[1 + x] + Log[1 - x + x^2] - Log[1 + x + x^2 
])/6
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.41, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.692, Rules used = {913, 754, 27, 219, 1142, 25, 1083, 217, 1103}

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^6+1}{x^6-1} \, dx\)

\(\Big \downarrow \) 913

\(\displaystyle 2 \int \frac {1}{x^6-1}dx+x\)

\(\Big \downarrow \) 754

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 219

\(\displaystyle 2 \left (-\frac {1}{6} \int \frac {2-x}{x^2-x+1}dx-\frac {1}{6} \int \frac {x+2}{x^2+x+1}dx-\frac {\text {arctanh}(x)}{3}\right )+x\)

\(\Big \downarrow \) 1142

\(\displaystyle 2 \left (\frac {1}{6} \left (\frac {1}{2} \int -\frac {1-2 x}{x^2-x+1}dx-\frac {3}{2} \int \frac {1}{x^2-x+1}dx\right )+\frac {1}{6} \left (-\frac {3}{2} \int \frac {1}{x^2+x+1}dx-\frac {1}{2} \int \frac {2 x+1}{x^2+x+1}dx\right )-\frac {\text {arctanh}(x)}{3}\right )+x\)

\(\Big \downarrow \) 25

\(\displaystyle 2 \left (\frac {1}{6} \left (-\frac {3}{2} \int \frac {1}{x^2-x+1}dx-\frac {1}{2} \int \frac {1-2 x}{x^2-x+1}dx\right )+\frac {1}{6} \left (-\frac {3}{2} \int \frac {1}{x^2+x+1}dx-\frac {1}{2} \int \frac {2 x+1}{x^2+x+1}dx\right )-\frac {\text {arctanh}(x)}{3}\right )+x\)

\(\Big \downarrow \) 1083

\(\displaystyle 2 \left (\frac {1}{6} \left (3 \int \frac {1}{-(2 x-1)^2-3}d(2 x-1)-\frac {1}{2} \int \frac {1-2 x}{x^2-x+1}dx\right )+\frac {1}{6} \left (3 \int \frac {1}{-(2 x+1)^2-3}d(2 x+1)-\frac {1}{2} \int \frac {2 x+1}{x^2+x+1}dx\right )-\frac {\text {arctanh}(x)}{3}\right )+x\)

\(\Big \downarrow \) 217

\(\displaystyle 2 \left (\frac {1}{6} \left (-\frac {1}{2} \int \frac {1-2 x}{x^2-x+1}dx-\sqrt {3} \arctan \left (\frac {2 x-1}{\sqrt {3}}\right )\right )+\frac {1}{6} \left (-\frac {1}{2} \int \frac {2 x+1}{x^2+x+1}dx-\sqrt {3} \arctan \left (\frac {2 x+1}{\sqrt {3}}\right )\right )-\frac {\text {arctanh}(x)}{3}\right )+x\)

\(\Big \downarrow \) 1103

\(\displaystyle 2 \left (\frac {1}{6} \left (\frac {1}{2} \log \left (x^2-x+1\right )-\sqrt {3} \arctan \left (\frac {2 x-1}{\sqrt {3}}\right )\right )+\frac {1}{6} \left (-\sqrt {3} \arctan \left (\frac {2 x+1}{\sqrt {3}}\right )-\frac {1}{2} \log \left (x^2+x+1\right )\right )-\frac {\text {arctanh}(x)}{3}\right )+x\)

Input:

Int[(1 + x^6)/(-1 + x^6),x]
 

Output:

x + 2*(-1/3*ArcTanh[x] + (-(Sqrt[3]*ArcTan[(-1 + 2*x)/Sqrt[3]]) + Log[1 - 
x + x^2]/2)/6 + (-(Sqrt[3]*ArcTan[(1 + 2*x)/Sqrt[3]]) - Log[1 + x + x^2]/2 
)/6)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[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 754
Int[((a_) + (b_.)*(x_)^(n_))^(-1), x_Symbol] :> Module[{r = Numerator[Rt[-a 
/b, n]], s = Denominator[Rt[-a/b, n]], k, u}, Simp[u = Int[(r - s*Cos[(2*k* 
Pi)/n]*x)/(r^2 - 2*r*s*Cos[(2*k*Pi)/n]*x + s^2*x^2), x] + Int[(r + s*Cos[(2 
*k*Pi)/n]*x)/(r^2 + 2*r*s*Cos[(2*k*Pi)/n]*x + s^2*x^2), x]; 2*(r^2/(a*n)) 
 Int[1/(r^2 - s^2*x^2), x] + 2*(r/(a*n))   Sum[u, {k, 1, (n - 2)/4}], x]] / 
; FreeQ[{a, b}, x] && IGtQ[(n - 2)/4, 0] && NegQ[a/b]
 

rule 913
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Si 
mp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(p + 1) + 1))), x] - Simp[(a*d - b*c*(n*( 
p + 1) + 1))/(b*(n*(p + 1) + 1))   Int[(a + b*x^n)^p, x], x] /; FreeQ[{a, b 
, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1103
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, 
e}, x] && EqQ[2*c*d - b*e, 0]
 

rule 1142
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S 
imp[(2*c*d - b*e)/(2*c)   Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) 
Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
 
Maple [A] (verified)

Time = 0.67 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.07

method result size
risch \(x +\frac {\ln \left (-1+x \right )}{3}-\frac {\ln \left (x^{2}+x +1\right )}{6}-\frac {\sqrt {3}\, \arctan \left (\frac {2 \left (x +\frac {1}{2}\right ) \sqrt {3}}{3}\right )}{3}-\frac {\ln \left (1+x \right )}{3}+\frac {\ln \left (x^{2}-x +1\right )}{6}-\frac {\sqrt {3}\, \arctan \left (\frac {2 \left (x -\frac {1}{2}\right ) \sqrt {3}}{3}\right )}{3}\) \(63\)
default \(x -\frac {\ln \left (x^{2}+x +1\right )}{6}-\frac {\arctan \left (\frac {\left (1+2 x \right ) \sqrt {3}}{3}\right ) \sqrt {3}}{3}+\frac {\ln \left (-1+x \right )}{3}+\frac {\ln \left (x^{2}-x +1\right )}{6}-\frac {\sqrt {3}\, \arctan \left (\frac {\left (-1+2 x \right ) \sqrt {3}}{3}\right )}{3}-\frac {\ln \left (1+x \right )}{3}\) \(67\)
meijerg \(\frac {x \left (\ln \left (1-\left (x^{6}\right )^{\frac {1}{6}}\right )-\ln \left (1+\left (x^{6}\right )^{\frac {1}{6}}\right )+\frac {\ln \left (1-\left (x^{6}\right )^{\frac {1}{6}}+\left (x^{6}\right )^{\frac {1}{3}}\right )}{2}-\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}}{2-\left (x^{6}\right )^{\frac {1}{6}}}\right )-\frac {\ln \left (1+\left (x^{6}\right )^{\frac {1}{6}}+\left (x^{6}\right )^{\frac {1}{3}}\right )}{2}-\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}}{2+\left (x^{6}\right )^{\frac {1}{6}}}\right )\right )}{6 \left (x^{6}\right )^{\frac {1}{6}}}-\frac {\left (-1\right )^{\frac {5}{6}} \left (6 x \left (-1\right )^{\frac {1}{6}}+\frac {x \left (-1\right )^{\frac {1}{6}} \left (\ln \left (1-\left (x^{6}\right )^{\frac {1}{6}}\right )-\ln \left (1+\left (x^{6}\right )^{\frac {1}{6}}\right )+\frac {\ln \left (1-\left (x^{6}\right )^{\frac {1}{6}}+\left (x^{6}\right )^{\frac {1}{3}}\right )}{2}-\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}}{2-\left (x^{6}\right )^{\frac {1}{6}}}\right )-\frac {\ln \left (1+\left (x^{6}\right )^{\frac {1}{6}}+\left (x^{6}\right )^{\frac {1}{3}}\right )}{2}-\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}}{2+\left (x^{6}\right )^{\frac {1}{6}}}\right )\right )}{\left (x^{6}\right )^{\frac {1}{6}}}\right )}{6}\) \(246\)

Input:

int((x^6+1)/(x^6-1),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.12 \[ \int \frac {1+x^6}{-1+x^6} \, dx=-\frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + x - \frac {1}{6} \, \log \left (x^{2} + x + 1\right ) + \frac {1}{6} \, \log \left (x^{2} - x + 1\right ) - \frac {1}{3} \, \log \left (x + 1\right ) + \frac {1}{3} \, \log \left (x - 1\right ) \] Input:

integrate((x^6+1)/(x^6-1),x, algorithm="fricas")
 

Output:

-1/3*sqrt(3)*arctan(1/3*sqrt(3)*(2*x + 1)) - 1/3*sqrt(3)*arctan(1/3*sqrt(3 
)*(2*x - 1)) + x - 1/6*log(x^2 + x + 1) + 1/6*log(x^2 - x + 1) - 1/3*log(x 
 + 1) + 1/3*log(x - 1)
 

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.44 \[ \int \frac {1+x^6}{-1+x^6} \, dx=x + \frac {\log {\left (x - 1 \right )}}{3} - \frac {\log {\left (x + 1 \right )}}{3} + \frac {\log {\left (x^{2} - x + 1 \right )}}{6} - \frac {\log {\left (x^{2} + x + 1 \right )}}{6} - \frac {\sqrt {3} \operatorname {atan}{\left (\frac {2 \sqrt {3} x}{3} - \frac {\sqrt {3}}{3} \right )}}{3} - \frac {\sqrt {3} \operatorname {atan}{\left (\frac {2 \sqrt {3} x}{3} + \frac {\sqrt {3}}{3} \right )}}{3} \] Input:

integrate((x**6+1)/(x**6-1),x)
 

Output:

x + log(x - 1)/3 - log(x + 1)/3 + log(x**2 - x + 1)/6 - log(x**2 + x + 1)/ 
6 - sqrt(3)*atan(2*sqrt(3)*x/3 - sqrt(3)/3)/3 - sqrt(3)*atan(2*sqrt(3)*x/3 
 + sqrt(3)/3)/3
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.12 \[ \int \frac {1+x^6}{-1+x^6} \, dx=-\frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + x - \frac {1}{6} \, \log \left (x^{2} + x + 1\right ) + \frac {1}{6} \, \log \left (x^{2} - x + 1\right ) - \frac {1}{3} \, \log \left (x + 1\right ) + \frac {1}{3} \, \log \left (x - 1\right ) \] Input:

integrate((x^6+1)/(x^6-1),x, algorithm="maxima")
 

Output:

-1/3*sqrt(3)*arctan(1/3*sqrt(3)*(2*x + 1)) - 1/3*sqrt(3)*arctan(1/3*sqrt(3 
)*(2*x - 1)) + x - 1/6*log(x^2 + x + 1) + 1/6*log(x^2 - x + 1) - 1/3*log(x 
 + 1) + 1/3*log(x - 1)
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.15 \[ \int \frac {1+x^6}{-1+x^6} \, dx=-\frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) - \frac {1}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + x - \frac {1}{6} \, \log \left (x^{2} + x + 1\right ) + \frac {1}{6} \, \log \left (x^{2} - x + 1\right ) - \frac {1}{3} \, \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{3} \, \log \left ({\left | x - 1 \right |}\right ) \] Input:

integrate((x^6+1)/(x^6-1),x, algorithm="giac")
 

Output:

-1/3*sqrt(3)*arctan(1/3*sqrt(3)*(2*x + 1)) - 1/3*sqrt(3)*arctan(1/3*sqrt(3 
)*(2*x - 1)) + x - 1/6*log(x^2 + x + 1) + 1/6*log(x^2 - x + 1) - 1/3*log(a 
bs(x + 1)) + 1/3*log(abs(x - 1))
 

Mupad [B] (verification not implemented)

Time = 0.69 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.59 \[ \int \frac {1+x^6}{-1+x^6} \, dx=x+\frac {\mathrm {atan}\left (x\,1{}\mathrm {i}\right )\,2{}\mathrm {i}}{3}-\mathrm {atan}\left (\frac {x\,32{}\mathrm {i}}{-32+\sqrt {3}\,32{}\mathrm {i}}-\frac {32\,\sqrt {3}\,x}{-32+\sqrt {3}\,32{}\mathrm {i}}\right )\,\left (\frac {\sqrt {3}}{3}-\frac {1}{3}{}\mathrm {i}\right )-\mathrm {atan}\left (\frac {x\,32{}\mathrm {i}}{32+\sqrt {3}\,32{}\mathrm {i}}+\frac {32\,\sqrt {3}\,x}{32+\sqrt {3}\,32{}\mathrm {i}}\right )\,\left (\frac {\sqrt {3}}{3}+\frac {1}{3}{}\mathrm {i}\right ) \] Input:

int((x^6 + 1)/(x^6 - 1),x)
 

Output:

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

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.08 \[ \int \frac {1+x^6}{-1+x^6} \, dx=-\frac {\sqrt {3}\, \mathit {atan} \left (\frac {2 x -1}{\sqrt {3}}\right )}{3}-\frac {\sqrt {3}\, \mathit {atan} \left (\frac {2 x +1}{\sqrt {3}}\right )}{3}+\frac {\mathrm {log}\left (x^{2}-x +1\right )}{6}-\frac {\mathrm {log}\left (x^{2}+x +1\right )}{6}+\frac {\mathrm {log}\left (x -1\right )}{3}-\frac {\mathrm {log}\left (x +1\right )}{3}+x \] Input:

int((x^6+1)/(x^6-1),x)
 

Output:

( - 2*sqrt(3)*atan((2*x - 1)/sqrt(3)) - 2*sqrt(3)*atan((2*x + 1)/sqrt(3)) 
+ log(x**2 - x + 1) - log(x**2 + x + 1) + 2*log(x - 1) - 2*log(x + 1) + 6* 
x)/6