### 3.30 $$\int \frac{1-x^3}{x^2 (1-x^3+x^6)} \, dx$$

Optimal. Leaf size=416 $\frac{\left (3+i \sqrt{3}\right ) \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1-i \sqrt{3}\right )} x+\left (1-i \sqrt{3}\right )^{2/3}\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (3-i \sqrt{3}\right ) \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1+i \sqrt{3}\right )} x+\left (1+i \sqrt{3}\right )^{2/3}\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}-\frac{1}{x}-\frac{\left (3+i \sqrt{3}\right ) \log \left (-\sqrt [3]{2} x+\sqrt [3]{1-i \sqrt{3}}\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}-\frac{\left (3-i \sqrt{3}\right ) \log \left (-\sqrt [3]{2} x+\sqrt [3]{1+i \sqrt{3}}\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}-\frac{\left (\sqrt{3}+i\right ) \tan ^{-1}\left (\frac{1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )}}}{\sqrt{3}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (-\sqrt{3}+i\right ) \tan ^{-1}\left (\frac{1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )}}}{\sqrt{3}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}$

[Out]

-x^(-1) - ((I + Sqrt[3])*ArcTan[(1 + (2*x)/((1 - I*Sqrt[3])/2)^(1/3))/Sqrt[3]])/(3*2^(2/3)*(1 - I*Sqrt[3])^(1/
3)) + ((I - Sqrt[3])*ArcTan[(1 + (2*x)/((1 + I*Sqrt[3])/2)^(1/3))/Sqrt[3]])/(3*2^(2/3)*(1 + I*Sqrt[3])^(1/3))
- ((3 + I*Sqrt[3])*Log[(1 - I*Sqrt[3])^(1/3) - 2^(1/3)*x])/(9*2^(2/3)*(1 - I*Sqrt[3])^(1/3)) - ((3 - I*Sqrt[3]
)*Log[(1 + I*Sqrt[3])^(1/3) - 2^(1/3)*x])/(9*2^(2/3)*(1 + I*Sqrt[3])^(1/3)) + ((3 + I*Sqrt[3])*Log[(1 - I*Sqrt
[3])^(2/3) + (2*(1 - I*Sqrt[3]))^(1/3)*x + 2^(2/3)*x^2])/(18*2^(2/3)*(1 - I*Sqrt[3])^(1/3)) + ((3 - I*Sqrt[3])
*Log[(1 + I*Sqrt[3])^(2/3) + (2*(1 + I*Sqrt[3]))^(1/3)*x + 2^(2/3)*x^2])/(18*2^(2/3)*(1 + I*Sqrt[3])^(1/3))

________________________________________________________________________________________

Rubi [A]  time = 0.275499, antiderivative size = 416, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.348, Rules used = {1504, 1374, 292, 31, 634, 617, 204, 628} $\frac{\left (3+i \sqrt{3}\right ) \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1-i \sqrt{3}\right )} x+\left (1-i \sqrt{3}\right )^{2/3}\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (3-i \sqrt{3}\right ) \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1+i \sqrt{3}\right )} x+\left (1+i \sqrt{3}\right )^{2/3}\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}-\frac{1}{x}-\frac{\left (3+i \sqrt{3}\right ) \log \left (-\sqrt [3]{2} x+\sqrt [3]{1-i \sqrt{3}}\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}-\frac{\left (3-i \sqrt{3}\right ) \log \left (-\sqrt [3]{2} x+\sqrt [3]{1+i \sqrt{3}}\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}-\frac{\left (\sqrt{3}+i\right ) \tan ^{-1}\left (\frac{1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )}}}{\sqrt{3}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (-\sqrt{3}+i\right ) \tan ^{-1}\left (\frac{1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )}}}{\sqrt{3}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-x^(-1) - ((I + Sqrt[3])*ArcTan[(1 + (2*x)/((1 - I*Sqrt[3])/2)^(1/3))/Sqrt[3]])/(3*2^(2/3)*(1 - I*Sqrt[3])^(1/
3)) + ((I - Sqrt[3])*ArcTan[(1 + (2*x)/((1 + I*Sqrt[3])/2)^(1/3))/Sqrt[3]])/(3*2^(2/3)*(1 + I*Sqrt[3])^(1/3))
- ((3 + I*Sqrt[3])*Log[(1 - I*Sqrt[3])^(1/3) - 2^(1/3)*x])/(9*2^(2/3)*(1 - I*Sqrt[3])^(1/3)) - ((3 - I*Sqrt[3]
)*Log[(1 + I*Sqrt[3])^(1/3) - 2^(1/3)*x])/(9*2^(2/3)*(1 + I*Sqrt[3])^(1/3)) + ((3 + I*Sqrt[3])*Log[(1 - I*Sqrt
[3])^(2/3) + (2*(1 - I*Sqrt[3]))^(1/3)*x + 2^(2/3)*x^2])/(18*2^(2/3)*(1 - I*Sqrt[3])^(1/3)) + ((3 - I*Sqrt[3])
*Log[(1 + I*Sqrt[3])^(2/3) + (2*(1 + I*Sqrt[3]))^(1/3)*x + 2^(2/3)*x^2])/(18*2^(2/3)*(1 + I*Sqrt[3])^(1/3))

Rule 1504

Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(n_))*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^(p_), x_Symbol] :>
Simp[(d*(f*x)^(m + 1)*(a + b*x^n + c*x^(2*n))^(p + 1))/(a*f*(m + 1)), x] + Dist[1/(a*f^n*(m + 1)), Int[(f*x)^
(m + n)*(a + b*x^n + c*x^(2*n))^p*Simp[a*e*(m + 1) - b*d*(m + n*(p + 1) + 1) - c*d*(m + 2*n*(p + 1) + 1)*x^n,
x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IGtQ[n, 0] && LtQ[m, -
1] && IntegerQ[p]

Rule 1374

Int[((d_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}
, Dist[(d^n*(b/q + 1))/2, Int[(d*x)^(m - n)/(b/2 + q/2 + c*x^n), x], x] - Dist[(d^n*(b/q - 1))/2, Int[(d*x)^(m
- n)/(b/2 - q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IGtQ[n,
0] && GeQ[m, n]

Rule 292

Int[(x_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> -Dist[(3*Rt[a, 3]*Rt[b, 3])^(-1), Int[1/(Rt[a, 3] + Rt[b, 3]*x),
x], x] + Dist[1/(3*Rt[a, 3]*Rt[b, 3]), Int[(Rt[a, 3] + Rt[b, 3]*x)/(Rt[a, 3]^2 - Rt[a, 3]*Rt[b, 3]*x + Rt[b, 3
]^2*x^2), x], x] /; FreeQ[{a, b}, x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

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

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(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]

Rubi steps

\begin{align*} \int \frac{1-x^3}{x^2 \left (1-x^3+x^6\right )} \, dx &=-\frac{1}{x}-\int \frac{x^4}{1-x^3+x^6} \, dx\\ &=-\frac{1}{x}+\frac{1}{6} \left (-3+i \sqrt{3}\right ) \int \frac{x}{-\frac{1}{2}-\frac{i \sqrt{3}}{2}+x^3} \, dx-\frac{1}{6} \left (3+i \sqrt{3}\right ) \int \frac{x}{-\frac{1}{2}+\frac{i \sqrt{3}}{2}+x^3} \, dx\\ &=-\frac{1}{x}+-\frac{\left (-3-i \sqrt{3}\right ) \int \frac{-\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )}+x}{\left (\frac{1}{2} \left (1-i \sqrt{3}\right )\right )^{2/3}+\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )} x+x^2} \, dx}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}-\frac{\left (3-i \sqrt{3}\right ) \int \frac{1}{-\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )}+x} \, dx}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}+\frac{\left (3-i \sqrt{3}\right ) \int \frac{-\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )}+x}{\left (\frac{1}{2} \left (1+i \sqrt{3}\right )\right )^{2/3}+\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )} x+x^2} \, dx}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}-\frac{\left (3+i \sqrt{3}\right ) \int \frac{1}{-\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )}+x} \, dx}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}\\ &=-\frac{1}{x}-\frac{\left (3+i \sqrt{3}\right ) \log \left (\sqrt [3]{1-i \sqrt{3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}-\frac{\left (3-i \sqrt{3}\right ) \log \left (\sqrt [3]{1+i \sqrt{3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}+-\frac{\left (-3-i \sqrt{3}\right ) \int \frac{\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )}+2 x}{\left (\frac{1}{2} \left (1-i \sqrt{3}\right )\right )^{2/3}+\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )} x+x^2} \, dx}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{1}{12} \left (-3+i \sqrt{3}\right ) \int \frac{1}{\left (\frac{1}{2} \left (1+i \sqrt{3}\right )\right )^{2/3}+\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )} x+x^2} \, dx+\frac{\left (3-i \sqrt{3}\right ) \int \frac{\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )}+2 x}{\left (\frac{1}{2} \left (1+i \sqrt{3}\right )\right )^{2/3}+\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )} x+x^2} \, dx}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}-\frac{1}{12} \left (3+i \sqrt{3}\right ) \int \frac{1}{\left (\frac{1}{2} \left (1-i \sqrt{3}\right )\right )^{2/3}+\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )} x+x^2} \, dx\\ &=-\frac{1}{x}-\frac{\left (3+i \sqrt{3}\right ) \log \left (\sqrt [3]{1-i \sqrt{3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}-\frac{\left (3-i \sqrt{3}\right ) \log \left (\sqrt [3]{1+i \sqrt{3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}+\frac{\left (3+i \sqrt{3}\right ) \log \left (\left (1-i \sqrt{3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt{3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (3-i \sqrt{3}\right ) \log \left (\left (1+i \sqrt{3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt{3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}+-\frac{\left (-3-i \sqrt{3}\right ) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (3-i \sqrt{3}\right ) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}\\ &=-\frac{1}{x}-\frac{\left (i+\sqrt{3}\right ) \tan ^{-1}\left (\frac{1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1-i \sqrt{3}\right )}}}{\sqrt{3}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (i-\sqrt{3}\right ) \tan ^{-1}\left (\frac{1+\frac{2 x}{\sqrt [3]{\frac{1}{2} \left (1+i \sqrt{3}\right )}}}{\sqrt{3}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}-\frac{\left (3+i \sqrt{3}\right ) \log \left (\sqrt [3]{1-i \sqrt{3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}-\frac{\left (3-i \sqrt{3}\right ) \log \left (\sqrt [3]{1+i \sqrt{3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}+\frac{\left (3+i \sqrt{3}\right ) \log \left (\left (1-i \sqrt{3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt{3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt{3}}}+\frac{\left (3-i \sqrt{3}\right ) \log \left (\left (1+i \sqrt{3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt{3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt{3}}}\\ \end{align*}

Mathematica [C]  time = 0.0136518, size = 47, normalized size = 0.11 $-\frac{1}{3} \text{RootSum}\left [\text{\#1}^6-\text{\#1}^3+1\& ,\frac{\text{\#1}^2 \log (x-\text{\#1})}{2 \text{\#1}^3-1}\& \right ]-\frac{1}{x}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-x^(-1) - RootSum[1 - #1^3 + #1^6 & , (Log[x - #1]*#1^2)/(-1 + 2*#1^3) & ]/3

________________________________________________________________________________________

Maple [C]  time = 0.006, size = 46, normalized size = 0.1 \begin{align*} -{\frac{1}{3}\sum _{{\it \_R}={\it RootOf} \left ({{\it \_Z}}^{6}-{{\it \_Z}}^{3}+1 \right ) }{\frac{{{\it \_R}}^{4}\ln \left ( x-{\it \_R} \right ) }{2\,{{\it \_R}}^{5}-{{\it \_R}}^{2}}}}-{x}^{-1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{1}{x} - \int \frac{x^{4}}{x^{6} - x^{3} + 1}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/x - integrate(x^4/(x^6 - x^3 + 1), x)

________________________________________________________________________________________

Fricas [B]  time = 1.93695, size = 5952, normalized size = 14.31 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/108*(2*18^(2/3)*12^(1/6)*x*cos(2/3*arctan(sqrt(3) - 2))*log(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^4
+ 18^(2/3)*12^(2/3)*sin(2/3*arctan(sqrt(3) - 2))^4 - 12*18^(1/3)*12^(1/3)*sqrt(3)*x*cos(2/3*arctan(sqrt(3) -
2))*sin(2/3*arctan(sqrt(3) - 2)) + 6*18^(1/3)*12^(1/3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 2*(18^(2/3)*12^(2/3)
*cos(2/3*arctan(sqrt(3) - 2))^2 - 3*18^(1/3)*12^(1/3)*x)*sin(2/3*arctan(sqrt(3) - 2))^2 + 36*x^2) + 8*18^(2/3)
*12^(1/6)*x*arctan(1/108*(6*18^(2/3)*12^(2/3)*sqrt(3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 108*sqrt(3)*cos(2/3*a
rctan(sqrt(3) - 2))^4 + 108*sqrt(3)*sin(2/3*arctan(sqrt(3) - 2))^4 + 864*cos(2/3*arctan(sqrt(3) - 2))*sin(2/3*
arctan(sqrt(3) - 2))^3 - 6*(18^(2/3)*12^(2/3)*sqrt(3)*x - 36*sqrt(3)*cos(2/3*arctan(sqrt(3) - 2))^2)*sin(2/3*a
rctan(sqrt(3) - 2))^2 - 12*(18^(2/3)*12^(2/3)*x*cos(2/3*arctan(sqrt(3) - 2)) + 72*cos(2/3*arctan(sqrt(3) - 2))
^3)*sin(2/3*arctan(sqrt(3) - 2)) - sqrt(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^4 + 18^(2/3)*12^(2/3)*s
in(2/3*arctan(sqrt(3) - 2))^4 - 12*18^(1/3)*12^(1/3)*sqrt(3)*x*cos(2/3*arctan(sqrt(3) - 2))*sin(2/3*arctan(sqr
t(3) - 2)) + 6*18^(1/3)*12^(1/3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 2*(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3
) - 2))^2 - 3*18^(1/3)*12^(1/3)*x)*sin(2/3*arctan(sqrt(3) - 2))^2 + 36*x^2)*(18^(2/3)*12^(2/3)*sqrt(3)*cos(2/3
*arctan(sqrt(3) - 2))^2 - 18^(2/3)*12^(2/3)*sqrt(3)*sin(2/3*arctan(sqrt(3) - 2))^2 - 2*18^(2/3)*12^(2/3)*cos(2
/3*arctan(sqrt(3) - 2))*sin(2/3*arctan(sqrt(3) - 2))))/(3*cos(2/3*arctan(sqrt(3) - 2))^4 - 10*cos(2/3*arctan(s
qrt(3) - 2))^2*sin(2/3*arctan(sqrt(3) - 2))^2 + 3*sin(2/3*arctan(sqrt(3) - 2))^4))*sin(2/3*arctan(sqrt(3) - 2)
) - 4*(18^(2/3)*12^(1/6)*sqrt(3)*x*cos(2/3*arctan(sqrt(3) - 2)) - 18^(2/3)*12^(1/6)*x*sin(2/3*arctan(sqrt(3) -
2)))*arctan(1/108*(6*18^(2/3)*12^(2/3)*sqrt(3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 108*sqrt(3)*cos(2/3*arctan(
sqrt(3) - 2))^4 + 108*sqrt(3)*sin(2/3*arctan(sqrt(3) - 2))^4 - 864*cos(2/3*arctan(sqrt(3) - 2))*sin(2/3*arctan
(sqrt(3) - 2))^3 - 6*(18^(2/3)*12^(2/3)*sqrt(3)*x - 36*sqrt(3)*cos(2/3*arctan(sqrt(3) - 2))^2)*sin(2/3*arctan(
sqrt(3) - 2))^2 + 12*(18^(2/3)*12^(2/3)*x*cos(2/3*arctan(sqrt(3) - 2)) + 72*cos(2/3*arctan(sqrt(3) - 2))^3)*si
n(2/3*arctan(sqrt(3) - 2)) - sqrt(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^4 + 18^(2/3)*12^(2/3)*sin(2/3
*arctan(sqrt(3) - 2))^4 + 12*18^(1/3)*12^(1/3)*sqrt(3)*x*cos(2/3*arctan(sqrt(3) - 2))*sin(2/3*arctan(sqrt(3) -
2)) + 6*18^(1/3)*12^(1/3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 2*(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2)
)^2 - 3*18^(1/3)*12^(1/3)*x)*sin(2/3*arctan(sqrt(3) - 2))^2 + 36*x^2)*(18^(2/3)*12^(2/3)*sqrt(3)*cos(2/3*arcta
n(sqrt(3) - 2))^2 - 18^(2/3)*12^(2/3)*sqrt(3)*sin(2/3*arctan(sqrt(3) - 2))^2 + 2*18^(2/3)*12^(2/3)*cos(2/3*arc
tan(sqrt(3) - 2))*sin(2/3*arctan(sqrt(3) - 2))))/(3*cos(2/3*arctan(sqrt(3) - 2))^4 - 10*cos(2/3*arctan(sqrt(3)
- 2))^2*sin(2/3*arctan(sqrt(3) - 2))^2 + 3*sin(2/3*arctan(sqrt(3) - 2))^4)) - 4*(18^(2/3)*12^(1/6)*sqrt(3)*x*
cos(2/3*arctan(sqrt(3) - 2)) + 18^(2/3)*12^(1/6)*x*sin(2/3*arctan(sqrt(3) - 2)))*arctan(-1/432*(6*18^(2/3)*12^
(2/3)*x - 216*cos(2/3*arctan(sqrt(3) - 2))^2 + 216*sin(2/3*arctan(sqrt(3) - 2))^2 - 18^(2/3)*12^(2/3)*sqrt(18^
(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^4 + 18^(2/3)*12^(2/3)*sin(2/3*arctan(sqrt(3) - 2))^4 - 12*18^(1/3)
*12^(1/3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 2*(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^2 + 6*18^(1/3)*
12^(1/3)*x)*sin(2/3*arctan(sqrt(3) - 2))^2 + 36*x^2))/(cos(2/3*arctan(sqrt(3) - 2))*sin(2/3*arctan(sqrt(3) - 2
)))) - (18^(2/3)*12^(1/6)*sqrt(3)*x*sin(2/3*arctan(sqrt(3) - 2)) + 18^(2/3)*12^(1/6)*x*cos(2/3*arctan(sqrt(3)
- 2)))*log(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^4 + 18^(2/3)*12^(2/3)*sin(2/3*arctan(sqrt(3) - 2))^4
+ 12*18^(1/3)*12^(1/3)*sqrt(3)*x*cos(2/3*arctan(sqrt(3) - 2))*sin(2/3*arctan(sqrt(3) - 2)) + 6*18^(1/3)*12^(1
/3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 2*(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^2 - 3*18^(1/3)*12^(1/
3)*x)*sin(2/3*arctan(sqrt(3) - 2))^2 + 36*x^2) + (18^(2/3)*12^(1/6)*sqrt(3)*x*sin(2/3*arctan(sqrt(3) - 2)) - 1
8^(2/3)*12^(1/6)*x*cos(2/3*arctan(sqrt(3) - 2)))*log(18^(2/3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^4 + 18^(2/
3)*12^(2/3)*sin(2/3*arctan(sqrt(3) - 2))^4 - 12*18^(1/3)*12^(1/3)*x*cos(2/3*arctan(sqrt(3) - 2))^2 + 2*(18^(2/
3)*12^(2/3)*cos(2/3*arctan(sqrt(3) - 2))^2 + 6*18^(1/3)*12^(1/3)*x)*sin(2/3*arctan(sqrt(3) - 2))^2 + 36*x^2) -
108)/x

________________________________________________________________________________________

Sympy [A]  time = 0.18953, size = 31, normalized size = 0.07 \begin{align*} - \operatorname{RootSum}{\left (19683 t^{6} + 243 t^{3} + 1, \left ( t \mapsto t \log{\left (6561 t^{5} + 54 t^{2} + x \right )} \right )\right )} - \frac{1}{x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-RootSum(19683*_t**6 + 243*_t**3 + 1, Lambda(_t, _t*log(6561*_t**5 + 54*_t**2 + x))) - 1/x

________________________________________________________________________________________

Giac [B]  time = 1.15749, size = 1119, normalized size = 2.69 \begin{align*} \text{result too large to display} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/9*(2*sqrt(3)*cos(4/9*pi)^5 - 20*sqrt(3)*cos(4/9*pi)^3*sin(4/9*pi)^2 + 10*sqrt(3)*cos(4/9*pi)*sin(4/9*pi)^4 -
10*cos(4/9*pi)^4*sin(4/9*pi) + 20*cos(4/9*pi)^2*sin(4/9*pi)^3 - 2*sin(4/9*pi)^5 + sqrt(3)*cos(4/9*pi)^2 - sqr
t(3)*sin(4/9*pi)^2 - 2*cos(4/9*pi)*sin(4/9*pi))*arctan(-((sqrt(3)*i + 1)*cos(4/9*pi) - 2*x)/((sqrt(3)*i + 1)*s
in(4/9*pi))) + 1/9*(2*sqrt(3)*cos(2/9*pi)^5 - 20*sqrt(3)*cos(2/9*pi)^3*sin(2/9*pi)^2 + 10*sqrt(3)*cos(2/9*pi)*
sin(2/9*pi)^4 - 10*cos(2/9*pi)^4*sin(2/9*pi) + 20*cos(2/9*pi)^2*sin(2/9*pi)^3 - 2*sin(2/9*pi)^5 + sqrt(3)*cos(
2/9*pi)^2 - sqrt(3)*sin(2/9*pi)^2 - 2*cos(2/9*pi)*sin(2/9*pi))*arctan(-((sqrt(3)*i + 1)*cos(2/9*pi) - 2*x)/((s
qrt(3)*i + 1)*sin(2/9*pi))) - 1/9*(2*sqrt(3)*cos(1/9*pi)^5 - 20*sqrt(3)*cos(1/9*pi)^3*sin(1/9*pi)^2 + 10*sqrt(
3)*cos(1/9*pi)*sin(1/9*pi)^4 + 10*cos(1/9*pi)^4*sin(1/9*pi) - 20*cos(1/9*pi)^2*sin(1/9*pi)^3 + 2*sin(1/9*pi)^5
- sqrt(3)*cos(1/9*pi)^2 + sqrt(3)*sin(1/9*pi)^2 - 2*cos(1/9*pi)*sin(1/9*pi))*arctan(((sqrt(3)*i + 1)*cos(1/9*
pi) + 2*x)/((sqrt(3)*i + 1)*sin(1/9*pi))) + 1/18*(10*sqrt(3)*cos(4/9*pi)^4*sin(4/9*pi) - 20*sqrt(3)*cos(4/9*pi
)^2*sin(4/9*pi)^3 + 2*sqrt(3)*sin(4/9*pi)^5 + 2*cos(4/9*pi)^5 - 20*cos(4/9*pi)^3*sin(4/9*pi)^2 + 10*cos(4/9*pi
)*sin(4/9*pi)^4 + 2*sqrt(3)*cos(4/9*pi)*sin(4/9*pi) + cos(4/9*pi)^2 - sin(4/9*pi)^2)*log(-(sqrt(3)*i*cos(4/9*p
i) + cos(4/9*pi))*x + x^2 + 1) + 1/18*(10*sqrt(3)*cos(2/9*pi)^4*sin(2/9*pi) - 20*sqrt(3)*cos(2/9*pi)^2*sin(2/9
*pi)^3 + 2*sqrt(3)*sin(2/9*pi)^5 + 2*cos(2/9*pi)^5 - 20*cos(2/9*pi)^3*sin(2/9*pi)^2 + 10*cos(2/9*pi)*sin(2/9*p
i)^4 + 2*sqrt(3)*cos(2/9*pi)*sin(2/9*pi) + cos(2/9*pi)^2 - sin(2/9*pi)^2)*log(-(sqrt(3)*i*cos(2/9*pi) + cos(2/
9*pi))*x + x^2 + 1) + 1/18*(10*sqrt(3)*cos(1/9*pi)^4*sin(1/9*pi) - 20*sqrt(3)*cos(1/9*pi)^2*sin(1/9*pi)^3 + 2*
sqrt(3)*sin(1/9*pi)^5 - 2*cos(1/9*pi)^5 + 20*cos(1/9*pi)^3*sin(1/9*pi)^2 - 10*cos(1/9*pi)*sin(1/9*pi)^4 - 2*sq
rt(3)*cos(1/9*pi)*sin(1/9*pi) + cos(1/9*pi)^2 - sin(1/9*pi)^2)*log((sqrt(3)*i*cos(1/9*pi) + cos(1/9*pi))*x + x
^2 + 1) - 1/x