\(\int \frac {3+6 x^2+e^x x^2+(12 x^2+e^x (2 x^2+x^3)) \log (x)}{x} \, dx\) [9431]

   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 = 40, antiderivative size = 16 \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx=\left (6+e^x+\frac {3}{x^2}\right ) x^2 \log (x) \]

[Out]

(6+exp(x)+3/x^2)*x^2*ln(x)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31, number of steps used = 8, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {14, 2326, 2341} \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx=e^x x^2 \log (x)+6 x^2 \log (x)+3 \log (x) \]

[In]

Int[(3 + 6*x^2 + E^x*x^2 + (12*x^2 + E^x*(2*x^2 + x^3))*Log[x])/x,x]

[Out]

3*Log[x] + 6*x^2*Log[x] + E^x*x^2*Log[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 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, 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
]

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

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx=\left (3+\left (6+e^x\right ) x^2\right ) \log (x) \]

[In]

Integrate[(3 + 6*x^2 + E^x*x^2 + (12*x^2 + E^x*(2*x^2 + x^3))*Log[x])/x,x]

[Out]

(3 + (6 + E^x)*x^2)*Log[x]

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31

method result size
default \(x^{2} {\mathrm e}^{x} \ln \left (x \right )+6 x^{2} \ln \left (x \right )+3 \ln \left (x \right )\) \(21\)
norman \(x^{2} {\mathrm e}^{x} \ln \left (x \right )+6 x^{2} \ln \left (x \right )+3 \ln \left (x \right )\) \(21\)
risch \(\left ({\mathrm e}^{x} x^{2}+6 x^{2}\right ) \ln \left (x \right )+3 \ln \left (x \right )\) \(21\)
parallelrisch \(x^{2} {\mathrm e}^{x} \ln \left (x \right )+6 x^{2} \ln \left (x \right )+3 \ln \left (x \right )\) \(21\)
parts \(x^{2} {\mathrm e}^{x} \ln \left (x \right )+6 x^{2} \ln \left (x \right )+3 \ln \left (x \right )\) \(21\)

[In]

int((((x^3+2*x^2)*exp(x)+12*x^2)*ln(x)+exp(x)*x^2+6*x^2+3)/x,x,method=_RETURNVERBOSE)

[Out]

x^2*exp(x)*ln(x)+6*x^2*ln(x)+3*ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx={\left (x^{2} e^{x} + 6 \, x^{2} + 3\right )} \log \left (x\right ) \]

[In]

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

[Out]

(x^2*e^x + 6*x^2 + 3)*log(x)

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.38 \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx=x^{2} e^{x} \log {\left (x \right )} + 6 x^{2} \log {\left (x \right )} + 3 \log {\left (x \right )} \]

[In]

integrate((((x**3+2*x**2)*exp(x)+12*x**2)*ln(x)+exp(x)*x**2+6*x**2+3)/x,x)

[Out]

x**2*exp(x)*log(x) + 6*x**2*log(x) + 3*log(x)

Maxima [B] (verification not implemented)

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

Time = 0.25 (sec) , antiderivative size = 32, normalized size of antiderivative = 2.00 \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx=6 \, x^{2} \log \left (x\right ) + {\left (x^{2} \log \left (x\right ) - x + 1\right )} e^{x} + {\left (x - 1\right )} e^{x} + 3 \, \log \left (x\right ) \]

[In]

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

[Out]

6*x^2*log(x) + (x^2*log(x) - x + 1)*e^x + (x - 1)*e^x + 3*log(x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx=x^{2} e^{x} \log \left (x\right ) + 6 \, x^{2} \log \left (x\right ) + 3 \, \log \left (x\right ) \]

[In]

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

[Out]

x^2*e^x*log(x) + 6*x^2*log(x) + 3*log(x)

Mupad [B] (verification not implemented)

Time = 14.57 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \frac {3+6 x^2+e^x x^2+\left (12 x^2+e^x \left (2 x^2+x^3\right )\right ) \log (x)}{x} \, dx=\ln \left (x\right )\,\left (x^2\,{\mathrm {e}}^x+6\,x^2+3\right ) \]

[In]

int((x^2*exp(x) + log(x)*(exp(x)*(2*x^2 + x^3) + 12*x^2) + 6*x^2 + 3)/x,x)

[Out]

log(x)*(x^2*exp(x) + 6*x^2 + 3)