3.99.82 \(\int \frac {18+18 x-15 x^2+2 x^3}{18 x-13 x^2+2 x^3} \, dx\)

Optimal. Leaf size=24 \[ -4+x+\log \left (\frac {x}{3 (-3+(5-x) (-3+2 x))}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 20, normalized size of antiderivative = 0.83, number of steps used = 3, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {1594, 1628} \begin {gather*} x-\log (9-2 x)-\log (2-x)+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(18 + 18*x - 15*x^2 + 2*x^3)/(18*x - 13*x^2 + 2*x^3),x]

[Out]

x - Log[9 - 2*x] - Log[2 - x] + Log[x]

Rule 1594

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 1628

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 17, normalized size = 0.71 \begin {gather*} x+\log (x)-\log \left (18-13 x+2 x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(18 + 18*x - 15*x^2 + 2*x^3)/(18*x - 13*x^2 + 2*x^3),x]

[Out]

x + Log[x] - Log[18 - 13*x + 2*x^2]

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 17, normalized size = 0.71 \begin {gather*} x - \log \left (2 \, x^{2} - 13 \, x + 18\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^3-15*x^2+18*x+18)/(2*x^3-13*x^2+18*x),x, algorithm="fricas")

[Out]

x - log(2*x^2 - 13*x + 18) + log(x)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 21, normalized size = 0.88 \begin {gather*} x - \log \left ({\left | 2 \, x - 9 \right |}\right ) - \log \left ({\left | x - 2 \right |}\right ) + \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^3-15*x^2+18*x+18)/(2*x^3-13*x^2+18*x),x, algorithm="giac")

[Out]

x - log(abs(2*x - 9)) - log(abs(x - 2)) + log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.03, size = 18, normalized size = 0.75




method result size



risch \(x +\ln \relax (x )-\ln \left (2 x^{2}-13 x +18\right )\) \(18\)
default \(x -\ln \left (2 x -9\right )+\ln \relax (x )-\ln \left (x -2\right )\) \(19\)
norman \(x -\ln \left (2 x -9\right )+\ln \relax (x )-\ln \left (x -2\right )\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^3-15*x^2+18*x+18)/(2*x^3-13*x^2+18*x),x,method=_RETURNVERBOSE)

[Out]

x+ln(x)-ln(2*x^2-13*x+18)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 18, normalized size = 0.75 \begin {gather*} x - \log \left (2 \, x - 9\right ) - \log \left (x - 2\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^3-15*x^2+18*x+18)/(2*x^3-13*x^2+18*x),x, algorithm="maxima")

[Out]

x - log(2*x - 9) - log(x - 2) + log(x)

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 15, normalized size = 0.62 \begin {gather*} x-\ln \left (x^2-\frac {13\,x}{2}+9\right )+\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((18*x - 15*x^2 + 2*x^3 + 18)/(18*x - 13*x^2 + 2*x^3),x)

[Out]

x - log(x^2 - (13*x)/2 + 9) + log(x)

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 15, normalized size = 0.62 \begin {gather*} x + \log {\relax (x )} - \log {\left (2 x^{2} - 13 x + 18 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**3-15*x**2+18*x+18)/(2*x**3-13*x**2+18*x),x)

[Out]

x + log(x) - log(2*x**2 - 13*x + 18)

________________________________________________________________________________________