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

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 20, normalized size of antiderivative = 0.74, number of steps used = 6, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {6, 14, 2209, 43} \begin {gather*} -x+e^{4/x}+(2-\log (3)) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 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 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2209

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^n*
F^(a + b*(c + d*x)^n))/(b*f*n*(c + d*x)^n*Log[F]), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 21, normalized size = 0.78 \begin {gather*} e^{4/x}-x+2 \log (x)-\log (3) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 18, normalized size = 0.67 \begin {gather*} -{\left (\log \relax (3) - 2\right )} \log \relax (x) - x + e^{\frac {4}{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 21, normalized size = 0.78




method result size



risch \(-x -\ln \relax (3) \ln \relax (x )+2 \ln \relax (x )+{\mathrm e}^{\frac {4}{x}}\) \(21\)
derivativedivides \(-x +\ln \relax (3) \ln \left (\frac {1}{x}\right )-2 \ln \left (\frac {1}{x}\right )+{\mathrm e}^{\frac {4}{x}}\) \(24\)
default \(-x +\ln \relax (3) \ln \left (\frac {1}{x}\right )-2 \ln \left (\frac {1}{x}\right )+{\mathrm e}^{\frac {4}{x}}\) \(24\)
norman \(\frac {x \,{\mathrm e}^{\frac {4}{x}}-x^{2}}{x}+\left (2-\ln \relax (3)\right ) \ln \relax (x )\) \(29\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 20, normalized size = 0.74 \begin {gather*} -\log \relax (3) \log \relax (x) - x + e^{\frac {4}{x}} + 2 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.78, size = 29, normalized size = 1.07 \begin {gather*} \frac {x^2\,{\mathrm {e}}^{4/x}-x^3}{x^2}-\ln \relax (x)\,\left (\ln \relax (3)-2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 14, normalized size = 0.52 \begin {gather*} - x + e^{\frac {4}{x}} - \left (-2 + \log {\relax (3 )}\right ) \log {\relax (x )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________