\(\int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx\) [9433]

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

[Out]

6*ln(x)*(-3+x)-4/3+3*x+exp(x)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89, number of steps used = 8, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {14, 2225, 45, 2332} \[ \int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx=3 x+e^x+6 x \log (x)-18 \log (x) \]

[In]

Int[(-18 + 9*x + E^x*x + 6*x*Log[x])/x,x]

[Out]

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

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

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 2332

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

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89 \[ \int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx=e^x+3 x-18 \log (x)+6 x \log (x) \]

[In]

Integrate[(-18 + 9*x + E^x*x + 6*x*Log[x])/x,x]

[Out]

E^x + 3*x - 18*Log[x] + 6*x*Log[x]

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.89

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

[In]

int((6*x*ln(x)+exp(x)*x+9*x-18)/x,x,method=_RETURNVERBOSE)

[Out]

3*x-18*ln(x)+6*x*ln(x)+exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.72 \[ \int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx=6 \, {\left (x - 3\right )} \log \left (x\right ) + 3 \, x + e^{x} \]

[In]

integrate((6*x*log(x)+exp(x)*x+9*x-18)/x,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.94 \[ \int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx=6 x \log {\left (x \right )} + 3 x + e^{x} - 18 \log {\left (x \right )} \]

[In]

integrate((6*x*ln(x)+exp(x)*x+9*x-18)/x,x)

[Out]

6*x*log(x) + 3*x + exp(x) - 18*log(x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx=6 \, x \log \left (x\right ) + 3 \, x + e^{x} - 18 \, \log \left (x\right ) \]

[In]

integrate((6*x*log(x)+exp(x)*x+9*x-18)/x,x, algorithm="maxima")

[Out]

6*x*log(x) + 3*x + e^x - 18*log(x)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx=6 \, x \log \left (x\right ) + 3 \, x + e^{x} - 18 \, \log \left (x\right ) \]

[In]

integrate((6*x*log(x)+exp(x)*x+9*x-18)/x,x, algorithm="giac")

[Out]

6*x*log(x) + 3*x + e^x - 18*log(x)

Mupad [B] (verification not implemented)

Time = 13.61 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {-18+9 x+e^x x+6 x \log (x)}{x} \, dx=3\,x+{\mathrm {e}}^x-18\,\ln \left (x\right )+6\,x\,\ln \left (x\right ) \]

[In]

int((9*x + x*exp(x) + 6*x*log(x) - 18)/x,x)

[Out]

3*x + exp(x) - 18*log(x) + 6*x*log(x)