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

Optimal. Leaf size=22 \[ \frac {x^3}{3}+x^2+4 x+9 \log (2-x) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 22, 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 = {1850} \[ \frac {x^3}{3}+x^2+4 x+9 \log (2-x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1850

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 23, normalized size = 1.05 \[ \frac {x^3}{3}+x^2+4 x+9 \log (x-2)-\frac {44}{3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-44/3 + 4*x + x^2 + x^3/3 + 9*Log[-2 + x]

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 18, normalized size = 0.82 \[ \frac {1}{3} \, x^{3} + x^{2} + 4 \, x + 9 \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.28, size = 19, normalized size = 0.86 \[ \frac {1}{3} \, x^{3} + x^{2} + 4 \, x + 9 \, \log \left ({\left | x - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 19, normalized size = 0.86 \[ \frac {x^{3}}{3}+x^{2}+4 x +9 \ln \left (x -2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.13, size = 18, normalized size = 0.82 \[ \frac {1}{3} \, x^{3} + x^{2} + 4 \, x + 9 \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 18, normalized size = 0.82 \[ 4\,x+9\,\ln \left (x-2\right )+x^2+\frac {x^3}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 17, normalized size = 0.77 \[ \frac {x^{3}}{3} + x^{2} + 4 x + 9 \log {\left (x - 2 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________