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

   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 = 42, antiderivative size = 20 \[ \int \frac {x+e^x x+2 x^2+3 x^3+\left (4+4 x^2\right ) \log ^3(x)+2 x^2 \log ^4(x)}{x} \, dx=e^x+x \left (x+\left (\frac {1}{x}+x\right ) \left (x+\log ^4(x)\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.15, number of steps used = 16, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {14, 2225, 2395, 2339, 30, 2342, 2341} \[ \int \frac {x+e^x x+2 x^2+3 x^3+\left (4+4 x^2\right ) \log ^3(x)+2 x^2 \log ^4(x)}{x} \, dx=x^3+x^2+x^2 \log ^4(x)+e^x+x+\log ^4(x) \]

[In]

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

[Out]

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

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

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

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
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2395

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.15 \[ \int \frac {x+e^x x+2 x^2+3 x^3+\left (4+4 x^2\right ) \log ^3(x)+2 x^2 \log ^4(x)}{x} \, dx=e^x+x+x^2+x^3+\log ^4(x)+x^2 \log ^4(x) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.05

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

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

Time = 0.21 (sec) , antiderivative size = 66, normalized size of antiderivative = 3.30 \[ \int \frac {x+e^x x+2 x^2+3 x^3+\left (4+4 x^2\right ) \log ^3(x)+2 x^2 \log ^4(x)}{x} \, dx=\log \left (x\right )^{4} + \frac {1}{2} \, {\left (2 \, \log \left (x\right )^{4} - 4 \, \log \left (x\right )^{3} + 6 \, \log \left (x\right )^{2} - 6 \, \log \left (x\right ) + 3\right )} x^{2} + \frac {1}{2} \, {\left (4 \, \log \left (x\right )^{3} - 6 \, \log \left (x\right )^{2} + 6 \, \log \left (x\right ) - 3\right )} x^{2} + x^{3} + x^{2} + x + e^{x} \]

[In]

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

[Out]

log(x)^4 + 1/2*(2*log(x)^4 - 4*log(x)^3 + 6*log(x)^2 - 6*log(x) + 3)*x^2 + 1/2*(4*log(x)^3 - 6*log(x)^2 + 6*lo
g(x) - 3)*x^2 + x^3 + x^2 + x + e^x

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.39 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {x+e^x x+2 x^2+3 x^3+\left (4+4 x^2\right ) \log ^3(x)+2 x^2 \log ^4(x)}{x} \, dx=x+{\mathrm {e}}^x+x^2+x^3+{\ln \left (x\right )}^4\,\left (x^2+1\right ) \]

[In]

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

[Out]

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