\(\int \frac {2+e^x+x-x^2+(2+2 x-3 x^2+e^x (1+x)) \log (x)}{(2 x+e^x x+x^2-x^3) \log (x)} \, dx\) [7463]

   Optimal result
   Rubi [F]
   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 = 55, antiderivative size = 25 \[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=-4+\log (5)+\log \left (\left (-x+x \left (3+e^x+x-x^2\right )\right ) \log (x)\right ) \]

[Out]

ln(5)+ln(ln(x)*(x*(x-x^2+3+exp(x))-x))-4

Rubi [F]

\[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=\int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx \]

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.32 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=\log (x)+\log \left (2+e^x+x-x^2\right )+\log (\log (x)) \]

[In]

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

[Out]

Log[x] + Log[2 + E^x + x - x^2] + Log[Log[x]]

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72

method result size
risch \(\ln \left (x \right )+\ln \left (-x^{2}+{\mathrm e}^{x}+x +2\right )+\ln \left (\ln \left (x \right )\right )\) \(18\)
norman \(\ln \left (x \right )+\ln \left (\ln \left (x \right )\right )+\ln \left (x^{2}-x -{\mathrm e}^{x}-2\right )\) \(20\)
parallelrisch \(\ln \left (x \right )+\ln \left (\ln \left (x \right )\right )+\ln \left (x^{2}-x -{\mathrm e}^{x}-2\right )\) \(20\)

[In]

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

[Out]

ln(x)+ln(-x^2+exp(x)+x+2)+ln(ln(x))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=\log \left (-x^{2} + x + e^{x} + 2\right ) + \log \left (x\right ) + \log \left (\log \left (x\right )\right ) \]

[In]

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

[Out]

log(-x^2 + x + e^x + 2) + log(x) + log(log(x))

Sympy [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=\log {\left (x \right )} + \log {\left (- x^{2} + x + e^{x} + 2 \right )} + \log {\left (\log {\left (x \right )} \right )} \]

[In]

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

[Out]

log(x) + log(-x**2 + x + exp(x) + 2) + log(log(x))

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=\log \left (-x^{2} + x + e^{x} + 2\right ) + \log \left (x\right ) + \log \left (\log \left (x\right )\right ) \]

[In]

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

[Out]

log(-x^2 + x + e^x + 2) + log(x) + log(log(x))

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=\log \left (-x^{2} + x + e^{x} + 2\right ) + \log \left (x\right ) + \log \left (\log \left (x\right )\right ) \]

[In]

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

[Out]

log(-x^2 + x + e^x + 2) + log(x) + log(log(x))

Mupad [B] (verification not implemented)

Time = 12.70 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {2+e^x+x-x^2+\left (2+2 x-3 x^2+e^x (1+x)\right ) \log (x)}{\left (2 x+e^x x+x^2-x^3\right ) \log (x)} \, dx=\ln \left (\ln \left (x\right )\right )+\ln \left (x^2-{\mathrm {e}}^x-x-2\right )+\ln \left (x\right ) \]

[In]

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

[Out]

log(log(x)) + log(x^2 - exp(x) - x - 2) + log(x)