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

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

________________________________________________________________________________________

Rubi [A]  time = 1.72, antiderivative size = 50, normalized size of antiderivative = 1.52, number of steps used = 20, number of rules used = 9, integrand size = 68, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.132, Rules used = {6, 12, 1594, 27, 6742, 2177, 2178, 2197, 2554} \begin {gather*} x+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), 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] && LtQ[m, -1] && 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 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 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} &=\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{\left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )} \, dx\\ &=\frac {\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{x-2 x^2+x^3} \, dx}{2+\log (5)}\\ &=\frac {\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{x \left (1-2 x+x^2\right )} \, dx}{2+\log (5)}\\ &=\frac {\int \frac {e^{-x} \left (-1+x+x^2 (1+\log (2))+e^x \left (x-2 x^2+x^3\right ) \log \left (5 e^2\right )+x^2 \log \left (\frac {2}{x}\right )\right )}{(-1+x)^2 x} \, dx}{2+\log (5)}\\ &=\frac {\int \left (2+\frac {e^{-x}}{(-1+x)^2}-\frac {e^{-x}}{(-1+x)^2 x}+\frac {e^{-x} x (1+\log (2))}{(-1+x)^2}+\log (5)+\frac {e^{-x} x \log \left (\frac {2}{x}\right )}{(-1+x)^2}\right ) \, dx}{2+\log (5)}\\ &=x+\frac {\int \frac {e^{-x}}{(-1+x)^2} \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{(-1+x)^2 x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x} x \log \left (\frac {2}{x}\right )}{(-1+x)^2} \, dx}{2+\log (5)}+\frac {(1+\log (2)) \int \frac {e^{-x} x}{(-1+x)^2} \, dx}{2+\log (5)}\\ &=x+\frac {e^{-x}}{(1-x) (2+\log (5))}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}-\frac {\int \left (\frac {e^{-x}}{1-x}+\frac {e^{-x}}{(-1+x)^2}+\frac {e^{-x}}{x}\right ) \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{-1+x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x}}{(1-x) x} \, dx}{2+\log (5)}\\ &=x+\frac {e^{-x}}{(1-x) (2+\log (5))}-\frac {\text {Ei}(1-x)}{e (2+\log (5))}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}+\frac {\int \left (\frac {e^{-x}}{1-x}+\frac {e^{-x}}{x}\right ) \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{1-x} \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{(-1+x)^2} \, dx}{2+\log (5)}-\frac {\int \frac {e^{-x}}{x} \, dx}{2+\log (5)}\\ &=x-\frac {\text {Ei}(-x)}{2+\log (5)}+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}+\frac {\int \frac {e^{-x}}{1-x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x}}{-1+x} \, dx}{2+\log (5)}+\frac {\int \frac {e^{-x}}{x} \, dx}{2+\log (5)}\\ &=x+\frac {e^{-x} (1+\log (2))}{(1-x) (2+\log (5))}+\frac {e^{-x} \log \left (\frac {2}{x}\right )}{(1-x) (2+\log (5))}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.80, size = 39, normalized size = 1.18 \begin {gather*} \frac {e^{-x} \left (-1+e^x (-1+x) x (2+\log (5))-\log \left (\frac {4}{x}\right )\right )}{(-1+x) (2+\log (5))} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.74, size = 54, normalized size = 1.64 \begin {gather*} \frac {{\left ({\left (2 \, x^{2} + {\left (x^{2} - x\right )} \log \relax (5) - 2 \, x\right )} e^{x} - \log \relax (2) - \log \left (\frac {2}{x}\right ) - 1\right )} e^{\left (-x\right )}}{{\left (x - 1\right )} \log \relax (5) + 2 \, x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 54, normalized size = 1.64 \begin {gather*} \frac {x^{2} \log \relax (5) + 2 \, x^{2} - x \log \relax (5) - 2 \, e^{\left (-x\right )} \log \relax (2) + e^{\left (-x\right )} \log \relax (x) - 2 \, x - e^{\left (-x\right )}}{{\left (x - 1\right )} \log \left (5 \, e^{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.25, size = 41, normalized size = 1.24




method result size



default \(\frac {\frac {\left (-1-\ln \relax (2)-\ln \left (\frac {2}{x}\right )\right ) {\mathrm e}^{-x}}{x -1}+\ln \left (5 \,{\mathrm e}^{2}\right ) x}{\ln \left (5 \,{\mathrm e}^{2}\right )}\) \(41\)
norman \(\frac {\left (-{\mathrm e}^{x}+{\mathrm e}^{x} x^{2}-\frac {1+\ln \relax (2)}{2+\ln \relax (5)}-\frac {\ln \left (\frac {2}{x}\right )}{2+\ln \relax (5)}\right ) {\mathrm e}^{-x}}{x -1}\) \(48\)
risch \(\frac {{\mathrm e}^{-x} \ln \relax (x )}{\left (2+\ln \relax (5)\right ) \left (x -1\right )}-\frac {\left (2-2 x^{2} \ln \relax (5) {\mathrm e}^{x}+2 x \,{\mathrm e}^{x} \ln \relax (5)-4 \,{\mathrm e}^{x} x^{2}+4 \,{\mathrm e}^{x} x +4 \ln \relax (2)\right ) {\mathrm e}^{-x}}{2 \left (2+\ln \relax (5)\right ) \left (x -1\right )}\) \(71\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/ln(5*exp(2))*((-1-ln(2)-ln(2/x))/(x-1)/exp(x)+ln(5*exp(2))*x)

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 45, normalized size = 1.36 \begin {gather*} \frac {x^{2} {\left (\log \relax (5) + 2\right )} - x {\left (\log \relax (5) + 2\right )} - {\left (2 \, \log \relax (2) - \log \relax (x) + 1\right )} e^{\left (-x\right )}}{{\left (x - 1\right )} \log \left (5 \, e^{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {{\mathrm {e}}^{-x}\,\left (x+x^2\,\ln \relax (2)+x^2+x^2\,\ln \left (\frac {2}{x}\right )+\ln \left (5\,{\mathrm {e}}^2\right )\,{\mathrm {e}}^x\,\left (x^3-2\,x^2+x\right )-1\right )}{\ln \left (5\,{\mathrm {e}}^2\right )\,\left (x^3-2\,x^2+x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.54, size = 29, normalized size = 0.88 \begin {gather*} x + \frac {\left (- \log {\left (\frac {2}{x} \right )} - 1 - \log {\relax (2 )}\right ) e^{- x}}{x \log {\relax (5 )} + 2 x - 2 - \log {\relax (5 )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + (-log(2/x) - 1 - log(2))*exp(-x)/(x*log(5) + 2*x - 2 - log(5))

________________________________________________________________________________________