3.21.8 \(\int \frac {-16+8 x^2+e^{5/x} (-9+2 x^2)}{4 x^2+e^{5/x} x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 19, normalized size of antiderivative = 0.86, number of steps used = 9, number of rules used = 7, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {6742, 6715, 2282, 36, 29, 31, 14} \begin {gather*} 2 x+\frac {4}{x}+\log \left (e^{5/x}+4\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-16 + 8*x^2 + E^(5/x)*(-9 + 2*x^2))/(4*x^2 + E^(5/x)*x^2),x]

[Out]

4/x + 2*x + Log[4 + E^(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 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6715

Int[(u_)*(x_)^(m_.), x_Symbol] :> Dist[1/(m + 1), Subst[Int[SubstFor[x^(m + 1), u, x], x], x, x^(m + 1)], x] /
; FreeQ[m, x] && NeQ[m, -1] && FunctionOfQ[x^(m + 1), 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 \left (\frac {20}{\left (4+e^{5/x}\right ) x^2}+\frac {-9+2 x^2}{x^2}\right ) \, dx\\ &=20 \int \frac {1}{\left (4+e^{5/x}\right ) x^2} \, dx+\int \frac {-9+2 x^2}{x^2} \, dx\\ &=-\left (20 \operatorname {Subst}\left (\int \frac {1}{4+e^{5 x}} \, dx,x,\frac {1}{x}\right )\right )+\int \left (2-\frac {9}{x^2}\right ) \, dx\\ &=\frac {9}{x}+2 x-4 \operatorname {Subst}\left (\int \frac {1}{x (4+x)} \, dx,x,e^{5/x}\right )\\ &=\frac {9}{x}+2 x-\operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,e^{5/x}\right )+\operatorname {Subst}\left (\int \frac {1}{4+x} \, dx,x,e^{5/x}\right )\\ &=\frac {4}{x}+2 x+\log \left (4+e^{5/x}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(-16 + 8*x^2 + E^(5/x)*(-9 + 2*x^2))/(4*x^2 + E^(5/x)*x^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 22, normalized size = 1.00 \begin {gather*} \frac {2 \, x^{2} + x \log \left (e^{\frac {5}{x}} + 4\right ) + 4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-9)*exp(5/x)+8*x^2-16)/(x^2*exp(5/x)+4*x^2),x, algorithm="fricas")

[Out]

(2*x^2 + x*log(e^(5/x) + 4) + 4)/x

________________________________________________________________________________________

giac [A]  time = 0.19, size = 22, normalized size = 1.00 \begin {gather*} x {\left (\frac {\log \left (e^{\frac {5}{x}} + 4\right )}{x} + \frac {4}{x^{2}} + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-9)*exp(5/x)+8*x^2-16)/(x^2*exp(5/x)+4*x^2),x, algorithm="giac")

[Out]

x*(log(e^(5/x) + 4)/x + 4/x^2 + 2)

________________________________________________________________________________________

maple [A]  time = 0.23, size = 19, normalized size = 0.86




method result size



risch \(2 x +\frac {4}{x}+\ln \left ({\mathrm e}^{\frac {5}{x}}+4\right )\) \(19\)
norman \(\frac {2 x^{2}+4}{x}+\ln \left ({\mathrm e}^{\frac {5}{x}}+4\right )\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^2-9)*exp(5/x)+8*x^2-16)/(x^2*exp(5/x)+4*x^2),x,method=_RETURNVERBOSE)

[Out]

2*x+4/x+ln(exp(5/x)+4)

________________________________________________________________________________________

maxima [A]  time = 0.66, size = 18, normalized size = 0.82 \begin {gather*} 2 \, x + \frac {4}{x} + \log \left (e^{\frac {5}{x}} + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^2-9)*exp(5/x)+8*x^2-16)/(x^2*exp(5/x)+4*x^2),x, algorithm="maxima")

[Out]

2*x + 4/x + log(e^(5/x) + 4)

________________________________________________________________________________________

mupad [B]  time = 1.15, size = 23, normalized size = 1.05 \begin {gather*} \ln \left ({\mathrm {e}}^{5/x}+4\right )+\frac {2\,x^3+4\,x}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(5/x)*(2*x^2 - 9) + 8*x^2 - 16)/(x^2*exp(5/x) + 4*x^2),x)

[Out]

log(exp(5/x) + 4) + (4*x + 2*x^3)/x^2

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 14, normalized size = 0.64 \begin {gather*} 2 x + \log {\left (e^{\frac {5}{x}} + 4 \right )} + \frac {4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**2-9)*exp(5/x)+8*x**2-16)/(x**2*exp(5/x)+4*x**2),x)

[Out]

2*x + log(exp(5/x) + 4) + 4/x

________________________________________________________________________________________