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

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 = 19, antiderivative size = 59 \[ \int \frac {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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.01 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.32 \[ \int \frac {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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[(x^(-3) + x^3)/(-x^(-3) + x^3),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.46 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.37, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.632, Rules used = {2027, 10, 25, 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^3+\frac {1}{x^3}}{x^3-\frac {1}{x^3}} \, dx\)

\(\Big \downarrow \) 2027

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

\(\Big \downarrow \) 10

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 913

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

\(\Big \downarrow \) 754

\(\displaystyle x-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 )\)

\(\Big \downarrow \) 27

\(\displaystyle x-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 )\)

\(\Big \downarrow \) 219

\(\displaystyle x-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 )\)

\(\Big \downarrow \) 1142

\(\displaystyle x-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 )\)

\(\Big \downarrow \) 25

\(\displaystyle x-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 )\)

\(\Big \downarrow \) 1083

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

\(\Big \downarrow \) 217

\(\displaystyle x-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 )\)

\(\Big \downarrow \) 1103

\(\displaystyle x-2 \left (\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 {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 )\)

Input:

Int[(x^(-3) + x^3)/(-x^(-3) + x^3),x]
 

Output:

x - 2*(ArcTanh[x]/3 + (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 10
Int[(u_.)*((e_.)*(x_))^(m_.)*((a_.)*(x_)^(r_.) + (b_.)*(x_)^(s_.))^(p_.), x 
_Symbol] :> Simp[1/e^(p*r)   Int[u*(e*x)^(m + p*r)*(a + b*x^(s - r))^p, x], 
 x] /; FreeQ[{a, b, e, m, r, s}, x] && IntegerQ[p] && (IntegerQ[p*r] || GtQ 
[e, 0]) && PosQ[s - r]
 

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]
 

rule 2027
Int[(Fx_.)*((a_.)*(x_)^(r_.) + (b_.)*(x_)^(s_.))^(p_.), x_Symbol] :> Int[x^ 
(p*r)*(a + b*x^(s - r))^p*Fx, x] /; FreeQ[{a, b, r, s}, x] && IntegerQ[p] & 
& PosQ[s - r] &&  !(EqQ[p, 1] && EqQ[u, 1])
 
Maple [A] (verified)

Time = 0.13 (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\)

Input:

int((1/x^3+x^3)/(-1/x^3+x^3),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.12 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.12 \[ \int \frac {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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((1/x^3+x^3)/(-1/x^3+x^3),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.14 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.44 \[ \int \frac {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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((1/x**3+x**3)/(-1/x**3+x**3),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 {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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((1/x^3+x^3)/(-1/x^3+x^3),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.12 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.15 \[ \int \frac {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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((1/x^3+x^3)/(-1/x^3+x^3),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.04 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.59 \[ \int \frac {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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(-(1/x^3 + x^3)/(1/x^3 - x^3),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.20 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.08 \[ \int \frac {\frac {1}{x^3}+x^3}{-\frac {1}{x^3}+x^3} \, 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((1/x^3+x^3)/(-1/x^3+x^3),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