3.48.22 \(\int \frac {20+5 x-2 x^2+(5-x) \log (5-x)}{-10+2 x} \, dx\)

Optimal. Leaf size=23 \[ 4+\frac {1}{2} (-6-x-x (3+x+\log (5-x))) \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 36, normalized size of antiderivative = 1.57, number of steps used = 6, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {6742, 698, 2389, 2295} \begin {gather*} -\frac {x^2}{2}-2 x+\frac {1}{2} (5-x) \log (5-x)-\frac {5}{2} \log (5-x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 22, normalized size = 0.96 \begin {gather*} \frac {1}{2} \left (-4 x-x^2-x \log (5-x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 18, normalized size = 0.78 \begin {gather*} -\frac {1}{2} \, x^{2} - \frac {1}{2} \, x \log \left (-x + 5\right ) - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*x^2 - 1/2*x*log(-x + 5) - 2*x

________________________________________________________________________________________

giac [A]  time = 0.21, size = 18, normalized size = 0.78 \begin {gather*} -\frac {1}{2} \, x^{2} - \frac {1}{2} \, x \log \left (-x + 5\right ) - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*x^2 - 1/2*x*log(-x + 5) - 2*x

________________________________________________________________________________________

maple [A]  time = 0.08, size = 19, normalized size = 0.83




method result size



norman \(-2 x -\frac {x^{2}}{2}-\frac {\ln \left (5-x \right ) x}{2}\) \(19\)
risch \(-2 x -\frac {x^{2}}{2}-\frac {\ln \left (5-x \right ) x}{2}\) \(19\)
derivativedivides \(\frac {\left (5-x \right ) \ln \left (5-x \right )}{2}+35-7 x -\frac {\left (5-x \right )^{2}}{2}-\frac {5 \ln \left (5-x \right )}{2}\) \(36\)
default \(\frac {\left (5-x \right ) \ln \left (5-x \right )}{2}+35-7 x -\frac {\left (5-x \right )^{2}}{2}-\frac {5 \ln \left (5-x \right )}{2}\) \(36\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*x-1/2*x^2-1/2*ln(5-x)*x

________________________________________________________________________________________

maxima [B]  time = 0.37, size = 43, normalized size = 1.87 \begin {gather*} -\frac {1}{2} \, x^{2} + \frac {5}{4} \, \log \left (x - 5\right )^{2} - \frac {1}{2} \, {\left (x + 5 \, \log \left (x - 5\right )\right )} \log \left (-x + 5\right ) + \frac {5}{4} \, \log \left (-x + 5\right )^{2} - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*x^2 + 5/4*log(x - 5)^2 - 1/2*(x + 5*log(x - 5))*log(-x + 5) + 5/4*log(-x + 5)^2 - 2*x

________________________________________________________________________________________

mupad [B]  time = 3.63, size = 12, normalized size = 0.52 \begin {gather*} -\frac {x\,\left (x+\ln \left (5-x\right )+4\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x - 2*x^2 - log(5 - x)*(x - 5) + 20)/(2*x - 10),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 17, normalized size = 0.74 \begin {gather*} - \frac {x^{2}}{2} - \frac {x \log {\left (5 - x \right )}}{2} - 2 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5-x)*ln(5-x)-2*x**2+5*x+20)/(2*x-10),x)

[Out]

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

________________________________________________________________________________________