3.1.60 \(\int \frac {1+4 x+6 x^2+4 x^3+x^4}{-1+3 x-3 x^2+x^3} \, dx\) [60]

Optimal. Leaf size=37 \[ -\frac {8}{(1-x)^2}+\frac {32}{1-x}+7 x+\frac {x^2}{2}+24 \log (1-x) \]

[Out]

-8/(1-x)^2+32/(1-x)+7*x+1/2*x^2+24*ln(1-x)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.029, Rules used = {2099} \begin {gather*} \frac {x^2}{2}+7 x+\frac {32}{1-x}-\frac {8}{(1-x)^2}+24 \log (1-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-8/(1 - x)^2 + 32/(1 - x) + 7*x + x^2/2 + 24*Log[1 - x]

Rule 2099

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {Integral} &=\int \left (7+\frac {16}{(-1+x)^3}+\frac {32}{(-1+x)^2}+\frac {24}{-1+x}+x\right ) \, dx\\ &=-\frac {8}{(1-x)^2}+\frac {32}{1-x}+7 x+\frac {x^2}{2}+24 \log (1-x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 35, normalized size = 0.95 \begin {gather*} -\frac {8}{(-1+x)^2}-\frac {32}{-1+x}+8 (-1+x)+\frac {1}{2} (-1+x)^2+24 \log (-1+x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-8/(-1 + x)^2 - 32/(-1 + x) + 8*(-1 + x) + (-1 + x)^2/2 + 24*Log[-1 + x]

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 30, normalized size = 0.81

method result size
norman \(\frac {-52 x +6 x^{3}+\frac {1}{2} x^{4}+\frac {75}{2}}{\left (x -1\right )^{2}}+24 \ln \left (x -1\right )\) \(29\)
default \(\frac {x^{2}}{2}+7 x -\frac {32}{x -1}-\frac {8}{\left (x -1\right )^{2}}+24 \ln \left (x -1\right )\) \(30\)
risch \(\frac {x^{2}}{2}+7 x +\frac {-32 x +24}{x^{2}-2 x +1}+24 \ln \left (x -1\right )\) \(32\)
parallelrisch \(\frac {x^{4}+48 \ln \left (x -1\right ) x^{2}+12 x^{3}+75-96 \ln \left (x -1\right ) x +48 \ln \left (x -1\right )-104 x}{2 x^{2}-4 x +2}\) \(48\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2+7*x-32/(x-1)-8/(x-1)^2+24*ln(x-1)

________________________________________________________________________________________

Maxima [A]
time = 0.40, size = 32, normalized size = 0.86 \begin {gather*} \frac {1}{2} \, x^{2} + 7 \, x - \frac {8 \, {\left (4 \, x - 3\right )}}{x^{2} - 2 \, x + 1} + 24 \, \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2 + 7*x - 8*(4*x - 3)/(x^2 - 2*x + 1) + 24*log(x - 1)

________________________________________________________________________________________

Fricas [A]
time = 0.56, size = 44, normalized size = 1.19 \begin {gather*} \frac {x^{4} + 12 \, x^{3} - 27 \, x^{2} + 48 \, {\left (x^{2} - 2 \, x + 1\right )} \log \left (x - 1\right ) - 50 \, x + 48}{2 \, {\left (x^{2} - 2 \, x + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 27, normalized size = 0.73 \begin {gather*} \frac {x^{2}}{2} + 7 x + \frac {24 - 32 x}{x^{2} - 2 x + 1} + 24 \log {\left (x - 1 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2/2 + 7*x + (24 - 32*x)/(x**2 - 2*x + 1) + 24*log(x - 1)

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 28, normalized size = 0.76 \begin {gather*} \frac {1}{2} \, x^{2} + 7 \, x - \frac {8 \, {\left (4 \, x - 3\right )}}{{\left (x - 1\right )}^{2}} + 24 \, \log \left ({\left | x - 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2 + 7*x - 8*(4*x - 3)/(x - 1)^2 + 24*log(abs(x - 1))

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 32, normalized size = 0.86 \begin {gather*} 7\,x+24\,\ln \left (x-1\right )-\frac {32\,x-24}{x^2-2\,x+1}+\frac {x^2}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

7*x + 24*log(x - 1) - (32*x - 24)/(x^2 - 2*x + 1) + x^2/2

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 22, normalized size = 0.59 \begin {gather*} \frac {3 \ln \left (x -1\right )}{2}-\frac {\ln \left (x^{2}+1\right )}{2}+\frac {\arctan \left (x \right )}{2}-\frac {x}{2} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

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

________________________________________________________________________________________