3.24.9 \(\int \frac {x+e^x (1-55 x-73 x^2-36 x^3-24 x^4-6 x^5+e^2 (4 x^2+2 x^3))+e^x x \log (x)}{x} \, dx\) [2309]

Optimal. Leaf size=32 \[ x+e^x \left (-x+2 x^2 \left (e^2-3 \left (\frac {3}{x}+x\right )^2\right )+\log (x)\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(85\) vs. \(2(32)=64\).
time = 0.39, antiderivative size = 85, normalized size of antiderivative = 2.66, number of steps used = 24, number of rules used = 7, integrand size = 57, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.123, Rules used = {14, 6874, 2230, 2225, 2209, 2207, 2634} \begin {gather*} -6 e^x x^4-2 \left (18-e^2\right ) e^x x^2+4 \left (18-e^2\right ) e^x x-\left (73-4 e^2\right ) e^x x+x-55 e^x-4 \left (18-e^2\right ) e^x+\left (73-4 e^2\right ) e^x+e^x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x + E^x*(1 - 55*x - 73*x^2 - 36*x^3 - 24*x^4 - 6*x^5 + E^2*(4*x^2 + 2*x^3)) + E^x*x*Log[x])/x,x]

[Out]

-55*E^x + E^x*(73 - 4*E^2) - 4*E^x*(18 - E^2) + x - E^x*(73 - 4*E^2)*x + 4*E^x*(18 - E^2)*x - 2*E^x*(18 - E^2)
*x^2 - 6*E^x*x^4 + E^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 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

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 2230

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !TrueQ[$UseGamma]

Rule 2634

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*(D[u, x]
/u), x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (1+\frac {e^x \left (1-55 x-73 \left (1-\frac {4 e^2}{73}\right ) x^2-36 \left (1-\frac {e^2}{18}\right ) x^3-24 x^4-6 x^5+x \log (x)\right )}{x}\right ) \, dx\\ &=x+\int \frac {e^x \left (1-55 x-73 \left (1-\frac {4 e^2}{73}\right ) x^2-36 \left (1-\frac {e^2}{18}\right ) x^3-24 x^4-6 x^5+x \log (x)\right )}{x} \, dx\\ &=x+\int \left (\frac {e^x \left (1-55 x-73 \left (1-\frac {4 e^2}{73}\right ) x^2-36 \left (1-\frac {e^2}{18}\right ) x^3-24 x^4-6 x^5\right )}{x}+e^x \log (x)\right ) \, dx\\ &=x+\int \frac {e^x \left (1-55 x-73 \left (1-\frac {4 e^2}{73}\right ) x^2-36 \left (1-\frac {e^2}{18}\right ) x^3-24 x^4-6 x^5\right )}{x} \, dx+\int e^x \log (x) \, dx\\ &=x+e^x \log (x)-\int \frac {e^x}{x} \, dx+\int \left (-55 e^x+\frac {e^x}{x}-e^x \left (73-4 e^2\right ) x-2 e^x \left (18-e^2\right ) x^2-24 e^x x^3-6 e^x x^4\right ) \, dx\\ &=x-\text {Ei}(x)+e^x \log (x)-6 \int e^x x^4 \, dx-24 \int e^x x^3 \, dx-55 \int e^x \, dx-\left (2 \left (18-e^2\right )\right ) \int e^x x^2 \, dx+\left (-73+4 e^2\right ) \int e^x x \, dx+\int \frac {e^x}{x} \, dx\\ &=-55 e^x+x-e^x \left (73-4 e^2\right ) x-2 e^x \left (18-e^2\right ) x^2-24 e^x x^3-6 e^x x^4+e^x \log (x)+24 \int e^x x^3 \, dx+72 \int e^x x^2 \, dx+\left (73-4 e^2\right ) \int e^x \, dx+\left (4 \left (18-e^2\right )\right ) \int e^x x \, dx\\ &=-55 e^x+e^x \left (73-4 e^2\right )+x-e^x \left (73-4 e^2\right ) x+4 e^x \left (18-e^2\right ) x+72 e^x x^2-2 e^x \left (18-e^2\right ) x^2-6 e^x x^4+e^x \log (x)-72 \int e^x x^2 \, dx-144 \int e^x x \, dx-\left (4 \left (18-e^2\right )\right ) \int e^x \, dx\\ &=-55 e^x+e^x \left (73-4 e^2\right )-4 e^x \left (18-e^2\right )+x-144 e^x x-e^x \left (73-4 e^2\right ) x+4 e^x \left (18-e^2\right ) x-2 e^x \left (18-e^2\right ) x^2-6 e^x x^4+e^x \log (x)+144 \int e^x \, dx+144 \int e^x x \, dx\\ &=89 e^x+e^x \left (73-4 e^2\right )-4 e^x \left (18-e^2\right )+x-e^x \left (73-4 e^2\right ) x+4 e^x \left (18-e^2\right ) x-2 e^x \left (18-e^2\right ) x^2-6 e^x x^4+e^x \log (x)-144 \int e^x \, dx\\ &=-55 e^x+e^x \left (73-4 e^2\right )-4 e^x \left (18-e^2\right )+x-e^x \left (73-4 e^2\right ) x+4 e^x \left (18-e^2\right ) x-2 e^x \left (18-e^2\right ) x^2-6 e^x x^4+e^x \log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.21, size = 36, normalized size = 1.12 \begin {gather*} x+2 e^{2+x} x^2-e^x \left (54+x+36 x^2+6 x^4\right )+e^x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x + E^x*(1 - 55*x - 73*x^2 - 36*x^3 - 24*x^4 - 6*x^5 + E^2*(4*x^2 + 2*x^3)) + E^x*x*Log[x])/x,x]

[Out]

x + 2*E^(2 + x)*x^2 - E^x*(54 + x + 36*x^2 + 6*x^4) + E^x*Log[x]

________________________________________________________________________________________

Maple [A]
time = 0.16, size = 40, normalized size = 1.25

method result size
risch \(-6 \,{\mathrm e}^{x} x^{4}+2 x^{2} {\mathrm e}^{2+x}-36 \,{\mathrm e}^{x} x^{2}-{\mathrm e}^{x} x +{\mathrm e}^{x} \ln \left (x \right )+x -54 \,{\mathrm e}^{x}\) \(40\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*exp(x)*ln(x)+((2*x^3+4*x^2)*exp(2)-6*x^5-24*x^4-36*x^3-73*x^2-55*x+1)*exp(x)+x)/x,x,method=_RETURNVERBO
SE)

[Out]

-6*exp(x)*x^4+2*x^2*exp(2+x)-36*exp(x)*x^2-exp(x)*x+exp(x)*ln(x)+x-54*exp(x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 102 vs. \(2 (33) = 66\).
time = 0.29, size = 102, normalized size = 3.19 \begin {gather*} -6 \, {\left (x^{4} - 4 \, x^{3} + 12 \, x^{2} - 24 \, x + 24\right )} e^{x} - 24 \, {\left (x^{3} - 3 \, x^{2} + 6 \, x - 6\right )} e^{x} + 2 \, {\left (x^{2} e^{2} - 2 \, x e^{2} + 2 \, e^{2}\right )} e^{x} - 36 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 4 \, {\left (x e^{2} - e^{2}\right )} e^{x} - 73 \, {\left (x - 1\right )} e^{x} + e^{x} \log \left (x\right ) + x - 55 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x*exp(x)*log(x)+((2*x^3+4*x^2)*exp(2)-6*x^5-24*x^4-36*x^3-73*x^2-55*x+1)*exp(x)+x)/x,x, algorithm="
maxima")

[Out]

-6*(x^4 - 4*x^3 + 12*x^2 - 24*x + 24)*e^x - 24*(x^3 - 3*x^2 + 6*x - 6)*e^x + 2*(x^2*e^2 - 2*x*e^2 + 2*e^2)*e^x
 - 36*(x^2 - 2*x + 2)*e^x + 4*(x*e^2 - e^2)*e^x - 73*(x - 1)*e^x + e^x*log(x) + x - 55*e^x

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 31, normalized size = 0.97 \begin {gather*} -{\left (6 \, x^{4} - 2 \, x^{2} e^{2} + 36 \, x^{2} + x + 54\right )} e^{x} + e^{x} \log \left (x\right ) + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x*exp(x)*log(x)+((2*x^3+4*x^2)*exp(2)-6*x^5-24*x^4-36*x^3-73*x^2-55*x+1)*exp(x)+x)/x,x, algorithm="
fricas")

[Out]

-(6*x^4 - 2*x^2*e^2 + 36*x^2 + x + 54)*e^x + e^x*log(x) + x

________________________________________________________________________________________

Sympy [A]
time = 0.13, size = 29, normalized size = 0.91 \begin {gather*} x + \left (- 6 x^{4} - 36 x^{2} + 2 x^{2} e^{2} - x + \log {\left (x \right )} - 54\right ) e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x*exp(x)*ln(x)+((2*x**3+4*x**2)*exp(2)-6*x**5-24*x**4-36*x**3-73*x**2-55*x+1)*exp(x)+x)/x,x)

[Out]

x + (-6*x**4 - 36*x**2 + 2*x**2*exp(2) - x + log(x) - 54)*exp(x)

________________________________________________________________________________________

Giac [A]
time = 0.38, size = 39, normalized size = 1.22 \begin {gather*} -6 \, x^{4} e^{x} + 2 \, x^{2} e^{\left (x + 2\right )} - 36 \, x^{2} e^{x} - x e^{x} + e^{x} \log \left (x\right ) + x - 54 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x*exp(x)*log(x)+((2*x^3+4*x^2)*exp(2)-6*x^5-24*x^4-36*x^3-73*x^2-55*x+1)*exp(x)+x)/x,x, algorithm="
giac")

[Out]

-6*x^4*e^x + 2*x^2*e^(x + 2) - 36*x^2*e^x - x*e^x + e^x*log(x) + x - 54*e^x

________________________________________________________________________________________

Mupad [B]
time = 1.55, size = 30, normalized size = 0.94 \begin {gather*} x+{\mathrm {e}}^x\,\ln \left (x\right )-{\mathrm {e}}^x\,\left (6\,x^4+\left (36-2\,{\mathrm {e}}^2\right )\,x^2+x+54\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x - exp(x)*(55*x - exp(2)*(4*x^2 + 2*x^3) + 73*x^2 + 36*x^3 + 24*x^4 + 6*x^5 - 1) + x*exp(x)*log(x))/x,x)

[Out]

x + exp(x)*log(x) - exp(x)*(x - x^2*(2*exp(2) - 36) + 6*x^4 + 54)

________________________________________________________________________________________