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

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

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 46, normalized size of antiderivative = 1.59, number of steps used = 6, number of rules used = 5, integrand size = 82, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {14, 2194, 2197, 6686, 2288} \begin {gather*} -\frac {2 e^{4-x} \left (x^2-x \log (x)\right )}{x}+e^{8-2 x}+\frac {e^{x+3}}{x}+(x-\log (x))^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(8 - 2*x) + E^(3 + x)/x + (x - Log[x])^2 - (2*E^(4 - x)*(x^2 - x*Log[x]))/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 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 2197

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 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 6686

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[(q*y^(m + 1))/(m + 1), x] /;  !F
alseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.22, size = 50, normalized size = 1.72 \begin {gather*} e^{8-2 x}+\frac {e^{3+x}}{x}-2 e^{4-x} x+x^2+\left (2 e^{4-x}-2 x\right ) \log (x)+\log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.54, size = 74, normalized size = 2.55 \begin {gather*} \frac {{\left (x^{3} e^{\left (2 \, x + 6\right )} + x e^{\left (2 \, x + 6\right )} \log \relax (x)^{2} - 2 \, x^{2} e^{\left (x + 10\right )} + x e^{14} - 2 \, {\left (x^{2} e^{\left (2 \, x + 6\right )} - x e^{\left (x + 10\right )}\right )} \log \relax (x) + e^{\left (3 \, x + 9\right )}\right )} e^{\left (-2 \, x - 6\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(x^3*e^(2*x + 6) + x*e^(2*x + 6)*log(x)^2 - 2*x^2*e^(x + 10) + x*e^14 - 2*(x^2*e^(2*x + 6) - x*e^(x + 10))*log
(x) + e^(3*x + 9))*e^(-2*x - 6)/x

________________________________________________________________________________________

giac [B]  time = 0.17, size = 55, normalized size = 1.90 \begin {gather*} \frac {x^{3} - 2 \, x^{2} e^{\left (-x + 4\right )} - 2 \, x^{2} \log \relax (x) + 2 \, x e^{\left (-x + 4\right )} \log \relax (x) + x \log \relax (x)^{2} + x e^{\left (-2 \, x + 8\right )} + e^{\left (x + 3\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 49, normalized size = 1.69




method result size



default \(-2 x \,{\mathrm e}^{-x +4}+2 \ln \relax (x ) {\mathrm e}^{-x +4}+\frac {{\mathrm e}^{3+x}}{x}+x^{2}+{\mathrm e}^{-2 x +8}-2 x \ln \relax (x )+\ln \relax (x )^{2}\) \(49\)
risch \(\ln \relax (x )^{2}+2 \left (-{\mathrm e}^{3+x} x +{\mathrm e}^{7}\right ) {\mathrm e}^{-3-x} \ln \relax (x )+\frac {\left (x^{3} {\mathrm e}^{2 x +6}-2 x^{2} {\mathrm e}^{x +10}+{\mathrm e}^{14} x +{\mathrm e}^{3 x +9}\right ) {\mathrm e}^{-2 x -6}}{x}\) \(66\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.62, size = 64, normalized size = 2.21 \begin {gather*} x^{2} + {\rm Ei}\relax (x) e^{3} - 2 \, {\left (x e^{4} + e^{4}\right )} e^{\left (-x\right )} - e^{3} \Gamma \left (-1, -x\right ) - 2 \, x \log \relax (x) + 2 \, e^{\left (-x + 4\right )} \log \relax (x) + \log \relax (x)^{2} + 2 \, e^{\left (-x + 4\right )} + e^{\left (-2 \, x + 8\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.57, size = 64, normalized size = 2.21 \begin {gather*} {\mathrm {e}}^{8-2\,x}-2\,x-2\,x\,\left (\ln \relax (x)-1\right )+{\ln \relax (x)}^2-2\,x\,{\mathrm {e}}^{4-x}+\frac {{\mathrm {e}}^{x+3}}{x}-2\,{\mathrm {e}}^4\,\mathrm {expint}\relax (x)-2\,{\mathrm {e}}^4\,\left (\mathrm {ei}\left (-x\right )-{\mathrm {e}}^{-x}\,\ln \relax (x)\right )+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(8 - 2*x) - 2*x - 2*x*(log(x) - 1) + log(x)^2 - 2*x*exp(4 - x) + exp(x + 3)/x - 2*exp(4)*expint(x) - 2*exp(
4)*(ei(-x) - exp(-x)*log(x)) + x^2

________________________________________________________________________________________

sympy [B]  time = 0.40, size = 49, normalized size = 1.69 \begin {gather*} x^{2} - 2 x \log {\relax (x )} + \log {\relax (x )}^{2} + \frac {x e^{8 - 2 x} + \left (- 2 x^{2} + 2 x \log {\relax (x )}\right ) e^{4 - x} + e^{7} e^{x - 4}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________