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

   Optimal result
   Rubi [B] (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 = 47, antiderivative size = 34 \[ \int \frac {1}{3} \left (3+e^{-e^{3/x} x+x^2} \left (1+e^{3/x} (3-x)+2 x^2\right )-\log (x)\right ) \, dx=x+\frac {1}{3} \left (-x+\left (2+e^{x \left (-e^{3/x}+x\right )}\right ) x-x \log (x)\right ) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(77\) vs. \(2(34)=68\).

Time = 0.07 (sec) , antiderivative size = 77, normalized size of antiderivative = 2.26, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.064, Rules used = {12, 2326, 2332} \[ \int \frac {1}{3} \left (3+e^{-e^{3/x} x+x^2} \left (1+e^{3/x} (3-x)+2 x^2\right )-\log (x)\right ) \, dx=-\frac {e^{x^2-e^{3/x} x} \left (2 x^2+e^{3/x} (3-x)\right )}{3 \left (-2 x+e^{3/x}-\frac {3 e^{3/x}}{x}\right )}+\frac {4 x}{3}-\frac {1}{3} x \log (x) \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.76

method result size
risch \(\frac {4 x}{3}+\frac {x \,{\mathrm e}^{\left (x -{\mathrm e}^{\frac {3}{x}}\right ) x}}{3}-\frac {x \ln \left (x \right )}{3}\) \(26\)
default \(\frac {4 x}{3}+\frac {x \,{\mathrm e}^{-x \,{\mathrm e}^{\frac {3}{x}}+x^{2}}}{3}-\frac {x \ln \left (x \right )}{3}\) \(27\)
parallelrisch \(-\frac {x \ln \left (x \right )}{3}+\frac {x \,{\mathrm e}^{-x \left ({\mathrm e}^{\frac {3}{x}}-x \right )}}{3}+\frac {4 x}{3}\) \(27\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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