\(\int \frac {2+e^x x}{x} \, dx\) [4210]

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

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.42, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {14, 2225} \[ \int \frac {2+e^x x}{x} \, dx=e^x+2 \log (x) \]

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.42 \[ \int \frac {2+e^x x}{x} \, dx=e^x+2 \log (x) \]

[In]

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

[Out]

E^x + 2*Log[x]

Maple [A] (verified)

Time = 0.24 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.42

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

[In]

int((exp(x)*x+2)/x,x,method=_RETURNVERBOSE)

[Out]

2*ln(x)+exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.37 \[ \int \frac {2+e^x x}{x} \, dx=e^{x} + 2 \, \log \left (x\right ) \]

[In]

integrate((exp(x)*x+2)/x,x, algorithm="fricas")

[Out]

e^x + 2*log(x)

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.37 \[ \int \frac {2+e^x x}{x} \, dx=e^{x} + 2 \log {\left (x \right )} \]

[In]

integrate((exp(x)*x+2)/x,x)

[Out]

exp(x) + 2*log(x)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.37 \[ \int \frac {2+e^x x}{x} \, dx=e^{x} + 2 \, \log \left (x\right ) \]

[In]

integrate((exp(x)*x+2)/x,x, algorithm="maxima")

[Out]

e^x + 2*log(x)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.37 \[ \int \frac {2+e^x x}{x} \, dx=e^{x} + 2 \, \log \left (x\right ) \]

[In]

integrate((exp(x)*x+2)/x,x, algorithm="giac")

[Out]

e^x + 2*log(x)

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.37 \[ \int \frac {2+e^x x}{x} \, dx={\mathrm {e}}^x+2\,\ln \left (x\right ) \]

[In]

int((x*exp(x) + 2)/x,x)

[Out]

exp(x) + 2*log(x)