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

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

Optimal result

Integrand size = 20, antiderivative size = 18 \[ \int \frac {-2+4 x^2+8 x^2 \log (3 x)}{x} \, dx=\left (2+x \left (-\frac {4}{x}+4 x\right )\right ) \log (3 x) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.78, number of steps used = 5, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {14, 2341} \[ \int \frac {-2+4 x^2+8 x^2 \log (3 x)}{x} \, dx=4 x^2 \log (3 x)-2 \log (x) \]

[In]

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

[Out]

-2*Log[x] + 4*x^2*Log[3*x]

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 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
]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

-2*Log[x] + 4*x^2*Log[3*x]

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83

method result size
risch \(4 x^{2} \ln \left (3 x \right )-2 \ln \left (x \right )\) \(15\)
parts \(4 x^{2} \ln \left (3 x \right )-2 \ln \left (x \right )\) \(15\)
derivativedivides \(4 x^{2} \ln \left (3 x \right )-2 \ln \left (3 x \right )\) \(17\)
default \(4 x^{2} \ln \left (3 x \right )-2 \ln \left (3 x \right )\) \(17\)
norman \(4 x^{2} \ln \left (3 x \right )-2 \ln \left (3 x \right )\) \(17\)
parallelrisch \(4 x^{2} \ln \left (3 x \right )-2 \ln \left (3 x \right )\) \(17\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

2*(2*x^2 - 1)*log(3*x)

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.78 \[ \int \frac {-2+4 x^2+8 x^2 \log (3 x)}{x} \, dx=4 \, x^{2} \log \left (3 \, x\right ) - 2 \, \log \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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