3.59.89 \(\int \frac {-6+3 x+(-3+x) \log (9-3 x)}{-3+x} \, dx\)

Optimal. Leaf size=21 \[ -2+2 x-\log ^2(4)+x \log (3 (3-x)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 25, normalized size of antiderivative = 1.19, number of steps used = 6, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {6742, 43, 2389, 2295} \begin {gather*} 2 x-(3-x) \log (9-3 x)+3 \log (3-x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-6 + 3*x + (-3 + x)*Log[9 - 3*x])/(-3 + x),x]

[Out]

2*x - (3 - x)*Log[9 - 3*x] + 3*Log[3 - x]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {3 (-2+x)}{-3+x}+\log (9-3 x)\right ) \, dx\\ &=3 \int \frac {-2+x}{-3+x} \, dx+\int \log (9-3 x) \, dx\\ &=-\left (\frac {1}{3} \operatorname {Subst}(\int \log (x) \, dx,x,9-3 x)\right )+3 \int \left (1+\frac {1}{-3+x}\right ) \, dx\\ &=2 x-(3-x) \log (9-3 x)+3 \log (3-x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 19, normalized size = 0.90 \begin {gather*} x (2+\log (3))-\log (27)+x \log (3-x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-6 + 3*x + (-3 + x)*Log[9 - 3*x])/(-3 + x),x]

[Out]

x*(2 + Log[3]) - Log[27] + x*Log[3 - x]

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 12, normalized size = 0.57 \begin {gather*} x \log \left (-3 \, x + 9\right ) + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-3)*log(-3*x+9)+3*x-6)/(x-3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 12, normalized size = 0.57 \begin {gather*} x \log \left (-3 \, x + 9\right ) + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-3)*log(-3*x+9)+3*x-6)/(x-3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.29, size = 13, normalized size = 0.62




method result size



norman \(\ln \left (-3 x +9\right ) x +2 x\) \(13\)
risch \(\ln \left (-3 x +9\right ) x +2 x\) \(13\)
derivativedivides \(-\frac {\left (-3 x +9\right ) \ln \left (-3 x +9\right )}{3}+2 x -6+3 \ln \left (-3 x +9\right )\) \(27\)
default \(-\frac {\left (-3 x +9\right ) \ln \left (-3 x +9\right )}{3}+2 x -6+3 \ln \left (-3 x +9\right )\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x-3)*ln(-3*x+9)+3*x-6)/(x-3),x,method=_RETURNVERBOSE)

[Out]

ln(-3*x+9)*x+2*x

________________________________________________________________________________________

maxima [C]  time = 0.46, size = 41, normalized size = 1.95 \begin {gather*} 3 \, {\left (-i \, \pi - \log \relax (3)\right )} \log \left (x - 3\right ) - 3 \, \log \left (x - 3\right )^{2} + {\left (x + 3 \, \log \left (x - 3\right )\right )} \log \left (-3 \, x + 9\right ) + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-3)*log(-3*x+9)+3*x-6)/(x-3),x, algorithm="maxima")

[Out]

3*(-I*pi - log(3))*log(x - 3) - 3*log(x - 3)^2 + (x + 3*log(x - 3))*log(-3*x + 9) + 2*x

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 10, normalized size = 0.48 \begin {gather*} x\,\left (\ln \left (9-3\,x\right )+2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x + log(9 - 3*x)*(x - 3) - 6)/(x - 3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 10, normalized size = 0.48 \begin {gather*} x \log {\left (9 - 3 x \right )} + 2 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-3)*ln(-3*x+9)+3*x-6)/(x-3),x)

[Out]

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

________________________________________________________________________________________