\(\int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx\) [3288]

   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 = 34, antiderivative size = 26 \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=\frac {25}{9 x}-x+x^2-\log \left ((1-x) x^2\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {1607, 1634} \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=x^2-x+\frac {25}{9 x}-\log (1-x)-2 \log (x) \]

[In]

Int[(25 - 7*x - 18*x^2 - 27*x^3 + 18*x^4)/(-9*x^2 + 9*x^3),x]

[Out]

25/(9*x) - x + x^2 - Log[1 - x] - 2*Log[x]

Rule 1607

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

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{x^2 (-9+9 x)} \, dx \\ & = \int \left (-1+\frac {1}{1-x}-\frac {25}{9 x^2}-\frac {2}{x}+2 x\right ) \, dx \\ & = \frac {25}{9 x}-x+x^2-\log (1-x)-2 \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.15 \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=\frac {1}{9} \left (\frac {25}{x}-9 x+9 x^2-9 \log (1-x)-18 \log (x)\right ) \]

[In]

Integrate[(25 - 7*x - 18*x^2 - 27*x^3 + 18*x^4)/(-9*x^2 + 9*x^3),x]

[Out]

(25/x - 9*x + 9*x^2 - 9*Log[1 - x] - 18*Log[x])/9

Maple [A] (verified)

Time = 1.63 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88

method result size
default \(x^{2}-x +\frac {25}{9 x}-2 \ln \left (x \right )-\ln \left (-1+x \right )\) \(23\)
risch \(x^{2}-x +\frac {25}{9 x}-2 \ln \left (x \right )-\ln \left (-1+x \right )\) \(23\)
norman \(\frac {\frac {25}{9}+x^{3}-x^{2}}{x}-2 \ln \left (x \right )-\ln \left (-1+x \right )\) \(26\)
parallelrisch \(-\frac {-9 x^{3}+18 x \ln \left (x \right )+9 \ln \left (-1+x \right ) x +9 x^{2}-25}{9 x}\) \(30\)
meijerg \(\frac {25}{9 x}-2 \ln \left (x \right )-2 i \pi -\ln \left (1-x \right )+\frac {x \left (6+3 x \right )}{3}-3 x\) \(34\)

[In]

int((18*x^4-27*x^3-18*x^2-7*x+25)/(9*x^3-9*x^2),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.12 \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=\frac {9 \, x^{3} - 9 \, x^{2} - 9 \, x \log \left (x - 1\right ) - 18 \, x \log \left (x\right ) + 25}{9 \, x} \]

[In]

integrate((18*x^4-27*x^3-18*x^2-7*x+25)/(9*x^3-9*x^2),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.73 \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=x^{2} - x - 2 \log {\left (x \right )} - \log {\left (x - 1 \right )} + \frac {25}{9 x} \]

[In]

integrate((18*x**4-27*x**3-18*x**2-7*x+25)/(9*x**3-9*x**2),x)

[Out]

x**2 - x - 2*log(x) - log(x - 1) + 25/(9*x)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=x^{2} - x + \frac {25}{9 \, x} - \log \left (x - 1\right ) - 2 \, \log \left (x\right ) \]

[In]

integrate((18*x^4-27*x^3-18*x^2-7*x+25)/(9*x^3-9*x^2),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=x^{2} - x + \frac {25}{9 \, x} - \log \left ({\left | x - 1 \right |}\right ) - 2 \, \log \left ({\left | x \right |}\right ) \]

[In]

integrate((18*x^4-27*x^3-18*x^2-7*x+25)/(9*x^3-9*x^2),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {25-7 x-18 x^2-27 x^3+18 x^4}{-9 x^2+9 x^3} \, dx=\frac {25}{9\,x}-\ln \left (x-1\right )-2\,\ln \left (x\right )-x+x^2 \]

[In]

int((7*x + 18*x^2 + 27*x^3 - 18*x^4 - 25)/(9*x^2 - 9*x^3),x)

[Out]

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