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

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

[Out]

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

________________________________________________________________________________________

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, 2240, 45} \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 45

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 2240

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]

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 24, normalized size = 0.89

method result size
risch \(-x -\ln \left (3\right ) \ln \left (x \right )+2 \ln \left (x \right )+{\mathrm e}^{\frac {4}{x}}\) \(21\)
derivativedivides \(-x +\ln \left (3\right ) \ln \left (\frac {1}{x}\right )-2 \ln \left (\frac {1}{x}\right )+{\mathrm e}^{\frac {4}{x}}\) \(24\)
default \(-x +\ln \left (3\right ) \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 \left (3\right )\right ) \ln \left (x \right )\) \(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(1/x)-2*ln(1/x)+exp(4/x)

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 20, normalized size = 0.74 \begin {gather*} -\log \left (3\right ) \log \left (x\right ) - x + e^{\frac {4}{x}} + 2 \, \log \left (x\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="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 18, normalized size = 0.67 \begin {gather*} -{\left (\log \left (3\right ) - 2\right )} \log \left (x\right ) - 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)

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 14, normalized size = 0.52 \begin {gather*} - x + e^{\frac {4}{x}} - \left (-2 + \log {\left (3 \right )}\right ) \log {\left (x \right )} \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)

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 37, normalized size = 1.37 \begin {gather*} x {\left (\frac {\log \left (3\right ) \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)

________________________________________________________________________________________

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 \left (x\right )\,\left (\ln \left (3\right )-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)

________________________________________________________________________________________