\(\int \frac {2 e^{5/2} x^2+e^{5/4} (2 x+2 x^2)+(2+4 x+2 x^2+e^{5/4} (2 x+4 x^2)) \log (x)+(2 x+2 x^2) \log ^2(x)}{e^{5/2} x} \, dx\) [9402]

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

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(179\) vs. \(2(15)=30\).

Time = 0.11 (sec) , antiderivative size = 179, normalized size of antiderivative = 11.93, number of steps used = 14, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.117, Rules used = {12, 14, 2404, 2332, 2338, 2341, 2367, 2333, 2342} \[ \int \frac {2 e^{5/2} x^2+e^{5/4} \left (2 x+2 x^2\right )+\left (2+4 x+2 x^2+e^{5/4} \left (2 x+4 x^2\right )\right ) \log (x)+\left (2 x+2 x^2\right ) \log ^2(x)}{e^{5/2} x} \, dx=-\frac {\left (1+2 e^{5/4}\right ) x^2}{2 e^{5/2}}+\frac {x^2}{2 e^{5/2}}+\frac {x^2 \log ^2(x)}{e^{5/2}}+\frac {\left (1+2 e^{5/4}\right ) x^2 \log (x)}{e^{5/2}}-\frac {x^2 \log (x)}{e^{5/2}}-\frac {2 \left (2+e^{5/4}\right ) x}{e^{5/2}}+\frac {4 x}{e^{5/2}}+\frac {\left (\left (1+e^{5/4}\right ) x+1\right )^2}{e^{5/4} \left (1+e^{5/4}\right )}+\frac {2 x \log ^2(x)}{e^{5/2}}+\frac {\log ^2(x)}{e^{5/2}}+\frac {2 \left (2+e^{5/4}\right ) x \log (x)}{e^{5/2}}-\frac {4 x \log (x)}{e^{5/2}} \]

[In]

Int[(2*E^(5/2)*x^2 + E^(5/4)*(2*x + 2*x^2) + (2 + 4*x + 2*x^2 + E^(5/4)*(2*x + 4*x^2))*Log[x] + (2*x + 2*x^2)*
Log[x]^2)/(E^(5/2)*x),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 2332

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

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, 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 2367

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

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

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.47 \[ \int \frac {2 e^{5/2} x^2+e^{5/4} \left (2 x+2 x^2\right )+\left (2+4 x+2 x^2+e^{5/4} \left (2 x+4 x^2\right )\right ) \log (x)+\left (2 x+2 x^2\right ) \log ^2(x)}{e^{5/2} x} \, dx=\frac {\left (e^{5/4} x+(1+x) \log (x)\right )^2}{e^{5/2}} \]

[In]

Integrate[(2*E^(5/2)*x^2 + E^(5/4)*(2*x + 2*x^2) + (2 + 4*x + 2*x^2 + E^(5/4)*(2*x + 4*x^2))*Log[x] + (2*x + 2
*x^2)*Log[x]^2)/(E^(5/2)*x),x]

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(29\) vs. \(2(14)=28\).

Time = 0.27 (sec) , antiderivative size = 30, normalized size of antiderivative = 2.00

method result size
risch \({\mathrm e}^{-\frac {5}{2}} \left (x^{2}+2 x +1\right ) \ln \left (x \right )^{2}+2 \,{\mathrm e}^{-\frac {5}{4}} \left (1+x \right ) x \ln \left (x \right )+x^{2}\) \(30\)
parallelrisch \({\mathrm e}^{-\frac {5}{2}} \left (x^{2} {\mathrm e}^{\frac {5}{2}}+2 \ln \left (x \right ) {\mathrm e}^{\frac {5}{4}} x^{2}+x^{2} \ln \left (x \right )^{2}+2 \ln \left (x \right ) {\mathrm e}^{\frac {5}{4}} x +2 x \ln \left (x \right )^{2}+\ln \left (x \right )^{2}\right )\) \(50\)
norman \(\left ({\mathrm e}^{-\frac {5}{4}} \ln \left (x \right )^{2}+{\mathrm e}^{\frac {5}{4}} x^{2}+{\mathrm e}^{-\frac {5}{4}} x^{2} \ln \left (x \right )^{2}+2 x \ln \left (x \right )+2 x^{2} \ln \left (x \right )+2 \,{\mathrm e}^{-\frac {5}{4}} x \ln \left (x \right )^{2}\right ) {\mathrm e}^{-\frac {5}{4}}\) \(57\)
default \({\mathrm e}^{-\frac {5}{2}} \left (x^{2} \ln \left (x \right )^{2}+4 \,{\mathrm e}^{\frac {5}{4}} \left (\frac {x^{2} \ln \left (x \right )}{2}-\frac {x^{2}}{4}\right )+x^{2} {\mathrm e}^{\frac {5}{2}}+2 x \ln \left (x \right )^{2}+2 \,{\mathrm e}^{\frac {5}{4}} \left (x \ln \left (x \right )-x \right )+{\mathrm e}^{\frac {5}{4}} x^{2}+2 x \,{\mathrm e}^{\frac {5}{4}}+\ln \left (x \right )^{2}\right )\) \(74\)
parts \(2 \,{\mathrm e}^{-\frac {5}{4}} \left (\frac {{\mathrm e}^{\frac {5}{4}} x^{2}}{2}+\frac {x^{2}}{2}+x \right )+2 \,{\mathrm e}^{-\frac {5}{2}} \left (\frac {x^{2} \ln \left (x \right )^{2}}{2}-\frac {x^{2} \ln \left (x \right )}{2}+\frac {x^{2}}{4}+x \ln \left (x \right )^{2}-2 x \ln \left (x \right )+2 x \right )+2 \,{\mathrm e}^{-\frac {5}{2}} \left (2 \,{\mathrm e}^{\frac {5}{4}} \left (\frac {x^{2} \ln \left (x \right )}{2}-\frac {x^{2}}{4}\right )+{\mathrm e}^{\frac {5}{4}} \left (x \ln \left (x \right )-x \right )+\frac {x^{2} \ln \left (x \right )}{2}-\frac {x^{2}}{4}+2 x \ln \left (x \right )-2 x +\frac {\ln \left (x \right )^{2}}{2}\right )\) \(125\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 34 vs. \(2 (12) = 24\).

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

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 37 vs. \(2 (14) = 28\).

Time = 0.12 (sec) , antiderivative size = 37, normalized size of antiderivative = 2.47 \[ \int \frac {2 e^{5/2} x^2+e^{5/4} \left (2 x+2 x^2\right )+\left (2+4 x+2 x^2+e^{5/4} \left (2 x+4 x^2\right )\right ) \log (x)+\left (2 x+2 x^2\right ) \log ^2(x)}{e^{5/2} x} \, dx=x^{2} + \frac {\left (2 x^{2} + 2 x\right ) \log {\left (x \right )}}{e^{\frac {5}{4}}} + \frac {\left (x^{2} + 2 x + 1\right ) \log {\left (x \right )}^{2}}{e^{\frac {5}{2}}} \]

[In]

integrate(((2*x**2+2*x)*ln(x)**2+((4*x**2+2*x)*exp(5/4)+2*x**2+4*x+2)*ln(x)+2*x**2*exp(5/4)**2+(2*x**2+2*x)*ex
p(5/4))/x/exp(5/4)**2,x)

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 108 vs. \(2 (12) = 24\).

Time = 0.19 (sec) , antiderivative size = 108, normalized size of antiderivative = 7.20 \[ \int \frac {2 e^{5/2} x^2+e^{5/4} \left (2 x+2 x^2\right )+\left (2+4 x+2 x^2+e^{5/4} \left (2 x+4 x^2\right )\right ) \log (x)+\left (2 x+2 x^2\right ) \log ^2(x)}{e^{5/2} x} \, dx=\frac {1}{2} \, {\left ({\left (2 \, \log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 1\right )} x^{2} + 2 \, x^{2} e^{\frac {5}{2}} + 2 \, x^{2} e^{\frac {5}{4}} + 2 \, x^{2} \log \left (x\right ) + 4 \, {\left (\log \left (x\right )^{2} - 2 \, \log \left (x\right ) + 2\right )} x - x^{2} + 2 \, {\left (2 \, x^{2} \log \left (x\right ) - x^{2}\right )} e^{\frac {5}{4}} + 4 \, {\left (x \log \left (x\right ) - x\right )} e^{\frac {5}{4}} + 4 \, x e^{\frac {5}{4}} + 8 \, x \log \left (x\right ) + 2 \, \log \left (x\right )^{2} - 8 \, x\right )} e^{\left (-\frac {5}{2}\right )} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (12) = 24\).

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 14.64 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.07 \[ \int \frac {2 e^{5/2} x^2+e^{5/4} \left (2 x+2 x^2\right )+\left (2+4 x+2 x^2+e^{5/4} \left (2 x+4 x^2\right )\right ) \log (x)+\left (2 x+2 x^2\right ) \log ^2(x)}{e^{5/2} x} \, dx={\mathrm {e}}^{-\frac {5}{2}}\,{\left (\ln \left (x\right )+x\,{\mathrm {e}}^{5/4}+x\,\ln \left (x\right )\right )}^2 \]

[In]

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

[Out]

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