3.82.77 \(\int \frac {6-7 x+x^2+(10-12 x+2 x^2) \log (x)}{-5+x} \, dx\)

Optimal. Leaf size=20 \[ 5-2 \log \left ((-5+x)^2\right )+\left (-2 x+x^2\right ) \log (x) \]

________________________________________________________________________________________

Rubi [B]  time = 0.15, antiderivative size = 43, normalized size of antiderivative = 2.15, number of steps used = 7, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {6741, 6742, 698, 2313, 9} \begin {gather*} \frac {x^2}{2}-\left (2 x-x^2\right ) \log (x)-\frac {1}{2} (2-x)^2-2 x-4 \log (5-x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(6 - 7*x + x^2 + (10 - 12*x + 2*x^2)*Log[x])/(-5 + x),x]

[Out]

-1/2*(2 - x)^2 - 2*x + x^2/2 - 4*Log[5 - x] - (2*x - x^2)*Log[x]

Rule 9

Int[(a_)*((b_) + (c_.)*(x_)), x_Symbol] :> Simp[(a*(b + c*x)^2)/(2*c), x] /; FreeQ[{a, b, c}, x]

Rule 698

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rule 2313

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(d +
 e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a,
b, c, d, e, n, r}, x] && IGtQ[q, 0]

Rule 6741

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

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 \frac {(1-x) (-6+x-10 \log (x)+2 x \log (x))}{5-x} \, dx\\ &=\int \left (\frac {6-7 x+x^2}{-5+x}+2 (-1+x) \log (x)\right ) \, dx\\ &=2 \int (-1+x) \log (x) \, dx+\int \frac {6-7 x+x^2}{-5+x} \, dx\\ &=-\left (\left (2 x-x^2\right ) \log (x)\right )-2 \int \frac {1}{2} (-2+x) \, dx+\int \left (-2-\frac {4}{-5+x}+x\right ) \, dx\\ &=-\frac {1}{2} (2-x)^2-2 x+\frac {x^2}{2}-4 \log (5-x)-\left (2 x-x^2\right ) \log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 20, normalized size = 1.00 \begin {gather*} -4 \log (5-x)-2 x \log (x)+x^2 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(6 - 7*x + x^2 + (10 - 12*x + 2*x^2)*Log[x])/(-5 + x),x]

[Out]

-4*Log[5 - x] - 2*x*Log[x] + x^2*Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 17, normalized size = 0.85 \begin {gather*} {\left (x^{2} - 2 \, x\right )} \log \relax (x) - 4 \, \log \left (x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-12*x+10)*log(x)+x^2-7*x+6)/(x-5),x, algorithm="fricas")

[Out]

(x^2 - 2*x)*log(x) - 4*log(x - 5)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 17, normalized size = 0.85 \begin {gather*} {\left (x^{2} - 2 \, x\right )} \log \relax (x) - 4 \, \log \left (x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-12*x+10)*log(x)+x^2-7*x+6)/(x-5),x, algorithm="giac")

[Out]

(x^2 - 2*x)*log(x) - 4*log(x - 5)

________________________________________________________________________________________

maple [A]  time = 0.33, size = 18, normalized size = 0.90




method result size



risch \(\left (x^{2}-2 x \right ) \ln \relax (x )-4 \ln \left (x -5\right )\) \(18\)
default \(x^{2} \ln \relax (x )-2 x \ln \relax (x )-4 \ln \left (x -5\right )\) \(19\)
norman \(x^{2} \ln \relax (x )-2 x \ln \relax (x )-4 \ln \left (x -5\right )\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^2-12*x+10)*ln(x)+x^2-7*x+6)/(x-5),x,method=_RETURNVERBOSE)

[Out]

(x^2-2*x)*ln(x)-4*ln(x-5)

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 17, normalized size = 0.85 \begin {gather*} {\left (x^{2} - 2 \, x\right )} \log \relax (x) - 4 \, \log \left (x - 5\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-12*x+10)*log(x)+x^2-7*x+6)/(x-5),x, algorithm="maxima")

[Out]

(x^2 - 2*x)*log(x) - 4*log(x - 5)

________________________________________________________________________________________

mupad [B]  time = 5.17, size = 18, normalized size = 0.90 \begin {gather*} x^2\,\ln \relax (x)-4\,\ln \left (x-5\right )-2\,x\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(x)*(2*x^2 - 12*x + 10) - 7*x + x^2 + 6)/(x - 5),x)

[Out]

x^2*log(x) - 4*log(x - 5) - 2*x*log(x)

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 15, normalized size = 0.75 \begin {gather*} \left (x^{2} - 2 x\right ) \log {\relax (x )} - 4 \log {\left (x - 5 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**2-12*x+10)*ln(x)+x**2-7*x+6)/(x-5),x)

[Out]

(x**2 - 2*x)*log(x) - 4*log(x - 5)

________________________________________________________________________________________