\(\int \frac {6-x}{-5+x} \, dx\) [502]

   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 = 14 \[ \int \frac {6-x}{-5+x} \, dx=-8+e^4-x+\log (2)+\log (-5+x) \]

[Out]

-8-x+ln(2)+exp(4)+ln(-5+x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 10, 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 {6-x}{-5+x} \, dx=\log (5-x)-x \]

[In]

Int[(6 - x)/(-5 + x),x]

[Out]

-x + Log[5 - 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 {1}{-5+x}\right ) \, dx \\ & = -x+\log (5-x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.57 \[ \int \frac {6-x}{-5+x} \, dx=-x+\log (-5+x) \]

[In]

Integrate[(6 - x)/(-5 + x),x]

[Out]

-x + Log[-5 + x]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.64

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

[In]

int((-x+6)/(-5+x),x,method=_RETURNVERBOSE)

[Out]

-x+ln(-5+x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.57 \[ \int \frac {6-x}{-5+x} \, dx=-x + \log \left (x - 5\right ) \]

[In]

integrate((-x+6)/(-5+x),x, algorithm="fricas")

[Out]

-x + log(x - 5)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 5, normalized size of antiderivative = 0.36 \[ \int \frac {6-x}{-5+x} \, dx=- x + \log {\left (x - 5 \right )} \]

[In]

integrate((-x+6)/(-5+x),x)

[Out]

-x + log(x - 5)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.57 \[ \int \frac {6-x}{-5+x} \, dx=-x + \log \left (x - 5\right ) \]

[In]

integrate((-x+6)/(-5+x),x, algorithm="maxima")

[Out]

-x + log(x - 5)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.64 \[ \int \frac {6-x}{-5+x} \, dx=-x + \log \left ({\left | x - 5 \right |}\right ) \]

[In]

integrate((-x+6)/(-5+x),x, algorithm="giac")

[Out]

-x + log(abs(x - 5))

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.57 \[ \int \frac {6-x}{-5+x} \, dx=\ln \left (x-5\right )-x \]

[In]

int(-(x - 6)/(x - 5),x)

[Out]

log(x - 5) - x