\(\int \frac {1+7 x+13 x^2+x^3+(x+2 x^2) \log (2 x)+(x+2 x^2) \log (e^{-1+x} x)}{x} \, dx\) [7449]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [B] (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 = 45, antiderivative size = 23 \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=\log (x)+\left (x+x^2\right ) \left (5+\log (2 x)+\log \left (e^{-1+x} x\right )\right ) \]

[Out]

(x^2+x)*(5+ln(x*exp(-1+x))+ln(2*x))+ln(x)

Rubi [B] (verified)

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

Time = 0.04 (sec) , antiderivative size = 50, normalized size of antiderivative = 2.17, number of steps used = 10, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {14, 2350, 2631} \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=5 x^2+x^2 \log (2 x)+\frac {19 x}{4}+x \log (2 x)+\frac {3 \log (x)}{4}+\frac {1}{4} (2 x+1)^2 \log \left (e^{x-1} x\right ) \]

[In]

Int[(1 + 7*x + 13*x^2 + x^3 + (x + 2*x^2)*Log[2*x] + (x + 2*x^2)*Log[E^(-1 + x)*x])/x,x]

[Out]

(19*x)/4 + 5*x^2 + (3*Log[x])/4 + x*Log[2*x] + x^2*Log[2*x] + ((1 + 2*x)^2*Log[E^(-1 + x)*x])/4

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 2350

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(d +
 e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b
, c, d, e, n, r}, x] && IGtQ[q, 0]

Rule 2631

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1)*(Log[u]/(b*(m + 1))), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

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

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=\log (x)+x (1+x) \left (5+\log (2 x)+\log \left (e^{-1+x} x\right )\right ) \]

[In]

Integrate[(1 + 7*x + 13*x^2 + x^3 + (x + 2*x^2)*Log[2*x] + (x + 2*x^2)*Log[E^(-1 + x)*x])/x,x]

[Out]

Log[x] + x*(1 + x)*(5 + Log[2*x] + Log[E^(-1 + x)*x])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(45\) vs. \(2(22)=44\).

Time = 0.05 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.00

method result size
parallelrisch \(5 x +x^{2} \ln \left (2 x \right )+x \ln \left (2 x \right )+\ln \left (x \right )+5 x^{2}+\ln \left (x \,{\mathrm e}^{-1+x}\right ) x^{2}+\ln \left (x \,{\mathrm e}^{-1+x}\right ) x\) \(46\)
default \(\ln \left (x \,{\mathrm e}^{-1+x}\right ) x^{2}+\ln \left (x \,{\mathrm e}^{-1+x}\right ) x +5 x^{2}+5 x +\frac {7}{3}+x^{2} \ln \left (2 x \right )+x \ln \left (2 x \right )+\ln \left (x \right )\) \(47\)
parts \(\ln \left (x \,{\mathrm e}^{-1+x}\right ) x^{2}+\ln \left (x \,{\mathrm e}^{-1+x}\right ) x +5 x^{2}+5 x +\frac {7}{3}+x^{2} \ln \left (2 x \right )+x \ln \left (2 x \right )+\ln \left (x \right )\) \(47\)

[In]

int(((2*x^2+x)*ln(x*exp(-1+x))+(2*x^2+x)*ln(2*x)+x^3+13*x^2+7*x+1)/x,x,method=_RETURNVERBOSE)

[Out]

5*x+x^2*ln(2*x)+x*ln(2*x)+ln(x)+5*x^2+ln(x*exp(-1+x))*x^2+ln(x*exp(-1+x))*x

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.57 \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=x^{3} + 5 \, x^{2} - {\left (x^{2} + x\right )} \log \left (2\right ) + {\left (2 \, x^{2} + 2 \, x + 1\right )} \log \left (2 \, x\right ) + 4 \, x \]

[In]

integrate(((2*x^2+x)*log(x*exp(-1+x))+(2*x^2+x)*log(2*x)+x^3+13*x^2+7*x+1)/x,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.48 \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=x^{3} + x^{2} \cdot \left (5 - \log {\left (2 \right )}\right ) + x \left (4 - \log {\left (2 \right )}\right ) + \left (2 x^{2} + 2 x\right ) \log {\left (2 x \right )} + \log {\left (x \right )} \]

[In]

integrate(((2*x**2+x)*ln(x*exp(-1+x))+(2*x**2+x)*ln(2*x)+x**3+13*x**2+7*x+1)/x,x)

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (22) = 44\).

Time = 0.20 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.96 \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=x^{2} \log \left (x e^{\left (x - 1\right )}\right ) + x^{2} \log \left (2 \, x\right ) + 5 \, x^{2} + x \log \left (x e^{\left (x - 1\right )}\right ) + x \log \left (2 \, x\right ) + 5 \, x + \log \left (x\right ) \]

[In]

integrate(((2*x^2+x)*log(x*exp(-1+x))+(2*x^2+x)*log(2*x)+x^3+13*x^2+7*x+1)/x,x, algorithm="maxima")

[Out]

x^2*log(x*e^(x - 1)) + x^2*log(2*x) + 5*x^2 + x*log(x*e^(x - 1)) + x*log(2*x) + 5*x + log(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26 \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=x^{3} + x^{2} {\left (\log \left (2\right ) + 5\right )} + x {\left (\log \left (2\right ) + 4\right )} + 2 \, {\left (x^{2} + x\right )} \log \left (x\right ) + \log \left (x\right ) \]

[In]

integrate(((2*x^2+x)*log(x*exp(-1+x))+(2*x^2+x)*log(2*x)+x^3+13*x^2+7*x+1)/x,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.30 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.57 \[ \int \frac {1+7 x+13 x^2+x^3+\left (x+2 x^2\right ) \log (2 x)+\left (x+2 x^2\right ) \log \left (e^{-1+x} x\right )}{x} \, dx=4\,x+\ln \left (x\right )+2\,x^2\,\ln \left (x\right )+x\,\ln \left (2\right )+x^2\,\ln \left (2\right )+2\,x\,\ln \left (x\right )+5\,x^2+x^3 \]

[In]

int((7*x + log(2*x)*(x + 2*x^2) + 13*x^2 + x^3 + log(x*exp(x - 1))*(x + 2*x^2) + 1)/x,x)

[Out]

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