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

   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 [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 58, antiderivative size = 28 \[ \int \frac {e^2+\left (-2 x-8 x^2+6 x^3+e^x (2 x+e x)+e \left (-x-4 x^2+3 x^3\right )\right ) \log ^2(x)}{x \log ^2(x)} \, dx=(2+e) \left (e^x-x+(-2+x) x^2\right )-\frac {e^2}{\log (x)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.17 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.36, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {6820, 2225, 2339, 30} \[ \int \frac {e^2+\left (-2 x-8 x^2+6 x^3+e^x (2 x+e x)+e \left (-x-4 x^2+3 x^3\right )\right ) \log ^2(x)}{x \log ^2(x)} \, dx=(2+e) x^3-2 (2+e) x^2-(2+e) x+(2+e) e^x-\frac {e^2}{\log (x)} \]

[In]

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

[Out]

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

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 6820

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.71

method result size
default \(-2 x +\left ({\mathrm e}+2\right ) {\mathrm e}^{x}-\frac {{\mathrm e}^{2}}{\ln \left (x \right )}-4 x^{2}+2 x^{3}-2 x^{2} {\mathrm e}+x^{3} {\mathrm e}-x \,{\mathrm e}\) \(48\)
parts \(-2 x +\left ({\mathrm e}+2\right ) {\mathrm e}^{x}-\frac {{\mathrm e}^{2}}{\ln \left (x \right )}-4 x^{2}+2 x^{3}-2 x^{2} {\mathrm e}+x^{3} {\mathrm e}-x \,{\mathrm e}\) \(48\)
risch \(x^{3} {\mathrm e}-2 x^{2} {\mathrm e}+2 x^{3}-x \,{\mathrm e}+{\mathrm e}^{1+x}-4 x^{2}-2 x +2 \,{\mathrm e}^{x}-\frac {{\mathrm e}^{2}}{\ln \left (x \right )}\) \(49\)
parallelrisch \(-\frac {-x^{3} {\mathrm e} \ln \left (x \right )+2 x^{2} {\mathrm e} \ln \left (x \right )-2 x^{3} \ln \left (x \right )+x \,{\mathrm e} \ln \left (x \right )-\ln \left (x \right ) {\mathrm e}^{x} {\mathrm e}+4 x^{2} \ln \left (x \right )+2 x \ln \left (x \right )-2 \,{\mathrm e}^{x} \ln \left (x \right )+{\mathrm e}^{2}}{\ln \left (x \right )}\) \(67\)

[In]

int((((x*exp(1)+2*x)*exp(x)+(3*x^3-4*x^2-x)*exp(1)+6*x^3-8*x^2-2*x)*ln(x)^2+exp(2))/x/ln(x)^2,x,method=_RETURN
VERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.41 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.75 \[ \int \frac {e^2+\left (-2 x-8 x^2+6 x^3+e^x (2 x+e x)+e \left (-x-4 x^2+3 x^3\right )\right ) \log ^2(x)}{x \log ^2(x)} \, dx=\frac {{\left (2 \, x^{3} - 4 \, x^{2} + {\left (x^{3} - 2 \, x^{2} - x\right )} e + {\left (e + 2\right )} e^{x} - 2 \, x\right )} \log \left (x\right ) - e^{2}}{\log \left (x\right )} \]

[In]

integrate((((x*exp(1)+2*x)*exp(x)+(3*x^3-4*x^2-x)*exp(1)+6*x^3-8*x^2-2*x)*log(x)^2+exp(2))/x/log(x)^2,x, algor
ithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.50 \[ \int \frac {e^2+\left (-2 x-8 x^2+6 x^3+e^x (2 x+e x)+e \left (-x-4 x^2+3 x^3\right )\right ) \log ^2(x)}{x \log ^2(x)} \, dx=x^{3} \cdot \left (2 + e\right ) + x^{2} \left (- 2 e - 4\right ) + x \left (- e - 2\right ) + \left (2 + e\right ) e^{x} - \frac {e^{2}}{\log {\left (x \right )}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.71 \[ \int \frac {e^2+\left (-2 x-8 x^2+6 x^3+e^x (2 x+e x)+e \left (-x-4 x^2+3 x^3\right )\right ) \log ^2(x)}{x \log ^2(x)} \, dx=x^{3} e + 2 \, x^{3} - 2 \, x^{2} e - 4 \, x^{2} - x e - 2 \, x - \frac {e^{2}}{\log \left (x\right )} + e^{\left (x + 1\right )} + 2 \, e^{x} \]

[In]

integrate((((x*exp(1)+2*x)*exp(x)+(3*x^3-4*x^2-x)*exp(1)+6*x^3-8*x^2-2*x)*log(x)^2+exp(2))/x/log(x)^2,x, algor
ithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (27) = 54\).

Time = 0.28 (sec) , antiderivative size = 66, normalized size of antiderivative = 2.36 \[ \int \frac {e^2+\left (-2 x-8 x^2+6 x^3+e^x (2 x+e x)+e \left (-x-4 x^2+3 x^3\right )\right ) \log ^2(x)}{x \log ^2(x)} \, dx=\frac {x^{3} e \log \left (x\right ) + 2 \, x^{3} \log \left (x\right ) - 2 \, x^{2} e \log \left (x\right ) - 4 \, x^{2} \log \left (x\right ) - x e \log \left (x\right ) - 2 \, x \log \left (x\right ) + e^{\left (x + 1\right )} \log \left (x\right ) + 2 \, e^{x} \log \left (x\right ) - e^{2}}{\log \left (x\right )} \]

[In]

integrate((((x*exp(1)+2*x)*exp(x)+(3*x^3-4*x^2-x)*exp(1)+6*x^3-8*x^2-2*x)*log(x)^2+exp(2))/x/log(x)^2,x, algor
ithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.97 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.50 \[ \int \frac {e^2+\left (-2 x-8 x^2+6 x^3+e^x (2 x+e x)+e \left (-x-4 x^2+3 x^3\right )\right ) \log ^2(x)}{x \log ^2(x)} \, dx={\mathrm {e}}^x\,\left (\mathrm {e}+2\right )-\frac {{\mathrm {e}}^2}{\ln \left (x\right )}-x^2\,\left (2\,\mathrm {e}+4\right )-x\,\left (\mathrm {e}+2\right )+x^3\,\left (\mathrm {e}+2\right ) \]

[In]

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

[Out]

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