\(\int \frac {-90+84 x-27 x^2+4 x^3+(-144+72 x-12 x^2) \log (12-6 x+x^2)}{-36 x+18 x^2-3 x^3+(108-54 x+9 x^2) \log (12-6 x+x^2)} \, dx\) [4112]

   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 = 72, antiderivative size = 20 \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=-255-\frac {4 x}{3}+\log \left (x-3 \log \left (3+(-3+x)^2\right )\right ) \]

[Out]

ln(x-3*ln((-3+x)^2+3))-255-4/3*x

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {6873, 12, 6860, 6816} \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=\log \left (x-3 \log \left (x^2-6 x+12\right )\right )-\frac {4 x}{3} \]

[In]

Int[(-90 + 84*x - 27*x^2 + 4*x^3 + (-144 + 72*x - 12*x^2)*Log[12 - 6*x + x^2])/(-36*x + 18*x^2 - 3*x^3 + (108
- 54*x + 9*x^2)*Log[12 - 6*x + x^2]),x]

[Out]

(-4*x)/3 + Log[x - 3*Log[12 - 6*x + x^2]]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 6816

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rule 6860

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rule 6873

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rubi steps \begin{align*} \text {integral}& = \int \frac {90-84 x+27 x^2-4 x^3-\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{3 \left (12-6 x+x^2\right ) \left (x-3 \log \left (12-6 x+x^2\right )\right )} \, dx \\ & = \frac {1}{3} \int \frac {90-84 x+27 x^2-4 x^3-\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{\left (12-6 x+x^2\right ) \left (x-3 \log \left (12-6 x+x^2\right )\right )} \, dx \\ & = \frac {1}{3} \int \left (-4+\frac {3 \left (30-12 x+x^2\right )}{\left (12-6 x+x^2\right ) \left (x-3 \log \left (12-6 x+x^2\right )\right )}\right ) \, dx \\ & = -\frac {4 x}{3}+\int \frac {30-12 x+x^2}{\left (12-6 x+x^2\right ) \left (x-3 \log \left (12-6 x+x^2\right )\right )} \, dx \\ & = -\frac {4 x}{3}+\log \left (x-3 \log \left (12-6 x+x^2\right )\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.51 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20 \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=\frac {1}{3} \left (-4 x+3 \log \left (x-3 \log \left (12-6 x+x^2\right )\right )\right ) \]

[In]

Integrate[(-90 + 84*x - 27*x^2 + 4*x^3 + (-144 + 72*x - 12*x^2)*Log[12 - 6*x + x^2])/(-36*x + 18*x^2 - 3*x^3 +
 (108 - 54*x + 9*x^2)*Log[12 - 6*x + x^2]),x]

[Out]

(-4*x + 3*Log[x - 3*Log[12 - 6*x + x^2]])/3

Maple [A] (verified)

Time = 2.45 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95

method result size
norman \(-\frac {4 x}{3}+\ln \left (x -3 \ln \left (x^{2}-6 x +12\right )\right )\) \(19\)
risch \(-\frac {4 x}{3}+\ln \left (\ln \left (x^{2}-6 x +12\right )-\frac {x}{3}\right )\) \(19\)
parallelrisch \(\ln \left (x -3 \ln \left (x^{2}-6 x +12\right )\right )-\frac {4 x}{3}-16\) \(20\)

[In]

int(((-12*x^2+72*x-144)*ln(x^2-6*x+12)+4*x^3-27*x^2+84*x-90)/((9*x^2-54*x+108)*ln(x^2-6*x+12)-3*x^3+18*x^2-36*
x),x,method=_RETURNVERBOSE)

[Out]

-4/3*x+ln(x-3*ln(x^2-6*x+12))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=-\frac {4}{3} \, x + \log \left (-x + 3 \, \log \left (x^{2} - 6 \, x + 12\right )\right ) \]

[In]

integrate(((-12*x^2+72*x-144)*log(x^2-6*x+12)+4*x^3-27*x^2+84*x-90)/((9*x^2-54*x+108)*log(x^2-6*x+12)-3*x^3+18
*x^2-36*x),x, algorithm="fricas")

[Out]

-4/3*x + log(-x + 3*log(x^2 - 6*x + 12))

Sympy [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=- \frac {4 x}{3} + \log {\left (- \frac {x}{3} + \log {\left (x^{2} - 6 x + 12 \right )} \right )} \]

[In]

integrate(((-12*x**2+72*x-144)*ln(x**2-6*x+12)+4*x**3-27*x**2+84*x-90)/((9*x**2-54*x+108)*ln(x**2-6*x+12)-3*x*
*3+18*x**2-36*x),x)

[Out]

-4*x/3 + log(-x/3 + log(x**2 - 6*x + 12))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=-\frac {4}{3} \, x + \log \left (-\frac {1}{3} \, x + \log \left (x^{2} - 6 \, x + 12\right )\right ) \]

[In]

integrate(((-12*x^2+72*x-144)*log(x^2-6*x+12)+4*x^3-27*x^2+84*x-90)/((9*x^2-54*x+108)*log(x^2-6*x+12)-3*x^3+18
*x^2-36*x),x, algorithm="maxima")

[Out]

-4/3*x + log(-1/3*x + log(x^2 - 6*x + 12))

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=-\frac {4}{3} \, x + \log \left (x - 3 \, \log \left (x^{2} - 6 \, x + 12\right )\right ) \]

[In]

integrate(((-12*x^2+72*x-144)*log(x^2-6*x+12)+4*x^3-27*x^2+84*x-90)/((9*x^2-54*x+108)*log(x^2-6*x+12)-3*x^3+18
*x^2-36*x),x, algorithm="giac")

[Out]

-4/3*x + log(x - 3*log(x^2 - 6*x + 12))

Mupad [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {-90+84 x-27 x^2+4 x^3+\left (-144+72 x-12 x^2\right ) \log \left (12-6 x+x^2\right )}{-36 x+18 x^2-3 x^3+\left (108-54 x+9 x^2\right ) \log \left (12-6 x+x^2\right )} \, dx=\ln \left (\ln \left (x^2-6\,x+12\right )-\frac {x}{3}\right )-\frac {4\,x}{3} \]

[In]

int((log(x^2 - 6*x + 12)*(12*x^2 - 72*x + 144) - 84*x + 27*x^2 - 4*x^3 + 90)/(36*x - log(x^2 - 6*x + 12)*(9*x^
2 - 54*x + 108) - 18*x^2 + 3*x^3),x)

[Out]

log(log(x^2 - 6*x + 12) - x/3) - (4*x)/3