\(\int \frac {-4 x^2+e^{\frac {1}{x}} x^2+(8 x+4 x^2+e^{\frac {1}{x}} (-2-3 x-x^2)) \log (2+x)}{2 x^3+x^4+(16 x^2+8 x^3+e^{\frac {1}{x}} (-4 x^2-2 x^3)) \log (2+x)+(32 x+16 x^2+e^{\frac {1}{x}} (-16 x-8 x^2)+e^{2/x} (2 x+x^2)) \log ^2(2+x)} \, dx\) [6127]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 136, antiderivative size = 20 \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=\frac {x}{x+\left (4-e^{\frac {1}{x}}\right ) \log (2+x)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.67 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.022, Rules used = {6820, 6843, 32} \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=-\frac {1}{1-\frac {x}{\left (e^{\frac {1}{x}}-4\right ) \log (x+2)}} \]

[In]

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

[Out]

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

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 6820

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rule 6843

Int[(u_)*((a_.)*(v_)^(p_.) + (b_.)*(w_)^(q_.))^(m_.), x_Symbol] :> With[{c = Simplify[u/(p*w*D[v, x] - q*v*D[w
, x])]}, Dist[c*p, Subst[Int[(b + a*x^p)^m, x], x, v*w^(m*q + 1)], x] /; FreeQ[c, x]] /; FreeQ[{a, b, m, p, q}
, x] && EqQ[p + q*(m*p + 1), 0] && IntegerQ[p] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = \int \frac {\left (-4+e^{\frac {1}{x}}\right ) x^2-(2+x) \left (-4 x+e^{\frac {1}{x}} (1+x)\right ) \log (2+x)}{x (2+x) \left (x-\left (-4+e^{\frac {1}{x}}\right ) \log (2+x)\right )^2} \, dx \\ & = \text {Subst}\left (\int \frac {1}{(1+x)^2} \, dx,x,-\frac {x}{\left (-4+e^{\frac {1}{x}}\right ) \log (2+x)}\right ) \\ & = -\frac {1}{1-\frac {x}{\left (-4+e^{\frac {1}{x}}\right ) \log (2+x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.72 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=\frac {x}{x-\left (-4+e^{\frac {1}{x}}\right ) \log (2+x)} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.99 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.15

method result size
risch \(\frac {x}{-\ln \left (2+x \right ) {\mathrm e}^{\frac {1}{x}}+x +4 \ln \left (2+x \right )}\) \(23\)
parallelrisch \(\frac {x}{-\ln \left (2+x \right ) {\mathrm e}^{\frac {1}{x}}+x +4 \ln \left (2+x \right )}\) \(23\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=-\frac {x}{{\left (e^{\frac {1}{x}} - 4\right )} \log \left (x + 2\right ) - x} \]

[In]

integrate((((-x^2-3*x-2)*exp(1/x)+4*x^2+8*x)*log(2+x)+x^2*exp(1/x)-4*x^2)/(((x^2+2*x)*exp(1/x)^2+(-8*x^2-16*x)
*exp(1/x)+16*x^2+32*x)*log(2+x)^2+((-2*x^3-4*x^2)*exp(1/x)+8*x^3+16*x^2)*log(2+x)+x^4+2*x^3),x, algorithm="fri
cas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=- \frac {x}{- x + e^{\frac {1}{x}} \log {\left (x + 2 \right )} - 4 \log {\left (x + 2 \right )}} \]

[In]

integrate((((-x**2-3*x-2)*exp(1/x)+4*x**2+8*x)*ln(2+x)+x**2*exp(1/x)-4*x**2)/(((x**2+2*x)*exp(1/x)**2+(-8*x**2
-16*x)*exp(1/x)+16*x**2+32*x)*ln(2+x)**2+((-2*x**3-4*x**2)*exp(1/x)+8*x**3+16*x**2)*ln(2+x)+x**4+2*x**3),x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20 \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=-\frac {x}{e^{\frac {1}{x}} \log \left (x + 2\right ) - x - 4 \, \log \left (x + 2\right )} \]

[In]

integrate((((-x^2-3*x-2)*exp(1/x)+4*x^2+8*x)*log(2+x)+x^2*exp(1/x)-4*x^2)/(((x^2+2*x)*exp(1/x)^2+(-8*x^2-16*x)
*exp(1/x)+16*x^2+32*x)*log(2+x)^2+((-2*x^3-4*x^2)*exp(1/x)+8*x^3+16*x^2)*log(2+x)+x^4+2*x^3),x, algorithm="max
ima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20 \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=-\frac {x}{e^{\frac {1}{x}} \log \left (x + 2\right ) - x - 4 \, \log \left (x + 2\right )} \]

[In]

integrate((((-x^2-3*x-2)*exp(1/x)+4*x^2+8*x)*log(2+x)+x^2*exp(1/x)-4*x^2)/(((x^2+2*x)*exp(1/x)^2+(-8*x^2-16*x)
*exp(1/x)+16*x^2+32*x)*log(2+x)^2+((-2*x^3-4*x^2)*exp(1/x)+8*x^3+16*x^2)*log(2+x)+x^4+2*x^3),x, algorithm="gia
c")

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.40 (sec) , antiderivative size = 178, normalized size of antiderivative = 8.90 \[ \int \frac {-4 x^2+e^{\frac {1}{x}} x^2+\left (8 x+4 x^2+e^{\frac {1}{x}} \left (-2-3 x-x^2\right )\right ) \log (2+x)}{2 x^3+x^4+\left (16 x^2+8 x^3+e^{\frac {1}{x}} \left (-4 x^2-2 x^3\right )\right ) \log (2+x)+\left (32 x+16 x^2+e^{\frac {1}{x}} \left (-16 x-8 x^2\right )+e^{2/x} \left (2 x+x^2\right )\right ) \log ^2(2+x)} \, dx=\frac {{\ln \left (x+2\right )}^2\,\left (4\,x+8\right )\,{\left (x^3+2\,x^2\right )}^2-x^3\,{\left (x^3+2\,x^2\right )}^2+\ln \left (x+2\right )\,{\left (x^3+2\,x^2\right )}^2\,\left (x^3+3\,x^2+2\,x\right )}{x\,\left (x+2\right )\,\left (x+4\,\ln \left (x+2\right )-\ln \left (x+2\right )\,{\mathrm {e}}^{1/x}\right )\,\left (x^6\,\ln \left (x+2\right )-x^6+5\,x^5\,\ln \left (x+2\right )-2\,x^5+4\,x^4\,{\ln \left (x+2\right )}^2+8\,x^4\,\ln \left (x+2\right )+16\,x^3\,{\ln \left (x+2\right )}^2+4\,x^3\,\ln \left (x+2\right )+16\,x^2\,{\ln \left (x+2\right )}^2\right )} \]

[In]

int((x^2*exp(1/x) + log(x + 2)*(8*x - exp(1/x)*(3*x + x^2 + 2) + 4*x^2) - 4*x^2)/(log(x + 2)^2*(32*x + exp(2/x
)*(2*x + x^2) - exp(1/x)*(16*x + 8*x^2) + 16*x^2) + 2*x^3 + x^4 + log(x + 2)*(16*x^2 - exp(1/x)*(4*x^2 + 2*x^3
) + 8*x^3)),x)

[Out]

(log(x + 2)^2*(4*x + 8)*(2*x^2 + x^3)^2 - x^3*(2*x^2 + x^3)^2 + log(x + 2)*(2*x^2 + x^3)^2*(2*x + 3*x^2 + x^3)
)/(x*(x + 2)*(x + 4*log(x + 2) - log(x + 2)*exp(1/x))*(4*x^3*log(x + 2) + 8*x^4*log(x + 2) + 5*x^5*log(x + 2)
+ x^6*log(x + 2) - 2*x^5 - x^6 + 16*x^2*log(x + 2)^2 + 16*x^3*log(x + 2)^2 + 4*x^4*log(x + 2)^2))