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

   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 = 68, antiderivative size = 29 \[ \int \frac {2 x^2+e^{\frac {-1+x+x^2+\log ^2(x)}{x}} \left (1+x^2+2 \log (x)-\log ^2(x)\right )}{2 e^{\frac {-1+x+x^2+\log ^2(x)}{x}} x^2+4 x^3} \, dx=\frac {1}{4} \log \left (\left (-e^{\frac {-1+x+x^2+\log ^2(x)}{x}}-2 x\right )^2\right ) \]

[Out]

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

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.79

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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