\(\int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+(24-384 x+54 x^2-288 x^3) \log (x)+6 x^2 \log ^2(x)}{x} \, dx\) [6544]

   Optimal result
   Rubi [B] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 51, antiderivative size = 21 \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=3 \left (4+x^2\right ) \left (-3+2 x+(4-16 x+\log (x))^2\right ) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(57\) vs. \(2(21)=42\).

Time = 0.06 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.71, number of steps used = 12, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {14, 2404, 2332, 2338, 2341, 2342} \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=768 x^4-378 x^3-96 x^3 \log (x)+3111 x^2+3 x^2 \log ^2(x)+24 x^2 \log (x)-1512 x+12 \log ^2(x)-384 x \log (x)+96 \log (x) \]

[In]

Int[(96 - 1896*x + 6246*x^2 - 1230*x^3 + 3072*x^4 + (24 - 384*x + 54*x^2 - 288*x^3)*Log[x] + 6*x^2*Log[x]^2)/x
,x]

[Out]

-1512*x + 3111*x^2 - 378*x^3 + 768*x^4 + 96*Log[x] - 384*x*Log[x] + 24*x^2*Log[x] - 96*x^3*Log[x] + 12*Log[x]^
2 + 3*x^2*Log[x]^2

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2332

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

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2341

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 2342

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 2404

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]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {6 \left (16-316 x+1041 x^2-205 x^3+512 x^4\right )}{x}-\frac {6 \left (-4+64 x-9 x^2+48 x^3\right ) \log (x)}{x}+6 x \log ^2(x)\right ) \, dx \\ & = 6 \int \frac {16-316 x+1041 x^2-205 x^3+512 x^4}{x} \, dx-6 \int \frac {\left (-4+64 x-9 x^2+48 x^3\right ) \log (x)}{x} \, dx+6 \int x \log ^2(x) \, dx \\ & = 3 x^2 \log ^2(x)+6 \int \left (-316+\frac {16}{x}+1041 x-205 x^2+512 x^3\right ) \, dx-6 \int x \log (x) \, dx-6 \int \left (64 \log (x)-\frac {4 \log (x)}{x}-9 x \log (x)+48 x^2 \log (x)\right ) \, dx \\ & = -1896 x+\frac {6249 x^2}{2}-410 x^3+768 x^4+96 \log (x)-3 x^2 \log (x)+3 x^2 \log ^2(x)+24 \int \frac {\log (x)}{x} \, dx+54 \int x \log (x) \, dx-288 \int x^2 \log (x) \, dx-384 \int \log (x) \, dx \\ & = -1512 x+3111 x^2-378 x^3+768 x^4+96 \log (x)-384 x \log (x)+24 x^2 \log (x)-96 x^3 \log (x)+12 \log ^2(x)+3 x^2 \log ^2(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(57\) vs. \(2(21)=42\).

Time = 0.02 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.71 \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=-1512 x+3111 x^2-378 x^3+768 x^4+96 \log (x)-384 x \log (x)+24 x^2 \log (x)-96 x^3 \log (x)+12 \log ^2(x)+3 x^2 \log ^2(x) \]

[In]

Integrate[(96 - 1896*x + 6246*x^2 - 1230*x^3 + 3072*x^4 + (24 - 384*x + 54*x^2 - 288*x^3)*Log[x] + 6*x^2*Log[x
]^2)/x,x]

[Out]

-1512*x + 3111*x^2 - 378*x^3 + 768*x^4 + 96*Log[x] - 384*x*Log[x] + 24*x^2*Log[x] - 96*x^3*Log[x] + 12*Log[x]^
2 + 3*x^2*Log[x]^2

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(52\) vs. \(2(21)=42\).

Time = 0.07 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.52

method result size
risch \(\left (3 x^{2}+12\right ) \ln \left (x \right )^{2}+\left (-96 x^{3}+24 x^{2}-384 x \right ) \ln \left (x \right )+768 x^{4}-378 x^{3}+3111 x^{2}-1512 x +96 \ln \left (x \right )\) \(53\)
default \(3 x^{2} \ln \left (x \right )^{2}+24 x^{2} \ln \left (x \right )+3111 x^{2}-96 x^{3} \ln \left (x \right )-378 x^{3}+768 x^{4}-384 x \ln \left (x \right )-1512 x +12 \ln \left (x \right )^{2}+96 \ln \left (x \right )\) \(58\)
norman \(3 x^{2} \ln \left (x \right )^{2}+24 x^{2} \ln \left (x \right )+3111 x^{2}-96 x^{3} \ln \left (x \right )-378 x^{3}+768 x^{4}-384 x \ln \left (x \right )-1512 x +12 \ln \left (x \right )^{2}+96 \ln \left (x \right )\) \(58\)
parallelrisch \(3 x^{2} \ln \left (x \right )^{2}+24 x^{2} \ln \left (x \right )+3111 x^{2}-96 x^{3} \ln \left (x \right )-378 x^{3}+768 x^{4}-384 x \ln \left (x \right )-1512 x +12 \ln \left (x \right )^{2}+96 \ln \left (x \right )\) \(58\)
parts \(3 x^{2} \ln \left (x \right )^{2}+24 x^{2} \ln \left (x \right )+3111 x^{2}-96 x^{3} \ln \left (x \right )-378 x^{3}+768 x^{4}-384 x \ln \left (x \right )-1512 x +12 \ln \left (x \right )^{2}+96 \ln \left (x \right )\) \(58\)

[In]

int((6*x^2*ln(x)^2+(-288*x^3+54*x^2-384*x+24)*ln(x)+3072*x^4-1230*x^3+6246*x^2-1896*x+96)/x,x,method=_RETURNVE
RBOSE)

[Out]

(3*x^2+12)*ln(x)^2+(-96*x^3+24*x^2-384*x)*ln(x)+768*x^4-378*x^3+3111*x^2-1512*x+96*ln(x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 49 vs. \(2 (23) = 46\).

Time = 0.25 (sec) , antiderivative size = 49, normalized size of antiderivative = 2.33 \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=768 \, x^{4} - 378 \, x^{3} + 3 \, {\left (x^{2} + 4\right )} \log \left (x\right )^{2} + 3111 \, x^{2} - 24 \, {\left (4 \, x^{3} - x^{2} + 16 \, x - 4\right )} \log \left (x\right ) - 1512 \, x \]

[In]

integrate((6*x^2*log(x)^2+(-288*x^3+54*x^2-384*x+24)*log(x)+3072*x^4-1230*x^3+6246*x^2-1896*x+96)/x,x, algorit
hm="fricas")

[Out]

768*x^4 - 378*x^3 + 3*(x^2 + 4)*log(x)^2 + 3111*x^2 - 24*(4*x^3 - x^2 + 16*x - 4)*log(x) - 1512*x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (20) = 40\).

Time = 0.10 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.43 \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=768 x^{4} - 378 x^{3} + 3111 x^{2} - 1512 x + \left (3 x^{2} + 12\right ) \log {\left (x \right )}^{2} + \left (- 96 x^{3} + 24 x^{2} - 384 x\right ) \log {\left (x \right )} + 96 \log {\left (x \right )} \]

[In]

integrate((6*x**2*ln(x)**2+(-288*x**3+54*x**2-384*x+24)*ln(x)+3072*x**4-1230*x**3+6246*x**2-1896*x+96)/x,x)

[Out]

768*x**4 - 378*x**3 + 3111*x**2 - 1512*x + (3*x**2 + 12)*log(x)**2 + (-96*x**3 + 24*x**2 - 384*x)*log(x) + 96*
log(x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (23) = 46\).

Time = 0.21 (sec) , antiderivative size = 65, normalized size of antiderivative = 3.10 \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=768 \, x^{4} - 96 \, x^{3} \log \left (x\right ) + \frac {3}{2} \, {\left (2 \, \log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 1\right )} x^{2} - 378 \, x^{3} + 27 \, x^{2} \log \left (x\right ) + \frac {6219}{2} \, x^{2} - 384 \, x \log \left (x\right ) + 12 \, \log \left (x\right )^{2} - 1512 \, x + 96 \, \log \left (x\right ) \]

[In]

integrate((6*x^2*log(x)^2+(-288*x^3+54*x^2-384*x+24)*log(x)+3072*x^4-1230*x^3+6246*x^2-1896*x+96)/x,x, algorit
hm="maxima")

[Out]

768*x^4 - 96*x^3*log(x) + 3/2*(2*log(x)^2 - 2*log(x) + 1)*x^2 - 378*x^3 + 27*x^2*log(x) + 6219/2*x^2 - 384*x*l
og(x) + 12*log(x)^2 - 1512*x + 96*log(x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 52 vs. \(2 (23) = 46\).

Time = 0.27 (sec) , antiderivative size = 52, normalized size of antiderivative = 2.48 \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=768 \, x^{4} - 378 \, x^{3} + 3 \, {\left (x^{2} + 4\right )} \log \left (x\right )^{2} + 3111 \, x^{2} - 24 \, {\left (4 \, x^{3} - x^{2} + 16 \, x\right )} \log \left (x\right ) - 1512 \, x + 96 \, \log \left (x\right ) \]

[In]

integrate((6*x^2*log(x)^2+(-288*x^3+54*x^2-384*x+24)*log(x)+3072*x^4-1230*x^3+6246*x^2-1896*x+96)/x,x, algorit
hm="giac")

[Out]

768*x^4 - 378*x^3 + 3*(x^2 + 4)*log(x)^2 + 3111*x^2 - 24*(4*x^3 - x^2 + 16*x)*log(x) - 1512*x + 96*log(x)

Mupad [B] (verification not implemented)

Time = 11.65 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.71 \[ \int \frac {96-1896 x+6246 x^2-1230 x^3+3072 x^4+\left (24-384 x+54 x^2-288 x^3\right ) \log (x)+6 x^2 \log ^2(x)}{x} \, dx=768\,x^4-96\,x^3\,\ln \left (x\right )-378\,x^3+3\,x^2\,{\ln \left (x\right )}^2+24\,x^2\,\ln \left (x\right )+3111\,x^2-384\,x\,\ln \left (x\right )-1512\,x+12\,{\ln \left (x\right )}^2+96\,\ln \left (x\right ) \]

[In]

int((6*x^2*log(x)^2 - 1896*x + 6246*x^2 - 1230*x^3 + 3072*x^4 - log(x)*(384*x - 54*x^2 + 288*x^3 - 24) + 96)/x
,x)

[Out]

96*log(x) - 1512*x + 24*x^2*log(x) - 96*x^3*log(x) + 12*log(x)^2 + 3*x^2*log(x)^2 - 384*x*log(x) + 3111*x^2 -
378*x^3 + 768*x^4