3.32.52 \(\int \frac {-48-9 x+2 x^2+(80-10 x) \log (x)+(40-5 x) \log ^2(x)+(-8+x) \log (\frac {1}{4} (-8 x+x^2))}{-8+x} \, dx\)

Optimal. Leaf size=21 \[ x \left (5+x-5 \log ^2(x)+\log \left (\left (-2+\frac {x}{4}\right ) x\right )\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.19, antiderivative size = 44, normalized size of antiderivative = 2.10, number of steps used = 12, number of rules used = 7, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.140, Rules used = {6742, 698, 2295, 2296, 2487, 29, 8} \begin {gather*} x^2+5 x-5 x \log ^2(x)+8 \log (8-x)+8 \log (x)-(8-x) \log \left (-\frac {1}{4} (8-x) x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-48 - 9*x + 2*x^2 + (80 - 10*x)*Log[x] + (40 - 5*x)*Log[x]^2 + (-8 + x)*Log[(-8*x + x^2)/4])/(-8 + x),x]

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], 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 2295

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

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2487

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]^(s_.), x_Symbol] :> Simp[((
a + b*x)*Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^s)/b, x] + (Dist[(q*r*s*(b*c - a*d))/b, Int[Log[e*(f*(a + b*x)^p
*(c + d*x)^q)^r]^(s - 1)/(c + d*x), x], x] - Dist[r*s*(p + q), Int[Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r]^(s - 1
), x], x]) /; FreeQ[{a, b, c, d, e, f, p, q, r, s}, x] && NeQ[b*c - a*d, 0] && NeQ[p + q, 0] && IGtQ[s, 0] &&
LtQ[s, 4]

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 25, normalized size = 1.19 \begin {gather*} 5 x+x^2-5 x \log ^2(x)+x \log \left (\frac {1}{4} (-8+x) x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-48 - 9*x + 2*x^2 + (80 - 10*x)*Log[x] + (40 - 5*x)*Log[x]^2 + (-8 + x)*Log[(-8*x + x^2)/4])/(-8 +
x),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 26, normalized size = 1.24 \begin {gather*} -5 \, x \log \relax (x)^{2} + x^{2} + x \log \left (\frac {1}{4} \, x^{2} - 2 \, x\right ) + 5 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8+x)*log(1/4*x^2-2*x)+(-5*x+40)*log(x)^2+(-10*x+80)*log(x)+2*x^2-9*x-48)/(-8+x),x, algorithm="fri
cas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.29, size = 30, normalized size = 1.43 \begin {gather*} -5 \, x \log \relax (x)^{2} + x^{2} - x {\left (2 \, \log \relax (2) - 5\right )} + x \log \left (x - 8\right ) + x \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8+x)*log(1/4*x^2-2*x)+(-5*x+40)*log(x)^2+(-10*x+80)*log(x)+2*x^2-9*x-48)/(-8+x),x, algorithm="gia
c")

[Out]

-5*x*log(x)^2 + x^2 - x*(2*log(2) - 5) + x*log(x - 8) + x*log(x)

________________________________________________________________________________________

maple [A]  time = 0.55, size = 30, normalized size = 1.43




method result size



default \(x^{2}+5 x -5 x \ln \relax (x )^{2}-2 x \ln \relax (2)+x \ln \left (x^{2}-8 x \right )\) \(30\)
risch \(x \ln \left (-8+x \right )-5 x \ln \relax (x )^{2}+x \ln \relax (x )-\frac {i x \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i \left (-8+x \right )\right ) \mathrm {csgn}\left (i x \left (-8+x \right )\right )}{2}+\frac {i x \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x \left (-8+x \right )\right )^{2}}{2}+\frac {i x \pi \,\mathrm {csgn}\left (i \left (-8+x \right )\right ) \mathrm {csgn}\left (i x \left (-8+x \right )\right )^{2}}{2}-\frac {i x \pi \mathrm {csgn}\left (i x \left (-8+x \right )\right )^{3}}{2}-2 x \ln \relax (2)+x^{2}+5 x\) \(112\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-8+x)*ln(1/4*x^2-2*x)+(-5*x+40)*ln(x)^2+(-10*x+80)*ln(x)+2*x^2-9*x-48)/(-8+x),x,method=_RETURNVERBOSE)

[Out]

x^2+5*x-5*x*ln(x)^2-2*x*ln(2)+x*ln(x^2-8*x)

________________________________________________________________________________________

maxima [A]  time = 0.58, size = 39, normalized size = 1.86 \begin {gather*} -5 \, x \log \relax (x)^{2} + x^{2} - 2 \, x {\left (\log \relax (2) + 1\right )} + {\left (x - 8\right )} \log \left (x - 8\right ) + x \log \relax (x) + 7 \, x + 8 \, \log \left (x - 8\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8+x)*log(1/4*x^2-2*x)+(-5*x+40)*log(x)^2+(-10*x+80)*log(x)+2*x^2-9*x-48)/(-8+x),x, algorithm="max
ima")

[Out]

-5*x*log(x)^2 + x^2 - 2*x*(log(2) + 1) + (x - 8)*log(x - 8) + x*log(x) + 7*x + 8*log(x - 8)

________________________________________________________________________________________

mupad [B]  time = 2.00, size = 26, normalized size = 1.24 \begin {gather*} 5\,x-5\,x\,{\ln \relax (x)}^2+x\,\ln \left (\frac {x^2}{4}-2\,x\right )+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(9*x - log(x^2/4 - 2*x)*(x - 8) + log(x)*(10*x - 80) - 2*x^2 + log(x)^2*(5*x - 40) + 48)/(x - 8),x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.56, size = 41, normalized size = 1.95 \begin {gather*} x^{2} - 5 x \log {\relax (x )}^{2} + 5 x + \left (x - \frac {4}{3}\right ) \log {\left (\frac {x^{2}}{4} - 2 x \right )} + \frac {4 \log {\left (x^{2} - 8 x \right )}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-8+x)*ln(1/4*x**2-2*x)+(-5*x+40)*ln(x)**2+(-10*x+80)*ln(x)+2*x**2-9*x-48)/(-8+x),x)

[Out]

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

________________________________________________________________________________________