\(\int \frac {-1-x}{-2+x} \, dx\) [9023]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 17 \[ \int \frac {-1-x}{-2+x} \, dx=-4-x+3 (-2-\log (2-x)) \]

[Out]

-10-3*ln(2-x)-x

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.71, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {45} \[ \int \frac {-1-x}{-2+x} \, dx=-x-3 \log (2-x) \]

[In]

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

[Out]

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.71 \[ \int \frac {-1-x}{-2+x} \, dx=-x-3 \log (2-x) \]

[In]

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

[Out]

-x - 3*Log[2 - x]

Maple [A] (verified)

Time = 0.42 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.65

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

[In]

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

[Out]

-x-3*ln(-2+x)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.59 \[ \int \frac {-1-x}{-2+x} \, dx=-x - 3 \, \log \left (x - 2\right ) \]

[In]

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

[Out]

-x - 3*log(x - 2)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.47 \[ \int \frac {-1-x}{-2+x} \, dx=- x - 3 \log {\left (x - 2 \right )} \]

[In]

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

[Out]

-x - 3*log(x - 2)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.59 \[ \int \frac {-1-x}{-2+x} \, dx=-x - 3 \, \log \left (x - 2\right ) \]

[In]

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

[Out]

-x - 3*log(x - 2)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.65 \[ \int \frac {-1-x}{-2+x} \, dx=-x - 3 \, \log \left ({\left | x - 2 \right |}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.59 \[ \int \frac {-1-x}{-2+x} \, dx=-x-3\,\ln \left (x-2\right ) \]

[In]

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

[Out]

- x - 3*log(x - 2)