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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (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 = 57, antiderivative size = 29 \[ \int \frac {x+2 e^{2 x} x+2 x^2+12 x^3+4 x^4+e^x \left (2+2 x+2 x^2\right )+\left (2+2 x+2 e^x x\right ) \log (x)}{x} \, dx=-x+\frac {1}{3} x^3 (-x+4 (3+x))+\left (e^x+x+\log (x)\right )^2 \]

[Out]

1/3*x^3*(3*x+12)+(x+ln(x)+exp(x))^2-x

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.55, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {14, 2225, 2326, 2388, 2338, 2332} \[ \int \frac {x+2 e^{2 x} x+2 x^2+12 x^3+4 x^4+e^x \left (2+2 x+2 x^2\right )+\left (2+2 x+2 e^x x\right ) \log (x)}{x} \, dx=x^4+4 x^3+x^2+\frac {2 e^x \left (x^2+x \log (x)\right )}{x}-x+e^{2 x}+\log ^2(x)+2 x \log (x) \]

[In]

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

[Out]

E^(2*x) - x + x^2 + 4*x^3 + x^4 + 2*x*Log[x] + Log[x]^2 + (2*E^x*(x^2 + x*Log[x]))/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 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

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 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

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 2388

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[(d
+ e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x), x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.23 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.38

method result size
default \(x^{4}+4 x^{3}+\ln \left (x \right )^{2}+2 \,{\mathrm e}^{x} \ln \left (x \right )+2 x \ln \left (x \right )+2 \,{\mathrm e}^{x} x +x^{2}+{\mathrm e}^{2 x}-x\) \(40\)
risch \(\ln \left (x \right )^{2}+\left (2 \,{\mathrm e}^{x}+2 x \right ) \ln \left (x \right )+x^{4}+4 x^{3}+x^{2}+2 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x}-x\) \(40\)
parallelrisch \(x^{4}+4 x^{3}+\ln \left (x \right )^{2}+2 \,{\mathrm e}^{x} \ln \left (x \right )+2 x \ln \left (x \right )+2 \,{\mathrm e}^{x} x +x^{2}+{\mathrm e}^{2 x}-x\) \(40\)
parts \(x^{4}+4 x^{3}+\ln \left (x \right )^{2}+2 \,{\mathrm e}^{x} \ln \left (x \right )+2 x \ln \left (x \right )+2 \,{\mathrm e}^{x} x +x^{2}+{\mathrm e}^{2 x}-x\) \(40\)

[In]

int(((2*exp(x)*x+2*x+2)*ln(x)+2*x*exp(x)^2+(2*x^2+2*x+2)*exp(x)+4*x^4+12*x^3+2*x^2+x)/x,x,method=_RETURNVERBOS
E)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.24 \[ \int \frac {x+2 e^{2 x} x+2 x^2+12 x^3+4 x^4+e^x \left (2+2 x+2 x^2\right )+\left (2+2 x+2 e^x x\right ) \log (x)}{x} \, dx=x^{4} + 4 \, x^{3} + x^{2} + 2 \, x e^{x} + 2 \, {\left (x + e^{x}\right )} \log \left (x\right ) + \log \left (x\right )^{2} - x + e^{\left (2 \, x\right )} \]

[In]

integrate(((2*exp(x)*x+2*x+2)*log(x)+2*x*exp(x)^2+(2*x^2+2*x+2)*exp(x)+4*x^4+12*x^3+2*x^2+x)/x,x, algorithm="f
ricas")

[Out]

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

Sympy [B] (verification not implemented)

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

Time = 0.17 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.41 \[ \int \frac {x+2 e^{2 x} x+2 x^2+12 x^3+4 x^4+e^x \left (2+2 x+2 x^2\right )+\left (2+2 x+2 e^x x\right ) \log (x)}{x} \, dx=x^{4} + 4 x^{3} + x^{2} + 2 x \log {\left (x \right )} - x + \left (2 x + 2 \log {\left (x \right )}\right ) e^{x} + e^{2 x} + \log {\left (x \right )}^{2} \]

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

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

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

[In]

integrate(((2*exp(x)*x+2*x+2)*log(x)+2*x*exp(x)^2+(2*x^2+2*x+2)*exp(x)+4*x^4+12*x^3+2*x^2+x)/x,x, algorithm="m
axima")

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.34 \[ \int \frac {x+2 e^{2 x} x+2 x^2+12 x^3+4 x^4+e^x \left (2+2 x+2 x^2\right )+\left (2+2 x+2 e^x x\right ) \log (x)}{x} \, dx=x^{4} + 4 \, x^{3} + x^{2} + 2 \, x e^{x} + 2 \, x \log \left (x\right ) + 2 \, e^{x} \log \left (x\right ) + \log \left (x\right )^{2} - x + e^{\left (2 \, x\right )} \]

[In]

integrate(((2*exp(x)*x+2*x+2)*log(x)+2*x*exp(x)^2+(2*x^2+2*x+2)*exp(x)+4*x^4+12*x^3+2*x^2+x)/x,x, algorithm="g
iac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 16.08 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.34 \[ \int \frac {x+2 e^{2 x} x+2 x^2+12 x^3+4 x^4+e^x \left (2+2 x+2 x^2\right )+\left (2+2 x+2 e^x x\right ) \log (x)}{x} \, dx={\mathrm {e}}^{2\,x}-x+2\,{\mathrm {e}}^x\,\ln \left (x\right )+{\ln \left (x\right )}^2+2\,x\,{\mathrm {e}}^x+2\,x\,\ln \left (x\right )+x^2+4\,x^3+x^4 \]

[In]

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

[Out]

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