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

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

Optimal result

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

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(129\) vs. \(2(28)=56\).

Time = 0.62 (sec) , antiderivative size = 129, normalized size of antiderivative = 4.61, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.034, Rules used = {14, 6838, 2326, 2341, 2342} \[ \int \frac {-2 x^3+e^{2 e^{-2+2 x}+8 e^{-1+x} x+8 x^2} \left (-4 e^{-2+2 x} x^2-16 x^3+e^{-1+x} \left (-8 x^2-8 x^3\right )\right )+e^{e^{-2+2 x}+4 e^{-1+x} x+4 x^2} \left (-2 x^2-4 e^{-2+2 x} x^3-16 x^4+e^{-1+x} \left (-8 x^3-8 x^4\right )\right )+2 \log (x)-\log ^2(x)}{x^2} \, dx=-x^2-e^{8 x^2+8 e^{x-1} x+2 e^{2 x-2}}-\frac {2 e^{4 x^2+4 e^{x-1} x+e^{2 x-2}-2} \left (2 e^{x+1} x^2+4 e^2 x^2+e^{2 x} x+2 e^{x+1} x\right )}{2 e^{x-1} x+4 x+2 e^{x-1}+e^{2 x-2}}+\frac {\log ^2(x)}{x} \]

[In]

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

[Out]

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 6838

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[q*(F^v/Log[F]), x] /;  !FalseQ[q]
] /; FreeQ[F, x]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(61\) vs. \(2(26)=52\).

Time = 0.33 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.21

method result size
risch \(\frac {\ln \left (x \right )^{2}}{x}-x^{2}-{\mathrm e}^{2 \,{\mathrm e}^{-2+2 x}+8 x \,{\mathrm e}^{-1+x}+8 x^{2}}-2 x \,{\mathrm e}^{{\mathrm e}^{-2+2 x}+4 x \,{\mathrm e}^{-1+x}+4 x^{2}}\) \(62\)
parallelrisch \(\frac {-2 \,{\mathrm e}^{{\mathrm e}^{-2+2 x}+4 x \,{\mathrm e}^{-1+x}+4 x^{2}} x^{2}-x^{3}+\ln \left (x \right )^{2}-x \,{\mathrm e}^{2 \,{\mathrm e}^{-2+2 x}+8 x \,{\mathrm e}^{-1+x}+8 x^{2}}}{x}\) \(65\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (26) = 52\).

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (20) = 40\).

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 67 vs. \(2 (26) = 52\).

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

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 220 vs. \(2 (26) = 52\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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