\(\int \frac {e^x (1-x)+e^2 (-20 x+11 x^2)+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx\) [10185]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 40, antiderivative size = 26 \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx=3 (-3+x)-\frac {e^{-2+x}}{x}+(-5+x) (4+4 \log (x)) \]

[Out]

(4*ln(x)+4)*(-5+x)-exp(x)/exp(2)/x+3*x-9

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 14, 2228, 45, 2332} \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx=7 x-\frac {e^{x-2}}{x}+4 x \log (x)-20 \log (x) \]

[In]

Int[(E^x*(1 - x) + E^2*(-20*x + 11*x^2) + 4*E^2*x^2*Log[x])/(E^2*x^2),x]

[Out]

-(E^(-2 + x)/x) + 7*x - 20*Log[x] + 4*x*Log[x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, 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}& = \frac {\int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{x^2} \, dx}{e^2} \\ & = \frac {\int \left (-\frac {e^x (-1+x)}{x^2}+\frac {e^2 (-20+11 x+4 x \log (x))}{x}\right ) \, dx}{e^2} \\ & = -\frac {\int \frac {e^x (-1+x)}{x^2} \, dx}{e^2}+\int \frac {-20+11 x+4 x \log (x)}{x} \, dx \\ & = -\frac {e^{-2+x}}{x}+\int \left (\frac {-20+11 x}{x}+4 \log (x)\right ) \, dx \\ & = -\frac {e^{-2+x}}{x}+4 \int \log (x) \, dx+\int \frac {-20+11 x}{x} \, dx \\ & = -\frac {e^{-2+x}}{x}-4 x+4 x \log (x)+\int \left (11-\frac {20}{x}\right ) \, dx \\ & = -\frac {e^{-2+x}}{x}+7 x-20 \log (x)+4 x \log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88 \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx=-\frac {e^{-2+x}}{x}+7 x-20 \log (x)+4 x \log (x) \]

[In]

Integrate[(E^x*(1 - x) + E^2*(-20*x + 11*x^2) + 4*E^2*x^2*Log[x])/(E^2*x^2),x]

[Out]

-(E^(-2 + x)/x) + 7*x - 20*Log[x] + 4*x*Log[x]

Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.96

method result size
parts \(7 x -20 \ln \left (x \right )-\frac {{\mathrm e}^{x} {\mathrm e}^{-2}}{x}+4 x \ln \left (x \right )\) \(25\)
risch \(-\frac {20 x \ln \left (x \right )-7 x^{2}-4 x^{2} \ln \left (x \right )+{\mathrm e}^{-2+x}}{x}\) \(28\)
norman \(\frac {-20 x \ln \left (x \right )+7 x^{2}+4 x^{2} \ln \left (x \right )-{\mathrm e}^{-2} {\mathrm e}^{x}}{x}\) \(31\)
default \({\mathrm e}^{-2} \left ({\mathrm e}^{2} \left (11 x -20 \ln \left (x \right )\right )+4 \,{\mathrm e}^{2} \left (x \ln \left (x \right )-x \right )-\frac {{\mathrm e}^{x}}{x}\right )\) \(37\)
parallelrisch \(\frac {{\mathrm e}^{-2} \left (4 x^{2} {\mathrm e}^{2} \ln \left (x \right )+7 x^{2} {\mathrm e}^{2}-20 x \,{\mathrm e}^{2} \ln \left (x \right )-{\mathrm e}^{x}\right )}{x}\) \(37\)

[In]

int((4*x^2*exp(2)*ln(x)+(1-x)*exp(x)+(11*x^2-20*x)*exp(2))/x^2/exp(2),x,method=_RETURNVERBOSE)

[Out]

7*x-20*ln(x)-exp(x)/exp(2)/x+4*x*ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.19 \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx=\frac {{\left (7 \, x^{2} e^{2} + 4 \, {\left (x^{2} - 5 \, x\right )} e^{2} \log \left (x\right ) - e^{x}\right )} e^{\left (-2\right )}}{x} \]

[In]

integrate((4*x^2*exp(2)*log(x)+(1-x)*exp(x)+(11*x^2-20*x)*exp(2))/x^2/exp(2),x, algorithm="fricas")

[Out]

(7*x^2*e^2 + 4*(x^2 - 5*x)*e^2*log(x) - e^x)*e^(-2)/x

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx=4 x \log {\left (x \right )} + 7 x - 20 \log {\left (x \right )} - \frac {e^{x}}{x e^{2}} \]

[In]

integrate((4*x**2*exp(2)*ln(x)+(1-x)*exp(x)+(11*x**2-20*x)*exp(2))/x**2/exp(2),x)

[Out]

4*x*log(x) + 7*x - 20*log(x) - exp(-2)*exp(x)/x

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.21 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.38 \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx={\left (4 \, {\left (x \log \left (x\right ) - x\right )} e^{2} + 11 \, x e^{2} - 20 \, e^{2} \log \left (x\right ) - {\rm Ei}\left (x\right ) + \Gamma \left (-1, -x\right )\right )} e^{\left (-2\right )} \]

[In]

integrate((4*x^2*exp(2)*log(x)+(1-x)*exp(x)+(11*x^2-20*x)*exp(2))/x^2/exp(2),x, algorithm="maxima")

[Out]

(4*(x*log(x) - x)*e^2 + 11*x*e^2 - 20*e^2*log(x) - Ei(x) + gamma(-1, -x))*e^(-2)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.31 \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx=\frac {{\left (4 \, x^{2} e^{2} \log \left (x\right ) + 7 \, x^{2} e^{2} - 20 \, x e^{2} \log \left (x\right ) - e^{x}\right )} e^{\left (-2\right )}}{x} \]

[In]

integrate((4*x^2*exp(2)*log(x)+(1-x)*exp(x)+(11*x^2-20*x)*exp(2))/x^2/exp(2),x, algorithm="giac")

[Out]

(4*x^2*e^2*log(x) + 7*x^2*e^2 - 20*x*e^2*log(x) - e^x)*e^(-2)/x

Mupad [B] (verification not implemented)

Time = 15.89 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.85 \[ \int \frac {e^x (1-x)+e^2 \left (-20 x+11 x^2\right )+4 e^2 x^2 \log (x)}{e^2 x^2} \, dx=x\,\left (4\,\ln \left (x\right )+7\right )-\frac {{\mathrm {e}}^{x-2}}{x}-20\,\ln \left (x\right ) \]

[In]

int(-(exp(-2)*(exp(x)*(x - 1) + exp(2)*(20*x - 11*x^2) - 4*x^2*exp(2)*log(x)))/x^2,x)

[Out]

x*(4*log(x) + 7) - exp(x - 2)/x - 20*log(x)