\(\int \frac {-320+82 x+16 x^2-3 x^3+(128-52 x+8 x^2) \log (x)-4 x \log ^2(x)}{x} \, dx\) [625]

   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 = 39, antiderivative size = 17 \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=(16-x) \left (9+(5+x-2 \log (x))^2\right ) \]

[Out]

(16-x)*(9+(5-2*ln(x)+x)^2)

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(43\) vs. \(2(17)=34\).

Time = 0.04 (sec) , antiderivative size = 43, normalized size of antiderivative = 2.53, number of steps used = 11, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {14, 2404, 2332, 2338, 2341, 2333} \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=-x^3+6 x^2+4 x^2 \log (x)+126 x-4 x \log ^2(x)+64 \log ^2(x)-44 x \log (x)-320 \log (x) \]

[In]

Int[(-320 + 82*x + 16*x^2 - 3*x^3 + (128 - 52*x + 8*x^2)*Log[x] - 4*x*Log[x]^2)/x,x]

[Out]

126*x + 6*x^2 - x^3 - 320*Log[x] - 44*x*Log[x] + 4*x^2*Log[x] + 64*Log[x]^2 - 4*x*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 2333

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 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 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 {-320+82 x+16 x^2-3 x^3}{x}+\frac {4 \left (32-13 x+2 x^2\right ) \log (x)}{x}-4 \log ^2(x)\right ) \, dx \\ & = 4 \int \frac {\left (32-13 x+2 x^2\right ) \log (x)}{x} \, dx-4 \int \log ^2(x) \, dx+\int \frac {-320+82 x+16 x^2-3 x^3}{x} \, dx \\ & = -4 x \log ^2(x)+4 \int \left (-13 \log (x)+\frac {32 \log (x)}{x}+2 x \log (x)\right ) \, dx+8 \int \log (x) \, dx+\int \left (82-\frac {320}{x}+16 x-3 x^2\right ) \, dx \\ & = 74 x+8 x^2-x^3-320 \log (x)+8 x \log (x)-4 x \log ^2(x)+8 \int x \log (x) \, dx-52 \int \log (x) \, dx+128 \int \frac {\log (x)}{x} \, dx \\ & = 126 x+6 x^2-x^3-320 \log (x)-44 x \log (x)+4 x^2 \log (x)+64 \log ^2(x)-4 x \log ^2(x) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(43\) vs. \(2(17)=34\).

Time = 0.02 (sec) , antiderivative size = 43, normalized size of antiderivative = 2.53 \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=126 x+6 x^2-x^3-320 \log (x)-44 x \log (x)+4 x^2 \log (x)+64 \log ^2(x)-4 x \log ^2(x) \]

[In]

Integrate[(-320 + 82*x + 16*x^2 - 3*x^3 + (128 - 52*x + 8*x^2)*Log[x] - 4*x*Log[x]^2)/x,x]

[Out]

126*x + 6*x^2 - x^3 - 320*Log[x] - 44*x*Log[x] + 4*x^2*Log[x] + 64*Log[x]^2 - 4*x*Log[x]^2

Maple [B] (verified)

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

Time = 0.02 (sec) , antiderivative size = 41, normalized size of antiderivative = 2.41

method result size
risch \(\left (-4 x +64\right ) \ln \left (x \right )^{2}+\left (4 x^{2}-44 x \right ) \ln \left (x \right )-x^{3}+6 x^{2}+126 x -320 \ln \left (x \right )\) \(41\)
default \(-4 x \ln \left (x \right )^{2}-44 x \ln \left (x \right )+126 x +4 x^{2} \ln \left (x \right )+6 x^{2}-x^{3}+64 \ln \left (x \right )^{2}-320 \ln \left (x \right )\) \(44\)
norman \(-4 x \ln \left (x \right )^{2}-44 x \ln \left (x \right )+126 x +4 x^{2} \ln \left (x \right )+6 x^{2}-x^{3}+64 \ln \left (x \right )^{2}-320 \ln \left (x \right )\) \(44\)
parallelrisch \(-4 x \ln \left (x \right )^{2}-44 x \ln \left (x \right )+126 x +4 x^{2} \ln \left (x \right )+6 x^{2}-x^{3}+64 \ln \left (x \right )^{2}-320 \ln \left (x \right )\) \(44\)
parts \(-4 x \ln \left (x \right )^{2}-44 x \ln \left (x \right )+126 x +4 x^{2} \ln \left (x \right )+6 x^{2}-x^{3}+64 \ln \left (x \right )^{2}-320 \ln \left (x \right )\) \(44\)

[In]

int((-4*x*ln(x)^2+(8*x^2-52*x+128)*ln(x)-3*x^3+16*x^2+82*x-320)/x,x,method=_RETURNVERBOSE)

[Out]

(-4*x+64)*ln(x)^2+(4*x^2-44*x)*ln(x)-x^3+6*x^2+126*x-320*ln(x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (16) = 32\).

Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 2.06 \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=-x^{3} - 4 \, {\left (x - 16\right )} \log \left (x\right )^{2} + 6 \, x^{2} + 4 \, {\left (x^{2} - 11 \, x - 80\right )} \log \left (x\right ) + 126 \, x \]

[In]

integrate((-4*x*log(x)^2+(8*x^2-52*x+128)*log(x)-3*x^3+16*x^2+82*x-320)/x,x, algorithm="fricas")

[Out]

-x^3 - 4*(x - 16)*log(x)^2 + 6*x^2 + 4*(x^2 - 11*x - 80)*log(x) + 126*x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (14) = 28\).

Time = 0.07 (sec) , antiderivative size = 37, normalized size of antiderivative = 2.18 \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=- x^{3} + 6 x^{2} + 126 x + \left (64 - 4 x\right ) \log {\left (x \right )}^{2} + \left (4 x^{2} - 44 x\right ) \log {\left (x \right )} - 320 \log {\left (x \right )} \]

[In]

integrate((-4*x*ln(x)**2+(8*x**2-52*x+128)*ln(x)-3*x**3+16*x**2+82*x-320)/x,x)

[Out]

-x**3 + 6*x**2 + 126*x + (64 - 4*x)*log(x)**2 + (4*x**2 - 44*x)*log(x) - 320*log(x)

Maxima [B] (verification not implemented)

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

Time = 0.20 (sec) , antiderivative size = 49, normalized size of antiderivative = 2.88 \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=-x^{3} + 4 \, x^{2} \log \left (x\right ) - 4 \, {\left (\log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 2\right )} x + 6 \, x^{2} - 52 \, x \log \left (x\right ) + 64 \, \log \left (x\right )^{2} + 134 \, x - 320 \, \log \left (x\right ) \]

[In]

integrate((-4*x*log(x)^2+(8*x^2-52*x+128)*log(x)-3*x^3+16*x^2+82*x-320)/x,x, algorithm="maxima")

[Out]

-x^3 + 4*x^2*log(x) - 4*(log(x)^2 - 2*log(x) + 2)*x + 6*x^2 - 52*x*log(x) + 64*log(x)^2 + 134*x - 320*log(x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 38 vs. \(2 (16) = 32\).

Time = 0.28 (sec) , antiderivative size = 38, normalized size of antiderivative = 2.24 \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=-x^{3} - 4 \, {\left (x - 16\right )} \log \left (x\right )^{2} + 6 \, x^{2} + 4 \, {\left (x^{2} - 11 \, x\right )} \log \left (x\right ) + 126 \, x - 320 \, \log \left (x\right ) \]

[In]

integrate((-4*x*log(x)^2+(8*x^2-52*x+128)*log(x)-3*x^3+16*x^2+82*x-320)/x,x, algorithm="giac")

[Out]

-x^3 - 4*(x - 16)*log(x)^2 + 6*x^2 + 4*(x^2 - 11*x)*log(x) + 126*x - 320*log(x)

Mupad [B] (verification not implemented)

Time = 8.57 (sec) , antiderivative size = 43, normalized size of antiderivative = 2.53 \[ \int \frac {-320+82 x+16 x^2-3 x^3+\left (128-52 x+8 x^2\right ) \log (x)-4 x \log ^2(x)}{x} \, dx=-x^3+4\,x^2\,\ln \left (x\right )+6\,x^2-4\,x\,{\ln \left (x\right )}^2-44\,x\,\ln \left (x\right )+126\,x+64\,{\ln \left (x\right )}^2-320\,\ln \left (x\right ) \]

[In]

int((82*x - 4*x*log(x)^2 + log(x)*(8*x^2 - 52*x + 128) + 16*x^2 - 3*x^3 - 320)/x,x)

[Out]

126*x - 320*log(x) - 4*x*log(x)^2 + 4*x^2*log(x) + 64*log(x)^2 - 44*x*log(x) + 6*x^2 - x^3