\(\int \frac {36+54 x-9 x^2+(18 x-3 x^2) \log (4)}{9-6 x+x^2} \, dx\) [4798]

   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 = 33, antiderivative size = 21 \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=\frac {3 x^2 \left (-3-\frac {4}{x}-\log (4)\right )}{-3+x} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, 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.061, Rules used = {27, 1864} \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=\frac {9 (13+\log (64))}{3-x}-3 x (3+\log (4)) \]

[In]

Int[(36 + 54*x - 9*x^2 + (18*x - 3*x^2)*Log[4])/(9 - 6*x + x^2),x]

[Out]

-3*x*(3 + Log[4]) + (9*(13 + Log[64]))/(3 - x)

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1864

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps \begin{align*} \text {integral}& = \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{(-3+x)^2} \, dx \\ & = \int \left (-3 (3+\log (4))+\frac {9 (13+\log (64))}{(-3+x)^2}\right ) \, dx \\ & = -3 x (3+\log (4))+\frac {9 (13+\log (64))}{3-x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33 \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=-\frac {3 \left (66+18 \log (4)-6 x (3+\log (4))+x^2 (3+\log (4))\right )}{-3+x} \]

[In]

Integrate[(36 + 54*x - 9*x^2 + (18*x - 3*x^2)*Log[4])/(9 - 6*x + x^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90

method result size
norman \(\frac {\left (-6 \ln \left (2\right )-9\right ) x^{2}-36}{-3+x}\) \(19\)
gosper \(-\frac {3 \left (2 x^{2} \ln \left (2\right )+3 x^{2}+12\right )}{-3+x}\) \(22\)
parallelrisch \(-\frac {6 x^{2} \ln \left (2\right )+9 x^{2}+36}{-3+x}\) \(22\)
default \(-6 x \ln \left (2\right )-9 x -\frac {3 \left (18 \ln \left (2\right )+39\right )}{-3+x}\) \(23\)
risch \(-6 x \ln \left (2\right )-9 x -\frac {117}{-3+x}-\frac {54 \ln \left (2\right )}{-3+x}\) \(26\)
meijerg \(\frac {4 x}{1-\frac {x}{3}}-3 \left (-6 \ln \left (2\right )-9\right ) \left (-\frac {x \left (-x +6\right )}{9 \left (1-\frac {x}{3}\right )}-2 \ln \left (1-\frac {x}{3}\right )\right )-3 \left (-12 \ln \left (2\right )-18\right ) \left (\frac {x}{-x +3}+\ln \left (1-\frac {x}{3}\right )\right )\) \(69\)

[In]

int((2*(-3*x^2+18*x)*ln(2)-9*x^2+54*x+36)/(x^2-6*x+9),x,method=_RETURNVERBOSE)

[Out]

((-6*ln(2)-9)*x^2-36)/(-3+x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.38 \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=-\frac {3 \, {\left (3 \, x^{2} + 2 \, {\left (x^{2} - 3 \, x + 9\right )} \log \left (2\right ) - 9 \, x + 39\right )}}{x - 3} \]

[In]

integrate((2*(-3*x^2+18*x)*log(2)-9*x^2+54*x+36)/(x^2-6*x+9),x, algorithm="fricas")

[Out]

-3*(3*x^2 + 2*(x^2 - 3*x + 9)*log(2) - 9*x + 39)/(x - 3)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=- x \left (6 \log {\left (2 \right )} + 9\right ) - \frac {54 \log {\left (2 \right )} + 117}{x - 3} \]

[In]

integrate((2*(-3*x**2+18*x)*ln(2)-9*x**2+54*x+36)/(x**2-6*x+9),x)

[Out]

-x*(6*log(2) + 9) - (54*log(2) + 117)/(x - 3)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.10 \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=-3 \, x {\left (2 \, \log \left (2\right ) + 3\right )} - \frac {9 \, {\left (6 \, \log \left (2\right ) + 13\right )}}{x - 3} \]

[In]

integrate((2*(-3*x^2+18*x)*log(2)-9*x^2+54*x+36)/(x^2-6*x+9),x, algorithm="maxima")

[Out]

-3*x*(2*log(2) + 3) - 9*(6*log(2) + 13)/(x - 3)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.05 \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=-6 \, x \log \left (2\right ) - 9 \, x - \frac {9 \, {\left (6 \, \log \left (2\right ) + 13\right )}}{x - 3} \]

[In]

integrate((2*(-3*x^2+18*x)*log(2)-9*x^2+54*x+36)/(x^2-6*x+9),x, algorithm="giac")

[Out]

-6*x*log(2) - 9*x - 9*(6*log(2) + 13)/(x - 3)

Mupad [B] (verification not implemented)

Time = 10.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.00 \[ \int \frac {36+54 x-9 x^2+\left (18 x-3 x^2\right ) \log (4)}{9-6 x+x^2} \, dx=-x\,\left (\ln \left (64\right )+9\right )-\frac {54\,\ln \left (2\right )+117}{x-3} \]

[In]

int((54*x + 2*log(2)*(18*x - 3*x^2) - 9*x^2 + 36)/(x^2 - 6*x + 9),x)

[Out]

- x*(log(64) + 9) - (54*log(2) + 117)/(x - 3)