3.21.95 \(\int \frac {188-95 x-96 x^2-72 x^3+9 x^4+16 x^5-3 x^6+(4-2 x) \log (x)}{16 x^2-8 x^3+x^4} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.48, antiderivative size = 57, normalized size of antiderivative = 1.73, number of steps used = 21, number of rules used = 9, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.164, Rules used = {1594, 27, 6742, 44, 43, 2357, 2314, 31, 2304} \begin {gather*} -x^3-4 x^2-7 x+\frac {4}{4-x}-\frac {12}{x}-\frac {x \log (x)}{16 (4-x)}-\frac {\log (x)}{16}-\frac {\log (x)}{4 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(188 - 95*x - 96*x^2 - 72*x^3 + 9*x^4 + 16*x^5 - 3*x^6 + (4 - 2*x)*Log[x])/(16*x^2 - 8*x^3 + x^4),x]

[Out]

4/(4 - x) - 12/x - 7*x - 4*x^2 - x^3 - Log[x]/16 - Log[x]/(4*x) - (x*Log[x])/(16*(4 - x))

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, 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 44

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2314

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

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

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 {188-95 x-96 x^2-72 x^3+9 x^4+16 x^5-3 x^6+(4-2 x) \log (x)}{x^2 \left (16-8 x+x^2\right )} \, dx\\ &=\int \frac {188-95 x-96 x^2-72 x^3+9 x^4+16 x^5-3 x^6+(4-2 x) \log (x)}{(-4+x)^2 x^2} \, dx\\ &=\int \left (-\frac {96}{(-4+x)^2}+\frac {188}{(-4+x)^2 x^2}-\frac {95}{(-4+x)^2 x}-\frac {72 x}{(-4+x)^2}+\frac {9 x^2}{(-4+x)^2}+\frac {16 x^3}{(-4+x)^2}-\frac {3 x^4}{(-4+x)^2}-\frac {2 (-2+x) \log (x)}{(-4+x)^2 x^2}\right ) \, dx\\ &=-\frac {96}{4-x}-2 \int \frac {(-2+x) \log (x)}{(-4+x)^2 x^2} \, dx-3 \int \frac {x^4}{(-4+x)^2} \, dx+9 \int \frac {x^2}{(-4+x)^2} \, dx+16 \int \frac {x^3}{(-4+x)^2} \, dx-72 \int \frac {x}{(-4+x)^2} \, dx-95 \int \frac {1}{(-4+x)^2 x} \, dx+188 \int \frac {1}{(-4+x)^2 x^2} \, dx\\ &=-\frac {96}{4-x}-2 \int \left (\frac {\log (x)}{8 (-4+x)^2}-\frac {\log (x)}{8 x^2}\right ) \, dx-3 \int \left (48+\frac {256}{(-4+x)^2}+\frac {256}{-4+x}+8 x+x^2\right ) \, dx+9 \int \left (1+\frac {16}{(-4+x)^2}+\frac {8}{-4+x}\right ) \, dx+16 \int \left (8+\frac {64}{(-4+x)^2}+\frac {48}{-4+x}+x\right ) \, dx-72 \int \left (\frac {4}{(-4+x)^2}+\frac {1}{-4+x}\right ) \, dx-95 \int \left (\frac {1}{4 (-4+x)^2}-\frac {1}{16 (-4+x)}+\frac {1}{16 x}\right ) \, dx+188 \int \left (\frac {1}{16 (-4+x)^2}-\frac {1}{32 (-4+x)}+\frac {1}{16 x^2}+\frac {1}{32 x}\right ) \, dx\\ &=\frac {4}{4-x}-\frac {47}{4 x}-7 x-4 x^2-x^3+\frac {1}{16} \log (4-x)-\frac {\log (x)}{16}-\frac {1}{4} \int \frac {\log (x)}{(-4+x)^2} \, dx+\frac {1}{4} \int \frac {\log (x)}{x^2} \, dx\\ &=\frac {4}{4-x}-\frac {12}{x}-7 x-4 x^2-x^3+\frac {1}{16} \log (4-x)-\frac {\log (x)}{16}-\frac {\log (x)}{4 x}-\frac {x \log (x)}{16 (4-x)}-\frac {1}{16} \int \frac {1}{-4+x} \, dx\\ &=\frac {4}{4-x}-\frac {12}{x}-7 x-4 x^2-x^3-\frac {\log (x)}{16}-\frac {\log (x)}{4 x}-\frac {x \log (x)}{16 (4-x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 31, normalized size = 0.94 \begin {gather*} \frac {48-16 x+28 x^2+9 x^3-x^5+\log (x)}{(-4+x) x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(188 - 95*x - 96*x^2 - 72*x^3 + 9*x^4 + 16*x^5 - 3*x^6 + (4 - 2*x)*Log[x])/(16*x^2 - 8*x^3 + x^4),x]

[Out]

(48 - 16*x + 28*x^2 + 9*x^3 - x^5 + Log[x])/((-4 + x)*x)

________________________________________________________________________________________

fricas [A]  time = 0.61, size = 33, normalized size = 1.00 \begin {gather*} -\frac {x^{5} - 9 \, x^{3} - 28 \, x^{2} + 16 \, x - \log \relax (x) - 48}{x^{2} - 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4-2*x)*log(x)-3*x^6+16*x^5+9*x^4-72*x^3-96*x^2-95*x+188)/(x^4-8*x^3+16*x^2),x, algorithm="fricas")

[Out]

-(x^5 - 9*x^3 - 28*x^2 + 16*x - log(x) - 48)/(x^2 - 4*x)

________________________________________________________________________________________

giac [A]  time = 0.19, size = 41, normalized size = 1.24 \begin {gather*} -x^{3} - 4 \, x^{2} + \frac {1}{4} \, {\left (\frac {1}{x - 4} - \frac {1}{x}\right )} \log \relax (x) - 7 \, x - \frac {4}{x - 4} - \frac {12}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4-2*x)*log(x)-3*x^6+16*x^5+9*x^4-72*x^3-96*x^2-95*x+188)/(x^4-8*x^3+16*x^2),x, algorithm="giac")

[Out]

-x^3 - 4*x^2 + 1/4*(1/(x - 4) - 1/x)*log(x) - 7*x - 4/(x - 4) - 12/x

________________________________________________________________________________________

maple [A]  time = 0.05, size = 27, normalized size = 0.82




method result size



norman \(\frac {48+96 x +9 x^{3}-x^{5}+\ln \relax (x )}{\left (x -4\right ) x}\) \(27\)
risch \(\frac {\ln \relax (x )}{\left (x -4\right ) x}-\frac {x^{5}-9 x^{3}-28 x^{2}+16 x -48}{\left (x -4\right ) x}\) \(41\)
default \(-x^{3}-4 x^{2}-7 x -\frac {4}{x -4}-\frac {12}{x}-\frac {\ln \relax (x )}{16}-\frac {\ln \relax (x )}{4 x}+\frac {x \ln \relax (x )}{16 x -64}\) \(48\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((4-2*x)*ln(x)-3*x^6+16*x^5+9*x^4-72*x^3-96*x^2-95*x+188)/(x^4-8*x^3+16*x^2),x,method=_RETURNVERBOSE)

[Out]

(48+96*x+9*x^3-x^5+ln(x))/(x-4)/x

________________________________________________________________________________________

maxima [B]  time = 0.46, size = 66, normalized size = 2.00 \begin {gather*} -x^{3} - 4 \, x^{2} - 7 \, x + \frac {{\left (x^{2} - 4 \, x + 16\right )} \log \relax (x) - 4 \, x + 16}{16 \, {\left (x^{2} - 4 \, x\right )}} - \frac {47 \, {\left (x - 2\right )}}{2 \, {\left (x^{2} - 4 \, x\right )}} + \frac {31}{4 \, {\left (x - 4\right )}} - \frac {1}{16} \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4-2*x)*log(x)-3*x^6+16*x^5+9*x^4-72*x^3-96*x^2-95*x+188)/(x^4-8*x^3+16*x^2),x, algorithm="maxima")

[Out]

-x^3 - 4*x^2 - 7*x + 1/16*((x^2 - 4*x + 16)*log(x) - 4*x + 16)/(x^2 - 4*x) - 47/2*(x - 2)/(x^2 - 4*x) + 31/4/(
x - 4) - 1/16*log(x)

________________________________________________________________________________________

mupad [B]  time = 1.29, size = 38, normalized size = 1.15 \begin {gather*} -\frac {48\,x+x\,\ln \relax (x)+24\,x^3+9\,x^4-x^6}{4\,x^2-x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(95*x + log(x)*(2*x - 4) + 96*x^2 + 72*x^3 - 9*x^4 - 16*x^5 + 3*x^6 - 188)/(16*x^2 - 8*x^3 + x^4),x)

[Out]

-(48*x + x*log(x) + 24*x^3 + 9*x^4 - x^6)/(4*x^2 - x^3)

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 32, normalized size = 0.97 \begin {gather*} - x^{3} - 4 x^{2} - 7 x - \frac {16 x - 48}{x^{2} - 4 x} + \frac {\log {\relax (x )}}{x^{2} - 4 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4-2*x)*ln(x)-3*x**6+16*x**5+9*x**4-72*x**3-96*x**2-95*x+188)/(x**4-8*x**3+16*x**2),x)

[Out]

-x**3 - 4*x**2 - 7*x - (16*x - 48)/(x**2 - 4*x) + log(x)/(x**2 - 4*x)

________________________________________________________________________________________