3.111 \(\int \frac {-2+2 x+3 x^2}{-1+x^3} \, dx\)

Optimal. Leaf size=28 \[ \log \left (1-x^3\right )+\frac {4 \tan ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right )}{\sqrt {3}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {1871, 1586, 618, 204, 260} \[ \log \left (1-x^3\right )+\frac {4 \tan ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right )}{\sqrt {3}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 260

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

Rule 618

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

Rule 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 1871

Int[(P2_)/((a_) + (b_.)*(x_)^3), x_Symbol] :> With[{A = Coeff[P2, x, 0], B = Coeff[P2, x, 1], C = Coeff[P2, x,
 2]}, Int[(A + B*x)/(a + b*x^3), x] + Dist[C, Int[x^2/(a + b*x^3), x], x] /; EqQ[a*B^3 - b*A^3, 0] ||  !Ration
alQ[a/b]] /; FreeQ[{a, b}, x] && PolyQ[P2, x, 2]

Rubi steps

\begin {align*} \int \frac {-2+2 x+3 x^2}{-1+x^3} \, dx &=3 \int \frac {x^2}{-1+x^3} \, dx+\int \frac {-2+2 x}{-1+x^3} \, dx\\ &=\log \left (1-x^3\right )+\int \frac {1}{\frac {1}{2}+\frac {x}{2}+\frac {x^2}{2}} \, dx\\ &=\log \left (1-x^3\right )-2 \operatorname {Subst}\left (\int \frac {1}{-\frac {3}{4}-x^2} \, dx,x,\frac {1}{2}+x\right )\\ &=\frac {4 \tan ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )}{\sqrt {3}}+\log \left (1-x^3\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 28, normalized size = 1.00 \[ \log \left (1-x^3\right )+\frac {4 \tan ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right )}{\sqrt {3}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 28, normalized size = 1.00 \[ \frac {4}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \log \left (x^{2} + x + 1\right ) + \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.01, size = 29, normalized size = 1.04 \[ \frac {4}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \log \left (x^{2} + x + 1\right ) + \log \left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.01, size = 29, normalized size = 1.04 \[ \frac {4 \sqrt {3}\, \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right )}{3}+\ln \left (x -1\right )+\ln \left (x^{2}+x +1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.17, size = 28, normalized size = 1.00 \[ \frac {4}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \log \left (x^{2} + x + 1\right ) + \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 57, normalized size = 2.04 \[ \ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )+\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )+\ln \left (x-1\right )-\frac {\sqrt {3}\,\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,2{}\mathrm {i}}{3}+\frac {\sqrt {3}\,\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,2{}\mathrm {i}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 3, normalized size = 0.11 \[ \log {\left (x - 1 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x - 1)

________________________________________________________________________________________