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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6857, 642} \begin {gather*} -\frac {1}{3} \log \left (x^2-x+1\right )+\frac {1}{2 (1-x)}+\frac {3}{4} \log (1-x)-\frac {1}{12} \log (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 642

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]

Rule 6857

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 34, normalized size = 0.79 \begin {gather*} \frac {1}{12} \left (-\frac {6}{-1+x}+9 \log (-1+x)-\log (1+x)-4 \log \left ((-1+x)^2+x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-6/(-1 + x) + 9*Log[-1 + x] - Log[1 + x] - 4*Log[(-1 + x)^2 + x])/12

________________________________________________________________________________________

Mathics [A]
time = 1.86, size = 37, normalized size = 0.86 \begin {gather*} \frac {-6+\left (-1+x\right ) \left (-4 \text {Log}\left [1-x+x^2\right ]-\text {Log}\left [1+x\right ]+9 \text {Log}\left [-1+x\right ]\right )}{-12+12 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-6 + (-1 + x) (-4 Log[1 - x + x ^ 2] - Log[1 + x] + 9 Log[-1 + x])) / (12 (-1 + x))

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 32, normalized size = 0.74

method result size
default \(-\frac {1}{2 \left (-1+x \right )}+\frac {3 \ln \left (-1+x \right )}{4}-\frac {\ln \left (1+x \right )}{12}-\frac {\ln \left (x^{2}-x +1\right )}{3}\) \(32\)
norman \(-\frac {1}{2 \left (-1+x \right )}+\frac {3 \ln \left (-1+x \right )}{4}-\frac {\ln \left (1+x \right )}{12}-\frac {\ln \left (x^{2}-x +1\right )}{3}\) \(32\)
risch \(-\frac {1}{2 \left (-1+x \right )}+\frac {3 \ln \left (-1+x \right )}{4}-\frac {\ln \left (1+x \right )}{12}-\frac {\ln \left (x^{2}-x +1\right )}{3}\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.36, size = 31, normalized size = 0.72 \begin {gather*} -\frac {1}{2 \, {\left (x - 1\right )}} - \frac {1}{3} \, \log \left (x^{2} - x + 1\right ) - \frac {1}{12} \, \log \left (x + 1\right ) + \frac {3}{4} \, \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 40, normalized size = 0.93 \begin {gather*} -\frac {4 \, {\left (x - 1\right )} \log \left (x^{2} - x + 1\right ) + {\left (x - 1\right )} \log \left (x + 1\right ) - 9 \, {\left (x - 1\right )} \log \left (x - 1\right ) + 6}{12 \, {\left (x - 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/12*(4*(x - 1)*log(x^2 - x + 1) + (x - 1)*log(x + 1) - 9*(x - 1)*log(x - 1) + 6)/(x - 1)

________________________________________________________________________________________

Sympy [A]
time = 0.07, size = 31, normalized size = 0.72 \begin {gather*} \frac {3 \log {\left (x - 1 \right )}}{4} - \frac {\log {\left (x + 1 \right )}}{12} - \frac {\log {\left (x^{2} - x + 1 \right )}}{3} - \frac {1}{2 x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*log(x - 1)/4 - log(x + 1)/12 - log(x**2 - x + 1)/3 - 1/(2*x - 2)

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 41, normalized size = 0.95 \begin {gather*} -\frac {\ln \left |x+1\right |}{12}-\frac {\ln \left (x^{2}-x+1\right )}{3}+\frac {3}{4} \ln \left |x-1\right |-\frac {\frac {1}{4}\cdot 2}{x-1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 33, normalized size = 0.77 \begin {gather*} \frac {3\,\ln \left (x-1\right )}{4}-\frac {\ln \left (x+1\right )}{12}-\frac {\ln \left (x^2-x+1\right )}{3}-\frac {1}{2\,\left (x-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________