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

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 35, normalized size of antiderivative = 0.92, number of steps used = 7, number of rules used = 4, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {14, 2197, 2288, 2304} \begin {gather*} -\frac {e^{5/x}}{x}+\frac {e^x}{x}+\frac {1}{x}+\frac {\log \left (\frac {x}{3}\right )+3}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 24, normalized size = 0.63 \begin {gather*} \frac {4-e^{5/x}+e^x+\log \left (\frac {x}{3}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.99, size = 20, normalized size = 0.53 \begin {gather*} \frac {e^{x} - e^{\frac {5}{x}} + \log \left (\frac {1}{3} \, x\right ) + 4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 20, normalized size = 0.53 \begin {gather*} \frac {e^{x} - e^{\frac {5}{x}} + \log \left (\frac {1}{3} \, x\right ) + 4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 26, normalized size = 0.68




method result size



risch \(\frac {\ln \left (\frac {x}{3}\right )}{x}+\frac {4+{\mathrm e}^{x}-{\mathrm e}^{\frac {5}{x}}}{x}\) \(26\)
default \(-\frac {{\mathrm e}^{\frac {5}{x}}}{x}+\frac {{\mathrm e}^{x}}{x}+\frac {4}{x}+\frac {\ln \left (\frac {x}{3}\right )}{x}\) \(32\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.67, size = 20, normalized size = 0.53 \begin {gather*} \frac {\ln \left (\frac {x}{3}\right )-{\mathrm {e}}^{5/x}+{\mathrm {e}}^x+4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________