3.86.5 \(\int \frac {-12+4 x+(-4 x-24 x^3+8 x^4) \log (x)+(-36 x^3+8 x^4) \log ^2(x)}{9 x-6 x^2+x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.39, antiderivative size = 51, normalized size of antiderivative = 1.89, number of steps used = 24, number of rules used = 15, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.283, Rules used = {1594, 27, 6742, 36, 31, 29, 2357, 2295, 2314, 2316, 2315, 2304, 2296, 2318, 2305} \begin {gather*} 4 x^2 \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+12 x \log ^2(x)-\frac {4 x \log (x)}{3 (3-x)}-\frac {4 \log (x)}{3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-12 + 4*x + (-4*x - 24*x^3 + 8*x^4)*Log[x] + (-36*x^3 + 8*x^4)*Log[x]^2)/(9*x - 6*x^2 + x^3),x]

[Out]

(-4*Log[x])/3 - (4*x*Log[x])/(3*(3 - x)) + 12*x*Log[x]^2 - (36*x*Log[x]^2)/(3 - x) + 4*x^2*Log[x]^2

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 29

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

Rule 31

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

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 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 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 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 2305

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

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 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2316

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[((a + b*Log[-((c*d)/e)])*Log[d + e*
x])/e, x] + Dist[b, Int[Log[-((e*x)/d)]/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[-((c*d)/e), 0]

Rule 2318

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_))^2, x_Symbol] :> Simp[(x*(a + b*Log[c*x^n])
^p)/(d*(d + e*x)), x] - Dist[(b*n*p)/d, Int[(a + b*Log[c*x^n])^(p - 1)/(d + e*x), x], x] /; FreeQ[{a, b, c, d,
 e, n, p}, x] && GtQ[p, 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 {-12+4 x+\left (-4 x-24 x^3+8 x^4\right ) \log (x)+\left (-36 x^3+8 x^4\right ) \log ^2(x)}{x \left (9-6 x+x^2\right )} \, dx\\ &=\int \frac {-12+4 x+\left (-4 x-24 x^3+8 x^4\right ) \log (x)+\left (-36 x^3+8 x^4\right ) \log ^2(x)}{(-3+x)^2 x} \, dx\\ &=\int \left (\frac {4}{(-3+x) x}+\frac {4 \left (-1-6 x^2+2 x^3\right ) \log (x)}{(-3+x)^2}+\frac {4 x^2 (-9+2 x) \log ^2(x)}{(-3+x)^2}\right ) \, dx\\ &=4 \int \frac {1}{(-3+x) x} \, dx+4 \int \frac {\left (-1-6 x^2+2 x^3\right ) \log (x)}{(-3+x)^2} \, dx+4 \int \frac {x^2 (-9+2 x) \log ^2(x)}{(-3+x)^2} \, dx\\ &=\frac {4}{3} \int \frac {1}{-3+x} \, dx-\frac {4}{3} \int \frac {1}{x} \, dx+4 \int \left (6 \log (x)-\frac {\log (x)}{(-3+x)^2}+\frac {18 \log (x)}{-3+x}+2 x \log (x)\right ) \, dx+4 \int \left (3 \log ^2(x)-\frac {27 \log ^2(x)}{(-3+x)^2}+2 x \log ^2(x)\right ) \, dx\\ &=\frac {4}{3} \log (3-x)-\frac {4 \log (x)}{3}-4 \int \frac {\log (x)}{(-3+x)^2} \, dx+8 \int x \log (x) \, dx+8 \int x \log ^2(x) \, dx+12 \int \log ^2(x) \, dx+24 \int \log (x) \, dx+72 \int \frac {\log (x)}{-3+x} \, dx-108 \int \frac {\log ^2(x)}{(-3+x)^2} \, dx\\ &=-24 x-2 x^2+\frac {4}{3} \log (3-x)+72 \log (3) \log (-3+x)-\frac {4 \log (x)}{3}+24 x \log (x)-\frac {4 x \log (x)}{3 (3-x)}+4 x^2 \log (x)+12 x \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+4 x^2 \log ^2(x)-\frac {4}{3} \int \frac {1}{-3+x} \, dx-8 \int x \log (x) \, dx-24 \int \log (x) \, dx+72 \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx-72 \int \frac {\log (x)}{-3+x} \, dx\\ &=-\frac {4 \log (x)}{3}-\frac {4 x \log (x)}{3 (3-x)}+12 x \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+4 x^2 \log ^2(x)-72 \text {Li}_2\left (1-\frac {x}{3}\right )-72 \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx\\ &=-\frac {4 \log (x)}{3}-\frac {4 x \log (x)}{3 (3-x)}+12 x \log ^2(x)-\frac {36 x \log ^2(x)}{3-x}+4 x^2 \log ^2(x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 34, normalized size = 1.26 \begin {gather*} \frac {4}{3} \left (-\log (3-x)+\log (-3+x)+\frac {3 \log (x) \left (1+x^3 \log (x)\right )}{-3+x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-12 + 4*x + (-4*x - 24*x^3 + 8*x^4)*Log[x] + (-36*x^3 + 8*x^4)*Log[x]^2)/(9*x - 6*x^2 + x^3),x]

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^4-36*x^3)*log(x)^2+(8*x^4-24*x^3-4*x)*log(x)+4*x-12)/(x^3-6*x^2+9*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {4 \, {\left ({\left (2 \, x^{4} - 9 \, x^{3}\right )} \log \relax (x)^{2} + {\left (2 \, x^{4} - 6 \, x^{3} - x\right )} \log \relax (x) + x - 3\right )}}{x^{3} - 6 \, x^{2} + 9 \, x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^4-36*x^3)*log(x)^2+(8*x^4-24*x^3-4*x)*log(x)+4*x-12)/(x^3-6*x^2+9*x),x, algorithm="giac")

[Out]

integrate(4*((2*x^4 - 9*x^3)*log(x)^2 + (2*x^4 - 6*x^3 - x)*log(x) + x - 3)/(x^3 - 6*x^2 + 9*x), x)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 21, normalized size = 0.78




method result size



norman \(\frac {4 \ln \relax (x )+4 x^{3} \ln \relax (x )^{2}}{x -3}\) \(21\)
risch \(\frac {4 x^{3} \ln \relax (x )^{2}}{x -3}+\frac {4 \ln \relax (x )}{x -3}\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((8*x^4-36*x^3)*ln(x)^2+(8*x^4-24*x^3-4*x)*ln(x)+4*x-12)/(x^3-6*x^2+9*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 24, normalized size = 0.89 \begin {gather*} \frac {4 \, x^{3} \log \relax (x)^{2}}{x - 3} + \frac {4 \, \log \relax (x)}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x^4-36*x^3)*log(x)^2+(8*x^4-24*x^3-4*x)*log(x)+4*x-12)/(x^3-6*x^2+9*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.43, size = 17, normalized size = 0.63 \begin {gather*} \frac {4\,\ln \relax (x)\,\left (x^3\,\ln \relax (x)+1\right )}{x-3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x)^2*(36*x^3 - 8*x^4) - 4*x + log(x)*(4*x + 24*x^3 - 8*x^4) + 12)/(9*x - 6*x^2 + x^3),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 20, normalized size = 0.74 \begin {gather*} \frac {4 x^{3} \log {\relax (x )}^{2}}{x - 3} + \frac {4 \log {\relax (x )}}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x**4-36*x**3)*ln(x)**2+(8*x**4-24*x**3-4*x)*ln(x)+4*x-12)/(x**3-6*x**2+9*x),x)

[Out]

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

________________________________________________________________________________________