3.22.35 \(\int \frac {2 x-2 x^2+e^{2+x} (-2 x-x^2+x^3+e^x (1-5 x+2 x^2))+(-x+e^{2+x} (x+2 e^x x+x^2)) \log (x)}{4 x} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.43, antiderivative size = 103, normalized size of antiderivative = 3.81, number of steps used = 25, number of rules used = 9, integrand size = 72, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 14, 2295, 6742, 2194, 2176, 2554, 2199, 2178} \begin {gather*} \frac {1}{4} e^{x+2} x^2-\frac {x^2}{4}-\frac {3}{4} e^{x+2} x+\frac {1}{4} e^{2 x+2} x+\frac {3 x}{4}-\frac {3}{4} e^{2 x+2}-\frac {1}{4} x \log (x)-\frac {1}{4} e^{x+2} \log (x)+\frac {1}{4} e^{2 x+2} \log (x)+\frac {1}{4} e^{x+2} (x+1) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-3*E^(2 + 2*x))/4 + (3*x)/4 - (3*E^(2 + x)*x)/4 + (E^(2 + 2*x)*x)/4 - x^2/4 + (E^(2 + x)*x^2)/4 - (E^(2 + x)*
Log[x])/4 + (E^(2 + 2*x)*Log[x])/4 - (x*Log[x])/4 + (E^(2 + x)*(1 + x)*Log[x])/4

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 2176

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] &&  !$UseGamma === True

Rule 2178

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

Rule 2194

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 2199

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] &&  !$UseGamma === True

Rule 2295

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

Rule 2554

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 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{4} \int \frac {2 x-2 x^2+e^{2+x} \left (-2 x-x^2+x^3+e^x \left (1-5 x+2 x^2\right )\right )+\left (-x+e^{2+x} \left (x+2 e^x x+x^2\right )\right ) \log (x)}{x} \, dx\\ &=\frac {1}{4} \int \left (2-2 x-\log (x)+e^{2+x} (1+x) (-2+x+\log (x))+\frac {e^{2+2 x} \left (1-5 x+2 x^2+2 x \log (x)\right )}{x}\right ) \, dx\\ &=\frac {x}{2}-\frac {x^2}{4}-\frac {1}{4} \int \log (x) \, dx+\frac {1}{4} \int e^{2+x} (1+x) (-2+x+\log (x)) \, dx+\frac {1}{4} \int \frac {e^{2+2 x} \left (1-5 x+2 x^2+2 x \log (x)\right )}{x} \, dx\\ &=\frac {3 x}{4}-\frac {x^2}{4}-\frac {1}{4} x \log (x)+\frac {1}{4} \int \left (\frac {e^{2+2 x} \left (1-5 x+2 x^2\right )}{x}+2 e^{2+2 x} \log (x)\right ) \, dx+\frac {1}{4} \int \left (-2 e^{2+x}-e^{2+x} x+e^{2+x} x^2+e^{2+x} (1+x) \log (x)\right ) \, dx\\ &=\frac {3 x}{4}-\frac {x^2}{4}-\frac {1}{4} x \log (x)-\frac {1}{4} \int e^{2+x} x \, dx+\frac {1}{4} \int e^{2+x} x^2 \, dx+\frac {1}{4} \int \frac {e^{2+2 x} \left (1-5 x+2 x^2\right )}{x} \, dx+\frac {1}{4} \int e^{2+x} (1+x) \log (x) \, dx-\frac {1}{2} \int e^{2+x} \, dx+\frac {1}{2} \int e^{2+2 x} \log (x) \, dx\\ &=-\frac {e^{2+x}}{2}+\frac {3 x}{4}-\frac {1}{4} e^{2+x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)+\frac {1}{4} \int \left (-5 e^{2+2 x}+\frac {e^{2+2 x}}{x}+2 e^{2+2 x} x\right ) \, dx-\frac {1}{2} \int \frac {e^{2+2 x}}{2 x} \, dx-\frac {1}{2} \int e^{2+x} x \, dx\\ &=-\frac {e^{2+x}}{2}+\frac {3 x}{4}-\frac {3}{4} e^{2+x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)+\frac {1}{2} \int e^{2+x} \, dx+\frac {1}{2} \int e^{2+2 x} x \, dx-\frac {5}{4} \int e^{2+2 x} \, dx\\ &=-\frac {5}{8} e^{2+2 x}+\frac {3 x}{4}-\frac {3}{4} e^{2+x} x+\frac {1}{4} e^{2+2 x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)-\frac {1}{4} \int e^{2+2 x} \, dx\\ &=-\frac {3}{4} e^{2+2 x}+\frac {3 x}{4}-\frac {3}{4} e^{2+x} x+\frac {1}{4} e^{2+2 x} x-\frac {x^2}{4}+\frac {1}{4} e^{2+x} x^2-\frac {1}{4} e^{2+x} \log (x)+\frac {1}{4} e^{2+2 x} \log (x)-\frac {1}{4} x \log (x)+\frac {1}{4} e^{2+x} (1+x) \log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 27, normalized size = 1.00 \begin {gather*} \frac {1}{4} \left (e^{2+2 x}-x+e^{2+x} x\right ) (-3+x+\log (x)) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.54, size = 62, normalized size = 2.30 \begin {gather*} -\frac {1}{4} \, {\left ({\left (x^{2} - 3 \, x\right )} e^{2} - {\left (x - 3\right )} e^{\left (2 \, x + 4\right )} - {\left (x^{2} - 3 \, x\right )} e^{\left (x + 4\right )} + {\left (x e^{2} - x e^{\left (x + 4\right )} - e^{\left (2 \, x + 4\right )}\right )} \log \relax (x)\right )} e^{\left (-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.24, size = 66, normalized size = 2.44 \begin {gather*} \frac {1}{4} \, x^{2} e^{\left (x + 2\right )} + \frac {1}{4} \, x e^{\left (x + 2\right )} \log \relax (x) - \frac {1}{4} \, x^{2} + \frac {1}{4} \, x e^{\left (2 \, x + 2\right )} - \frac {3}{4} \, x e^{\left (x + 2\right )} - \frac {1}{4} \, x \log \relax (x) + \frac {1}{4} \, e^{\left (2 \, x + 2\right )} \log \relax (x) + \frac {3}{4} \, x - \frac {3}{4} \, e^{\left (2 \, x + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.08, size = 63, normalized size = 2.33




method result size



risch \(\frac {\left (x \,{\mathrm e}^{2+x}+{\mathrm e}^{2 x +2}-x \right ) \ln \relax (x )}{4}+\frac {x^{2} {\mathrm e}^{2+x}}{4}+\frac {x \,{\mathrm e}^{2 x +2}}{4}-\frac {3 x \,{\mathrm e}^{2+x}}{4}-\frac {3 \,{\mathrm e}^{2 x +2}}{4}-\frac {x^{2}}{4}+\frac {3 x}{4}\) \(63\)
default \(\frac {3 x}{4}+\frac {x^{2} {\mathrm e}^{2+x}}{4}+\frac {\ln \relax (x ) {\mathrm e}^{2+x} x}{4}-\frac {3 x \,{\mathrm e}^{2+x}}{4}+\frac {x \,{\mathrm e}^{2} {\mathrm e}^{2 x}}{4}+\frac {{\mathrm e}^{2} {\mathrm e}^{2 x} \ln \relax (x )}{4}-\frac {3 \,{\mathrm e}^{2} {\mathrm e}^{2 x}}{4}-\frac {x^{2}}{4}-\frac {x \ln \relax (x )}{4}\) \(67\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/4*(((2*exp(x)*x+x^2+x)*exp(2+x)-x)*ln(x)+((2*x^2-5*x+1)*exp(x)+x^3-x^2-2*x)*exp(2+x)-2*x^2+2*x)/x,x,meth
od=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {1}{4} \, {\left (x e^{2} - e^{2}\right )} e^{x} \log \relax (x) - \frac {1}{4} \, x^{2} + \frac {1}{4} \, {\rm Ei}\left (2 \, x\right ) e^{2} - \frac {1}{4} \, {\rm Ei}\relax (x) e^{2} + \frac {1}{8} \, {\left (2 \, x e^{2} - e^{2}\right )} e^{\left (2 \, x\right )} + \frac {1}{4} \, {\left (x^{2} e^{2} - 2 \, x e^{2} + 2 \, e^{2}\right )} e^{x} - \frac {1}{4} \, {\left (x e^{2} - e^{2}\right )} e^{x} - \frac {1}{4} \, x \log \relax (x) + \frac {1}{4} \, e^{\left (2 \, x + 2\right )} \log \relax (x) + \frac {1}{4} \, e^{\left (x + 2\right )} \log \relax (x) + \frac {3}{4} \, x - \frac {5}{8} \, e^{\left (2 \, x + 2\right )} - \frac {1}{2} \, e^{\left (x + 2\right )} - \frac {1}{4} \, \int \frac {{\left (x e^{2} - e^{2}\right )} e^{x}}{x}\,{d x} - \frac {1}{4} \, \int \frac {e^{\left (2 \, x + 2\right )}}{x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(x*e^2 - e^2)*e^x*log(x) - 1/4*x^2 + 1/4*Ei(2*x)*e^2 - 1/4*Ei(x)*e^2 + 1/8*(2*x*e^2 - e^2)*e^(2*x) + 1/4*(
x^2*e^2 - 2*x*e^2 + 2*e^2)*e^x - 1/4*(x*e^2 - e^2)*e^x - 1/4*x*log(x) + 1/4*e^(2*x + 2)*log(x) + 1/4*e^(x + 2)
*log(x) + 3/4*x - 5/8*e^(2*x + 2) - 1/2*e^(x + 2) - 1/4*integrate((x*e^2 - e^2)*e^x/x, x) - 1/4*integrate(e^(2
*x + 2)/x, x)

________________________________________________________________________________________

mupad [B]  time = 1.32, size = 66, normalized size = 2.44 \begin {gather*} \frac {3\,x}{4}-\frac {3\,{\mathrm {e}}^{2\,x+2}}{4}-\frac {3\,x\,{\mathrm {e}}^{x+2}}{4}+\frac {x\,{\mathrm {e}}^{2\,x+2}}{4}+\frac {x^2\,{\mathrm {e}}^{x+2}}{4}-\frac {x\,\ln \relax (x)}{4}-\frac {x^2}{4}+\frac {{\mathrm {e}}^{2\,x+2}\,\ln \relax (x)}{4}+\frac {x\,{\mathrm {e}}^{x+2}\,\ln \relax (x)}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.50, size = 73, normalized size = 2.70 \begin {gather*} - \frac {x^{2}}{4} - \frac {x \log {\relax (x )}}{4} + \frac {3 x}{4} + \frac {\left (4 x e^{2} + 4 e^{2} \log {\relax (x )} - 12 e^{2}\right ) e^{2 x}}{16} + \frac {\left (4 x^{2} e^{2} + 4 x e^{2} \log {\relax (x )} - 12 x e^{2}\right ) e^{x}}{16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**2/4 - x*log(x)/4 + 3*x/4 + (4*x*exp(2) + 4*exp(2)*log(x) - 12*exp(2))*exp(2*x)/16 + (4*x**2*exp(2) + 4*x*e
xp(2)*log(x) - 12*x*exp(2))*exp(x)/16

________________________________________________________________________________________