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

Optimal. Leaf size=29 \[ e^3-i \pi -x^2-\log (5)+x (-2+x+\log (3-x)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 25, normalized size of antiderivative = 0.86, 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 (3-x)+3 \log (3-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-2*x + 3*Log[3 - x] - (3 - x)*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 {6-x}{-3+x}+\log (3-x)\right ) \, dx\\ &=\int \frac {6-x}{-3+x} \, dx+\int \log (3-x) \, dx\\ &=\int \left (-1+\frac {3}{-3+x}\right ) \, dx-\operatorname {Subst}(\int \log (x) \, dx,x,3-x)\\ &=-2 x+3 \log (3-x)-(3-x) \log (3-x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.46, size = 13, normalized size = 0.45




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.76, size = 37, normalized size = 1.28 \begin {gather*} -\frac {3}{2} \, \log \left (x - 3\right )^{2} + {\left (x + 3 \, \log \left (x - 3\right )\right )} \log \left (-x + 3\right ) - \frac {3}{2} \, \log \left (-x + 3\right )^{2} - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 8, normalized size = 0.28 \begin {gather*} x \log {\left (3 - x \right )} - 2 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________