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

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

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 26, normalized size of antiderivative = 0.96, number of steps used = 10, number of rules used = 7, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {14, 2199, 2194, 2177, 2178, 2389, 2295} \begin {gather*} x+e^x+\frac {5 e^x}{x}+x \log (3)-(x+5) \log (x+5) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x + (5*E^x)/x + x + x*Log[3] - (5 + x)*Log[5 + 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 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 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 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 30, normalized size = 1.11 \begin {gather*} e^x+\frac {5 e^x}{x}+x+x \log (3)-5 \log (5+x)-x \log (5+x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 29, normalized size = 1.07 \begin {gather*} \frac {x^{2} + {\left (x + 5\right )} e^{x} - {\left (x^{2} + 5 \, x\right )} \log \left (\frac {1}{3} \, x + \frac {5}{3}\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.14, size = 37, normalized size = 1.37 \begin {gather*} -\frac {x^{2} \log \left (\frac {1}{3} \, x + \frac {5}{3}\right ) - x^{2} - x e^{x} + 5 \, x \log \left (x + 5\right ) - 5 \, e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 26, normalized size = 0.96




method result size



default \(\frac {5 \,{\mathrm e}^{x}}{x}+{\mathrm e}^{x}-3 \ln \left (\frac {5}{3}+\frac {x}{3}\right ) \left (\frac {5}{3}+\frac {x}{3}\right )+5+x\) \(26\)
norman \(\frac {x^{2}+{\mathrm e}^{x} x -5 x \ln \left (\frac {5}{3}+\frac {x}{3}\right )-x^{2} \ln \left (\frac {5}{3}+\frac {x}{3}\right )+5 \,{\mathrm e}^{x}}{x}\) \(37\)
risch \(-x \ln \left (\frac {5}{3}+\frac {x}{3}\right )-\frac {5 x \ln \left (5+x \right )-x^{2}-{\mathrm e}^{x} x -5 \,{\mathrm e}^{x}}{x}\) \(38\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.45, size = 27, normalized size = 1.00 \begin {gather*} -{\left (x + 5\right )} \log \left (\frac {1}{3} \, x + \frac {5}{3}\right ) + x + 5 \, {\rm Ei}\relax (x) + e^{x} - 5 \, \Gamma \left (-1, -x\right ) + 5 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x + 5)*log(1/3*x + 5/3) + x + 5*Ei(x) + e^x - 5*gamma(-1, -x) + 5

________________________________________________________________________________________

mupad [B]  time = 4.20, size = 26, normalized size = 0.96 \begin {gather*} x-5\,\ln \left (x+5\right )+{\mathrm {e}}^x+\frac {5\,{\mathrm {e}}^x}{x}-x\,\ln \left (\frac {x}{3}+\frac {5}{3}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 5*log(x + 5) + exp(x) + (5*exp(x))/x - x*log(x/3 + 5/3)

________________________________________________________________________________________

sympy [A]  time = 0.28, size = 26, normalized size = 0.96 \begin {gather*} - x \log {\left (\frac {x}{3} + \frac {5}{3} \right )} + x - 5 \log {\left (x + 5 \right )} + \frac {\left (x + 5\right ) e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*log(x/3 + 5/3) + x - 5*log(x + 5) + (x + 5)*exp(x)/x

________________________________________________________________________________________