\(\int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx\) [4434]

   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 = 32, antiderivative size = 23 \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=\log \left (\frac {e^{-x} x^2}{1-(-20+2 x)^2}\right ) \]

[Out]

ln(x^2/(1-(2*x-20)^2)/exp(x))

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {1608, 1642} \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=-x-\log (19-2 x)-\log (21-2 x)+2 \log (x) \]

[In]

Int[(798 - 479*x + 80*x^2 - 4*x^3)/(399*x - 80*x^2 + 4*x^3),x]

[Out]

-x - Log[19 - 2*x] - Log[21 - 2*x] + 2*Log[x]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 1642

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {798-479 x+80 x^2-4 x^3}{x \left (399-80 x+4 x^2\right )} \, dx \\ & = \int \left (-1+\frac {2}{x}-\frac {2}{-21+2 x}-\frac {2}{-19+2 x}\right ) \, dx \\ & = -x-\log (19-2 x)-\log (21-2 x)+2 \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=-x+2 \log (x)-\log \left (399-80 x+4 x^2\right ) \]

[In]

Integrate[(798 - 479*x + 80*x^2 - 4*x^3)/(399*x - 80*x^2 + 4*x^3),x]

[Out]

-x + 2*Log[x] - Log[399 - 80*x + 4*x^2]

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91

method result size
parallelrisch \(-x +2 \ln \left (x \right )-\ln \left (x -\frac {21}{2}\right )-\ln \left (x -\frac {19}{2}\right )\) \(21\)
risch \(-x +2 \ln \left (x \right )-\ln \left (4 x^{2}-80 x +399\right )\) \(22\)
default \(-x +2 \ln \left (x \right )-\ln \left (2 x -19\right )-\ln \left (2 x -21\right )\) \(25\)
norman \(-x +2 \ln \left (x \right )-\ln \left (2 x -19\right )-\ln \left (2 x -21\right )\) \(25\)

[In]

int((-4*x^3+80*x^2-479*x+798)/(4*x^3-80*x^2+399*x),x,method=_RETURNVERBOSE)

[Out]

-x+2*ln(x)-ln(x-21/2)-ln(x-19/2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=-x - \log \left (4 \, x^{2} - 80 \, x + 399\right ) + 2 \, \log \left (x\right ) \]

[In]

integrate((-4*x^3+80*x^2-479*x+798)/(4*x^3-80*x^2+399*x),x, algorithm="fricas")

[Out]

-x - log(4*x^2 - 80*x + 399) + 2*log(x)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.74 \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=- x + 2 \log {\left (x \right )} - \log {\left (4 x^{2} - 80 x + 399 \right )} \]

[In]

integrate((-4*x**3+80*x**2-479*x+798)/(4*x**3-80*x**2+399*x),x)

[Out]

-x + 2*log(x) - log(4*x**2 - 80*x + 399)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04 \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=-x - \log \left (2 \, x - 19\right ) - \log \left (2 \, x - 21\right ) + 2 \, \log \left (x\right ) \]

[In]

integrate((-4*x^3+80*x^2-479*x+798)/(4*x^3-80*x^2+399*x),x, algorithm="maxima")

[Out]

-x - log(2*x - 19) - log(2*x - 21) + 2*log(x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.17 \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=-x - \log \left ({\left | 2 \, x - 19 \right |}\right ) - \log \left ({\left | 2 \, x - 21 \right |}\right ) + 2 \, \log \left ({\left | x \right |}\right ) \]

[In]

integrate((-4*x^3+80*x^2-479*x+798)/(4*x^3-80*x^2+399*x),x, algorithm="giac")

[Out]

-x - log(abs(2*x - 19)) - log(abs(2*x - 21)) + 2*log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.83 \[ \int \frac {798-479 x+80 x^2-4 x^3}{399 x-80 x^2+4 x^3} \, dx=2\,\ln \left (x\right )-\ln \left (x^2-20\,x+\frac {399}{4}\right )-x \]

[In]

int(-(479*x - 80*x^2 + 4*x^3 - 798)/(399*x - 80*x^2 + 4*x^3),x)

[Out]

2*log(x) - log(x^2 - 20*x + 399/4) - x