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

Optimal. Leaf size=36 \[ \frac {8}{3 (1-x)^3}-\frac {6}{(1-x)^2}+\frac {6}{1-x}+\log (1-x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {45} \begin {gather*} \frac {6}{1-x}-\frac {6}{(1-x)^2}+\frac {8}{3 (1-x)^3}+\log (1-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

8/(3*(1 - x)^3) - 6/(1 - x)^2 + 6/(1 - x) + Log[1 - x]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.85, size = 44, normalized size = 1.22 \begin {gather*} \frac {-\frac {8}{3}+6 x-6 x^2+\text {Log}\left [-1+x\right ] \left (-1+3 x-3 x^2+x^3\right )}{-1+3 x-3 x^2+x^3} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-8 / 3 + 6 x - 6 x ^ 2 + Log[-1 + x] (-1 + 3 x - 3 x ^ 2 + x ^ 3)) / (-1 + 3 x - 3 x ^ 2 + x ^ 3)

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 27, normalized size = 0.75

method result size
norman \(\frac {-6 x^{2}+6 x -\frac {8}{3}}{\left (-1+x \right )^{3}}+\ln \left (-1+x \right )\) \(22\)
risch \(\frac {-6 x^{2}+6 x -\frac {8}{3}}{\left (-1+x \right )^{3}}+\ln \left (-1+x \right )\) \(22\)
default \(\ln \left (-1+x \right )-\frac {6}{-1+x}-\frac {6}{\left (-1+x \right )^{2}}-\frac {8}{3 \left (-1+x \right )^{3}}\) \(27\)
meijerg \(\frac {x \left (x^{2}-3 x +3\right )}{3 \left (1-x \right )^{3}}+\frac {x^{2} \left (3-x \right )}{2 \left (1-x \right )^{3}}+\frac {x^{3}}{\left (1-x \right )^{3}}+\frac {x \left (22 x^{2}-30 x +12\right )}{12 \left (1-x \right )^{3}}+\ln \left (1-x \right )\) \(74\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 32, normalized size = 0.89 \begin {gather*} -\frac {2 \, {\left (9 \, x^{2} - 9 \, x + 4\right )}}{3 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )}} + \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 46, normalized size = 1.28 \begin {gather*} -\frac {18 \, x^{2} - 3 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )} \log \left (x - 1\right ) - 18 \, x + 8}{3 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 29, normalized size = 0.81 \begin {gather*} \frac {- 18 x^{2} + 18 x - 8}{3 x^{3} - 9 x^{2} + 9 x - 3} + \log {\left (x - 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-18*x**2 + 18*x - 8)/(3*x**3 - 9*x**2 + 9*x - 3) + log(x - 1)

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 27, normalized size = 0.75 \begin {gather*} \frac {\frac {1}{6} \left (-36 x^{2}+36 x-16\right )}{\left (x-1\right )^{3}}+\ln \left |x-1\right | \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 22, normalized size = 0.61 \begin {gather*} \ln \left (x-1\right )-\frac {6\,x^2-6\,x+\frac {8}{3}}{{\left (x-1\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x + 1)^3/(x - 1)^4,x)

[Out]

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

________________________________________________________________________________________