3.91.23 \(\int \frac {-1-x}{-2+x} \, dx\)

Optimal. Leaf size=17 \[ -4-x+3 (-2-\log (2-x)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 12, normalized size of antiderivative = 0.71, 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 = {43} \begin {gather*} -x-3 \log (2-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x - 3*Log[2 - x]

Rule 43

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 {gather*} \begin {aligned} \text {integral} &=\int \left (-1-\frac {3}{-2+x}\right ) \, dx\\ &=-x-3 \log (2-x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 12, normalized size = 0.71 \begin {gather*} -x-3 \log (2-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-x - 3*Log[2 - x]

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 10, normalized size = 0.59 \begin {gather*} -x - 3 \, \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - 3*log(x - 2)

________________________________________________________________________________________

giac [A]  time = 0.21, size = 11, normalized size = 0.65 \begin {gather*} -x - 3 \, \log \left ({\left | x - 2 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - 3*log(abs(x - 2))

________________________________________________________________________________________

maple [A]  time = 0.48, size = 11, normalized size = 0.65




method result size



default \(-x -3 \ln \left (x -2\right )\) \(11\)
norman \(-x -3 \ln \left (x -2\right )\) \(11\)
risch \(-x -3 \ln \left (x -2\right )\) \(11\)
meijerg \(-3 \ln \left (1-\frac {x}{2}\right )-x\) \(13\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x-3*ln(x-2)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 10, normalized size = 0.59 \begin {gather*} -x - 3 \, \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x - 3*log(x - 2)

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 10, normalized size = 0.59 \begin {gather*} -x-3\,\ln \left (x-2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

- x - 3*log(x - 2)

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 8, normalized size = 0.47 \begin {gather*} - x - 3 \log {\left (x - 2 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x-1)/(x-2),x)

[Out]

-x - 3*log(x - 2)

________________________________________________________________________________________