\(\int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx\) [460]

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

Optimal result

Integrand size = 28, antiderivative size = 17 \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=\frac {1}{2} \left (\log (4)+\left (2 x+\log ^2(x)\right )^2\right ) \]

[Out]

ln(2)+1/2*(2*x+ln(x)^2)^2

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.24, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {14, 2332, 2333, 2339, 30} \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=2 x^2+\frac {\log ^4(x)}{2}+2 x \log ^2(x) \]

[In]

Int[(4*x^2 + 4*x*Log[x] + 2*x*Log[x]^2 + 2*Log[x]^3)/x,x]

[Out]

2*x^2 + 2*x*Log[x]^2 + Log[x]^4/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 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

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 2339

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]

Rubi steps \begin{align*} \text {integral}& = \int \left (4 x+4 \log (x)+2 \log ^2(x)+\frac {2 \log ^3(x)}{x}\right ) \, dx \\ & = 2 x^2+2 \int \log ^2(x) \, dx+2 \int \frac {\log ^3(x)}{x} \, dx+4 \int \log (x) \, dx \\ & = -4 x+2 x^2+4 x \log (x)+2 x \log ^2(x)+2 \text {Subst}\left (\int x^3 \, dx,x,\log (x)\right )-4 \int \log (x) \, dx \\ & = 2 x^2+2 x \log ^2(x)+\frac {\log ^4(x)}{2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.24 \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=2 x^2+2 x \log ^2(x)+\frac {\log ^4(x)}{2} \]

[In]

Integrate[(4*x^2 + 4*x*Log[x] + 2*x*Log[x]^2 + 2*Log[x]^3)/x,x]

[Out]

2*x^2 + 2*x*Log[x]^2 + Log[x]^4/2

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.18

method result size
default \(\frac {\ln \left (x \right )^{4}}{2}+2 x \ln \left (x \right )^{2}+2 x^{2}\) \(20\)
norman \(\frac {\ln \left (x \right )^{4}}{2}+2 x \ln \left (x \right )^{2}+2 x^{2}\) \(20\)
risch \(\frac {\ln \left (x \right )^{4}}{2}+2 x \ln \left (x \right )^{2}+2 x^{2}\) \(20\)
parts \(\frac {\ln \left (x \right )^{4}}{2}+2 x \ln \left (x \right )^{2}+2 x^{2}\) \(20\)

[In]

int((2*ln(x)^3+2*x*ln(x)^2+4*x*ln(x)+4*x^2)/x,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.12 \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=\frac {1}{2} \, \log \left (x\right )^{4} + 2 \, x \log \left (x\right )^{2} + 2 \, x^{2} \]

[In]

integrate((2*log(x)^3+2*x*log(x)^2+4*x*log(x)+4*x^2)/x,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.12 \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=2 x^{2} + 2 x \log {\left (x \right )}^{2} + \frac {\log {\left (x \right )}^{4}}{2} \]

[In]

integrate((2*ln(x)**3+2*x*ln(x)**2+4*x*ln(x)+4*x**2)/x,x)

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (15) = 30\).

Time = 0.18 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.94 \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=\frac {1}{2} \, \log \left (x\right )^{4} + 2 \, {\left (\log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 2\right )} x + 2 \, x^{2} + 4 \, x \log \left (x\right ) - 4 \, x \]

[In]

integrate((2*log(x)^3+2*x*log(x)^2+4*x*log(x)+4*x^2)/x,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.12 \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=\frac {1}{2} \, \log \left (x\right )^{4} + 2 \, x \log \left (x\right )^{2} + 2 \, x^{2} \]

[In]

integrate((2*log(x)^3+2*x*log(x)^2+4*x*log(x)+4*x^2)/x,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.15 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.71 \[ \int \frac {4 x^2+4 x \log (x)+2 x \log ^2(x)+2 \log ^3(x)}{x} \, dx=\frac {{\left ({\ln \left (x\right )}^2+2\,x\right )}^2}{2} \]

[In]

int((2*x*log(x)^2 + 2*log(x)^3 + 4*x*log(x) + 4*x^2)/x,x)

[Out]

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