3.1.47 \(\int \frac {20-4 x-27 x^2+8 x^3+(4-7 x^2+2 x^3) \log (x)}{16 x-16 x^2+4 x^3+(4 x-4 x^2+x^3) \log (x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.44, antiderivative size = 20, normalized size of antiderivative = 0.87, number of steps used = 7, number of rules used = 5, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {6688, 6742, 1620, 2302, 29} \begin {gather*} 2 x-\frac {4}{2-x}+\log (x)+\log (\log (x)+4) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(20 - 4*x - 27*x^2 + 8*x^3 + (4 - 7*x^2 + 2*x^3)*Log[x])/(16*x - 16*x^2 + 4*x^3 + (4*x - 4*x^2 + x^3)*Log[
x]),x]

[Out]

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

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 2302

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

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, 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 \frac {20-4 x-27 x^2+8 x^3+\left (4-7 x^2+2 x^3\right ) \log (x)}{(2-x)^2 x (4+\log (x))} \, dx\\ &=\int \left (\frac {4-7 x^2+2 x^3}{(-2+x)^2 x}+\frac {1}{x (4+\log (x))}\right ) \, dx\\ &=\int \frac {4-7 x^2+2 x^3}{(-2+x)^2 x} \, dx+\int \frac {1}{x (4+\log (x))} \, dx\\ &=\int \left (2-\frac {4}{(-2+x)^2}+\frac {1}{x}\right ) \, dx+\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,4+\log (x)\right )\\ &=-\frac {4}{2-x}+2 x+\log (x)+\log (4+\log (x))\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 18, normalized size = 0.78 \begin {gather*} \frac {4}{-2+x}+2 x+\log (x)+\log (4+\log (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(20 - 4*x - 27*x^2 + 8*x^3 + (4 - 7*x^2 + 2*x^3)*Log[x])/(16*x - 16*x^2 + 4*x^3 + (4*x - 4*x^2 + x^3
)*Log[x]),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 31, normalized size = 1.35 \begin {gather*} \frac {2 \, x^{2} + {\left (x - 2\right )} \log \relax (x) + {\left (x - 2\right )} \log \left (\log \relax (x) + 4\right ) - 4 \, x + 4}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^3-7*x^2+4)*log(x)+8*x^3-27*x^2-4*x+20)/((x^3-4*x^2+4*x)*log(x)+4*x^3-16*x^2+16*x),x, algorithm
="fricas")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^3-7*x^2+4)*log(x)+8*x^3-27*x^2-4*x+20)/((x^3-4*x^2+4*x)*log(x)+4*x^3-16*x^2+16*x),x, algorithm
="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 22, normalized size = 0.96




method result size



norman \(\frac {2 x^{2}-4}{x -2}+\ln \relax (x )+\ln \left (\ln \relax (x )+4\right )\) \(22\)
risch \(\frac {x \ln \relax (x )+2 x^{2}-2 \ln \relax (x )-4 x +4}{x -2}+\ln \left (\ln \relax (x )+4\right )\) \(31\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^3-7*x^2+4)*ln(x)+8*x^3-27*x^2-4*x+20)/((x^3-4*x^2+4*x)*ln(x)+4*x^3-16*x^2+16*x),x,method=_RETURNVERB
OSE)

[Out]

(2*x^2-4)/(x-2)+ln(x)+ln(ln(x)+4)

________________________________________________________________________________________

maxima [A]  time = 1.34, size = 23, normalized size = 1.00 \begin {gather*} \frac {2 \, {\left (x^{2} - 2 \, x + 2\right )}}{x - 2} + \log \relax (x) + \log \left (\log \relax (x) + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^3-7*x^2+4)*log(x)+8*x^3-27*x^2-4*x+20)/((x^3-4*x^2+4*x)*log(x)+4*x^3-16*x^2+16*x),x, algorithm
="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.33, size = 18, normalized size = 0.78 \begin {gather*} 2\,x+\ln \left (\ln \relax (x)+4\right )+\ln \relax (x)+\frac {4}{x-2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(x)*(2*x^3 - 7*x^2 + 4) - 4*x - 27*x^2 + 8*x^3 + 20)/(16*x + log(x)*(4*x - 4*x^2 + x^3) - 16*x^2 + 4*x
^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 17, normalized size = 0.74 \begin {gather*} 2 x + \log {\relax (x )} + \log {\left (\log {\relax (x )} + 4 \right )} + \frac {4}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**3-7*x**2+4)*ln(x)+8*x**3-27*x**2-4*x+20)/((x**3-4*x**2+4*x)*ln(x)+4*x**3-16*x**2+16*x),x)

[Out]

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

________________________________________________________________________________________