\(\int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} (2 x^4+2 x^5)+e^x (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6)+(2+10 x-2 x^3-2 e^x x^3) \log (x)-2 \log ^2(x)}{x^3} \, dx\) [3060]

   Optimal result
   Rubi [B] (verified)
   Mathematica [B] (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 = 107, antiderivative size = 26 \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=7+\left (6+3 x+e^x x+x^2-\frac {x+\log (x)}{x}\right )^2 \]

[Out]

7+(6+x^2+3*x-(x+ln(x))/x+exp(x)*x)^2

Rubi [B] (verified)

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

Time = 0.32 (sec) , antiderivative size = 90, normalized size of antiderivative = 3.46, number of steps used = 38, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.131, Rules used = {14, 2227, 2207, 2225, 6874, 2230, 2209, 2634, 1597, 1634, 2404, 2332, 2341, 2342} \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=x^4+2 e^x x^3+\frac {8 x^3}{3}+6 e^x x^2+e^{2 x} x^2+9 x^2+\frac {\log ^2(x)}{x^2}+10 e^x x+20 x+\frac {10}{3} (x+1)^3-2 x \log (x)-2 e^x \log (x)-6 \log (x)-\frac {10 \log (x)}{x} \]

[In]

Int[(-10*x - 6*x^2 + 28*x^3 + 38*x^4 + 18*x^5 + 4*x^6 + E^(2*x)*(2*x^4 + 2*x^5) + E^x*(-2*x^2 + 10*x^3 + 22*x^
4 + 12*x^5 + 2*x^6) + (2 + 10*x - 2*x^3 - 2*E^x*x^3)*Log[x] - 2*Log[x]^2)/x^3,x]

[Out]

20*x + 10*E^x*x + 9*x^2 + 6*E^x*x^2 + E^(2*x)*x^2 + (8*x^3)/3 + 2*E^x*x^3 + x^4 + (10*(1 + x)^3)/3 - 6*Log[x]
- 2*E^x*Log[x] - (10*Log[x])/x - 2*x*Log[x] + Log[x]^2/x^2

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 1597

Int[(Px_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[Coeff[Px, x, n - m - 1]*((a + b*x^n)^(p
 + 1)/(b*n*(p + 1))), x] + Int[(Px - Coeff[Px, x, n - m - 1]*x^(n - m - 1))*x^m*(a + b*x^n)^p, x] /; FreeQ[{a,
 b, m, n}, x] && PolyQ[Px, x] && IGtQ[p, 1] && IGtQ[n - m, 0] && NeQ[Coeff[Px, x, n - m - 1], 0]

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

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 2227

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !TrueQ[$UseGamma]

Rule 2230

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !TrueQ[$UseGamma]

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 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 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]

Rule 2634

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*(D[u, x]
/u), x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (2 e^{2 x} x (1+x)+\frac {2 e^x \left (-1+5 x+11 x^2+6 x^3+x^4-x \log (x)\right )}{x}+\frac {2 \left (-5 x-3 x^2+14 x^3+19 x^4+9 x^5+2 x^6+\log (x)+5 x \log (x)-x^3 \log (x)-\log ^2(x)\right )}{x^3}\right ) \, dx \\ & = 2 \int e^{2 x} x (1+x) \, dx+2 \int \frac {e^x \left (-1+5 x+11 x^2+6 x^3+x^4-x \log (x)\right )}{x} \, dx+2 \int \frac {-5 x-3 x^2+14 x^3+19 x^4+9 x^5+2 x^6+\log (x)+5 x \log (x)-x^3 \log (x)-\log ^2(x)}{x^3} \, dx \\ & = 2 \int \left (e^{2 x} x+e^{2 x} x^2\right ) \, dx+2 \int \left (\frac {e^x \left (-1+5 x+11 x^2+6 x^3+x^4\right )}{x}-e^x \log (x)\right ) \, dx+2 \int \left (\frac {(1+x)^2 \left (-5+7 x+5 x^2+2 x^3\right )}{x^2}-\frac {\left (-1-5 x+x^3\right ) \log (x)}{x^3}-\frac {\log ^2(x)}{x^3}\right ) \, dx \\ & = 2 \int e^{2 x} x \, dx+2 \int e^{2 x} x^2 \, dx+2 \int \frac {(1+x)^2 \left (-5+7 x+5 x^2+2 x^3\right )}{x^2} \, dx+2 \int \frac {e^x \left (-1+5 x+11 x^2+6 x^3+x^4\right )}{x} \, dx-2 \int e^x \log (x) \, dx-2 \int \frac {\left (-1-5 x+x^3\right ) \log (x)}{x^3} \, dx-2 \int \frac {\log ^2(x)}{x^3} \, dx \\ & = e^{2 x} x+e^{2 x} x^2+\frac {10}{3} (1+x)^3-2 e^x \log (x)+\frac {\log ^2(x)}{x^2}+2 \int \frac {e^x}{x} \, dx-2 \int e^{2 x} x \, dx+2 \int \frac {(1+x)^2 \left (-5+7 x+2 x^3\right )}{x^2} \, dx+2 \int \left (5 e^x-\frac {e^x}{x}+11 e^x x+6 e^x x^2+e^x x^3\right ) \, dx-2 \int \frac {\log (x)}{x^3} \, dx-2 \int \left (\log (x)-\frac {\log (x)}{x^3}-\frac {5 \log (x)}{x^2}\right ) \, dx-\int e^{2 x} \, dx \\ & = -\frac {e^{2 x}}{2}+\frac {1}{2 x^2}+e^{2 x} x^2+\frac {10}{3} (1+x)^3+2 \text {Ei}(x)-2 e^x \log (x)+\frac {\log (x)}{x^2}+\frac {\log ^2(x)}{x^2}-2 \int \frac {e^x}{x} \, dx+2 \int e^x x^3 \, dx+2 \int \left (9-\frac {5}{x^2}-\frac {3}{x}+9 x+4 x^2+2 x^3\right ) \, dx-2 \int \log (x) \, dx+2 \int \frac {\log (x)}{x^3} \, dx+10 \int e^x \, dx+10 \int \frac {\log (x)}{x^2} \, dx+12 \int e^x x^2 \, dx+22 \int e^x x \, dx+\int e^{2 x} \, dx \\ & = 10 e^x+20 x+22 e^x x+9 x^2+12 e^x x^2+e^{2 x} x^2+\frac {8 x^3}{3}+2 e^x x^3+x^4+\frac {10}{3} (1+x)^3-6 \log (x)-2 e^x \log (x)-\frac {10 \log (x)}{x}-2 x \log (x)+\frac {\log ^2(x)}{x^2}-6 \int e^x x^2 \, dx-22 \int e^x \, dx-24 \int e^x x \, dx \\ & = -12 e^x+20 x-2 e^x x+9 x^2+6 e^x x^2+e^{2 x} x^2+\frac {8 x^3}{3}+2 e^x x^3+x^4+\frac {10}{3} (1+x)^3-6 \log (x)-2 e^x \log (x)-\frac {10 \log (x)}{x}-2 x \log (x)+\frac {\log ^2(x)}{x^2}+12 \int e^x x \, dx+24 \int e^x \, dx \\ & = 12 e^x+20 x+10 e^x x+9 x^2+6 e^x x^2+e^{2 x} x^2+\frac {8 x^3}{3}+2 e^x x^3+x^4+\frac {10}{3} (1+x)^3-6 \log (x)-2 e^x \log (x)-\frac {10 \log (x)}{x}-2 x \log (x)+\frac {\log ^2(x)}{x^2}-12 \int e^x \, dx \\ & = 20 x+10 e^x x+9 x^2+6 e^x x^2+e^{2 x} x^2+\frac {8 x^3}{3}+2 e^x x^3+x^4+\frac {10}{3} (1+x)^3-6 \log (x)-2 e^x \log (x)-\frac {10 \log (x)}{x}-2 x \log (x)+\frac {\log ^2(x)}{x^2} \\ \end{align*}

Mathematica [B] (verified)

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

Time = 0.11 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.42 \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=\frac {x^3 \left (30+19 x+e^{2 x} x+6 x^2+x^3+2 e^x \left (5+3 x+x^2\right )\right )-2 x \left (5+\left (3+e^x\right ) x+x^2\right ) \log (x)+\log ^2(x)}{x^2} \]

[In]

Integrate[(-10*x - 6*x^2 + 28*x^3 + 38*x^4 + 18*x^5 + 4*x^6 + E^(2*x)*(2*x^4 + 2*x^5) + E^x*(-2*x^2 + 10*x^3 +
 22*x^4 + 12*x^5 + 2*x^6) + (2 + 10*x - 2*x^3 - 2*E^x*x^3)*Log[x] - 2*Log[x]^2)/x^3,x]

[Out]

(x^3*(30 + 19*x + E^(2*x)*x + 6*x^2 + x^3 + 2*E^x*(5 + 3*x + x^2)) - 2*x*(5 + (3 + E^x)*x + x^2)*Log[x] + Log[
x]^2)/x^2

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(73\) vs. \(2(25)=50\).

Time = 0.14 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.85

method result size
risch \(\frac {\ln \left (x \right )^{2}}{x^{2}}-\frac {2 \left (x^{2}+{\mathrm e}^{x} x +5\right ) \ln \left (x \right )}{x}+x^{4}+2 \,{\mathrm e}^{x} x^{3}+{\mathrm e}^{2 x} x^{2}+6 x^{3}+6 \,{\mathrm e}^{x} x^{2}+19 x^{2}+10 \,{\mathrm e}^{x} x -6 \ln \left (x \right )+30 x +25\) \(74\)
default \(10 \,{\mathrm e}^{x} x +6 \,{\mathrm e}^{x} x^{2}+2 \,{\mathrm e}^{x} x^{3}-2 \,{\mathrm e}^{x} \ln \left (x \right )+\frac {\ln \left (x \right )^{2}}{x^{2}}+x^{4}+6 x^{3}+19 x^{2}+30 x -6 \ln \left (x \right )+{\mathrm e}^{2 x} x^{2}-2 x \ln \left (x \right )-\frac {10 \ln \left (x \right )}{x}\) \(75\)
parts \(10 \,{\mathrm e}^{x} x +6 \,{\mathrm e}^{x} x^{2}+2 \,{\mathrm e}^{x} x^{3}-2 \,{\mathrm e}^{x} \ln \left (x \right )+\frac {\ln \left (x \right )^{2}}{x^{2}}+x^{4}+6 x^{3}+19 x^{2}+30 x -6 \ln \left (x \right )+{\mathrm e}^{2 x} x^{2}-2 x \ln \left (x \right )-\frac {10 \ln \left (x \right )}{x}\) \(75\)
parallelrisch \(-\frac {-x^{6}-2 x^{5} {\mathrm e}^{x}-{\mathrm e}^{2 x} x^{4}-6 x^{5}-6 \,{\mathrm e}^{x} x^{4}-19 x^{4}+2 x^{3} \ln \left (x \right )-10 \,{\mathrm e}^{x} x^{3}+2 x^{2} {\mathrm e}^{x} \ln \left (x \right )+6 x^{2} \ln \left (x \right )-30 x^{3}+10 x \ln \left (x \right )-\ln \left (x \right )^{2}}{x^{2}}\) \(91\)

[In]

int((-2*ln(x)^2+(-2*exp(x)*x^3-2*x^3+10*x+2)*ln(x)+(2*x^5+2*x^4)*exp(x)^2+(2*x^6+12*x^5+22*x^4+10*x^3-2*x^2)*e
xp(x)+4*x^6+18*x^5+38*x^4+28*x^3-6*x^2-10*x)/x^3,x,method=_RETURNVERBOSE)

[Out]

ln(x)^2/x^2-2*(x^2+exp(x)*x+5)/x*ln(x)+x^4+2*exp(x)*x^3+exp(x)^2*x^2+6*x^3+6*exp(x)*x^2+19*x^2+10*exp(x)*x-6*l
n(x)+30*x+25

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (25) = 50\).

Time = 0.26 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.88 \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=\frac {x^{6} + 6 \, x^{5} + x^{4} e^{\left (2 \, x\right )} + 19 \, x^{4} + 30 \, x^{3} + 2 \, {\left (x^{5} + 3 \, x^{4} + 5 \, x^{3}\right )} e^{x} - 2 \, {\left (x^{3} + x^{2} e^{x} + 3 \, x^{2} + 5 \, x\right )} \log \left (x\right ) + \log \left (x\right )^{2}}{x^{2}} \]

[In]

integrate((-2*log(x)^2+(-2*exp(x)*x^3-2*x^3+10*x+2)*log(x)+(2*x^5+2*x^4)*exp(x)^2+(2*x^6+12*x^5+22*x^4+10*x^3-
2*x^2)*exp(x)+4*x^6+18*x^5+38*x^4+28*x^3-6*x^2-10*x)/x^3,x, algorithm="fricas")

[Out]

(x^6 + 6*x^5 + x^4*e^(2*x) + 19*x^4 + 30*x^3 + 2*(x^5 + 3*x^4 + 5*x^3)*e^x - 2*(x^3 + x^2*e^x + 3*x^2 + 5*x)*l
og(x) + log(x)^2)/x^2

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (22) = 44\).

Time = 0.19 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.81 \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=x^{4} + 6 x^{3} + x^{2} e^{2 x} + 19 x^{2} + 30 x + \left (2 x^{3} + 6 x^{2} + 10 x - 2 \log {\left (x \right )}\right ) e^{x} - 6 \log {\left (x \right )} + \frac {\left (- 2 x^{2} - 10\right ) \log {\left (x \right )}}{x} + \frac {\log {\left (x \right )}^{2}}{x^{2}} \]

[In]

integrate((-2*ln(x)**2+(-2*exp(x)*x**3-2*x**3+10*x+2)*ln(x)+(2*x**5+2*x**4)*exp(x)**2+(2*x**6+12*x**5+22*x**4+
10*x**3-2*x**2)*exp(x)+4*x**6+18*x**5+38*x**4+28*x**3-6*x**2-10*x)/x**3,x)

[Out]

x**4 + 6*x**3 + x**2*exp(2*x) + 19*x**2 + 30*x + (2*x**3 + 6*x**2 + 10*x - 2*log(x))*exp(x) - 6*log(x) + (-2*x
**2 - 10)*log(x)/x + log(x)**2/x**2

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 135 vs. \(2 (25) = 50\).

Time = 0.23 (sec) , antiderivative size = 135, normalized size of antiderivative = 5.19 \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=x^{4} + 6 \, x^{3} + 19 \, x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} - 2 \, x + 1\right )} e^{\left (2 \, x\right )} + \frac {1}{2} \, {\left (2 \, x - 1\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x^{3} - 3 \, x^{2} + 6 \, x - 6\right )} e^{x} + 12 \, {\left (x^{2} - 2 \, x + 2\right )} e^{x} + 22 \, {\left (x - 1\right )} e^{x} - 2 \, x \log \left (x\right ) - 2 \, e^{x} \log \left (x\right ) + 30 \, x - \frac {10 \, \log \left (x\right )}{x} + \frac {2 \, \log \left (x\right )^{2} + 2 \, \log \left (x\right ) + 1}{2 \, x^{2}} - \frac {\log \left (x\right )}{x^{2}} - \frac {1}{2 \, x^{2}} + 10 \, e^{x} - 6 \, \log \left (x\right ) \]

[In]

integrate((-2*log(x)^2+(-2*exp(x)*x^3-2*x^3+10*x+2)*log(x)+(2*x^5+2*x^4)*exp(x)^2+(2*x^6+12*x^5+22*x^4+10*x^3-
2*x^2)*exp(x)+4*x^6+18*x^5+38*x^4+28*x^3-6*x^2-10*x)/x^3,x, algorithm="maxima")

[Out]

x^4 + 6*x^3 + 19*x^2 + 1/2*(2*x^2 - 2*x + 1)*e^(2*x) + 1/2*(2*x - 1)*e^(2*x) + 2*(x^3 - 3*x^2 + 6*x - 6)*e^x +
 12*(x^2 - 2*x + 2)*e^x + 22*(x - 1)*e^x - 2*x*log(x) - 2*e^x*log(x) + 30*x - 10*log(x)/x + 1/2*(2*log(x)^2 +
2*log(x) + 1)/x^2 - log(x)/x^2 - 1/2/x^2 + 10*e^x - 6*log(x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 84 vs. \(2 (25) = 50\).

Time = 0.26 (sec) , antiderivative size = 84, normalized size of antiderivative = 3.23 \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=\frac {x^{6} + 2 \, x^{5} e^{x} + 6 \, x^{5} + x^{4} e^{\left (2 \, x\right )} + 6 \, x^{4} e^{x} + 19 \, x^{4} + 10 \, x^{3} e^{x} - 2 \, x^{3} \log \left (x\right ) - 2 \, x^{2} e^{x} \log \left (x\right ) + 30 \, x^{3} - 6 \, x^{2} \log \left (x\right ) - 10 \, x \log \left (x\right ) + \log \left (x\right )^{2}}{x^{2}} \]

[In]

integrate((-2*log(x)^2+(-2*exp(x)*x^3-2*x^3+10*x+2)*log(x)+(2*x^5+2*x^4)*exp(x)^2+(2*x^6+12*x^5+22*x^4+10*x^3-
2*x^2)*exp(x)+4*x^6+18*x^5+38*x^4+28*x^3-6*x^2-10*x)/x^3,x, algorithm="giac")

[Out]

(x^6 + 2*x^5*e^x + 6*x^5 + x^4*e^(2*x) + 6*x^4*e^x + 19*x^4 + 10*x^3*e^x - 2*x^3*log(x) - 2*x^2*e^x*log(x) + 3
0*x^3 - 6*x^2*log(x) - 10*x*log(x) + log(x)^2)/x^2

Mupad [B] (verification not implemented)

Time = 9.82 (sec) , antiderivative size = 78, normalized size of antiderivative = 3.00 \[ \int \frac {-10 x-6 x^2+28 x^3+38 x^4+18 x^5+4 x^6+e^{2 x} \left (2 x^4+2 x^5\right )+e^x \left (-2 x^2+10 x^3+22 x^4+12 x^5+2 x^6\right )+\left (2+10 x-2 x^3-2 e^x x^3\right ) \log (x)-2 \log ^2(x)}{x^3} \, dx=30\,x-6\,\ln \left (x\right )+x^2\,{\mathrm {e}}^{2\,x}+\frac {{\ln \left (x\right )}^2}{x^2}-\ln \left (x\right )\,\left (4\,x+2\,{\mathrm {e}}^x-\frac {2\,x^2-10}{x}\right )+19\,x^2+6\,x^3+x^4+{\mathrm {e}}^x\,\left (2\,x^3+6\,x^2+10\,x\right ) \]

[In]

int((exp(2*x)*(2*x^4 + 2*x^5) - 2*log(x)^2 - 10*x + exp(x)*(10*x^3 - 2*x^2 + 22*x^4 + 12*x^5 + 2*x^6) + log(x)
*(10*x - 2*x^3*exp(x) - 2*x^3 + 2) - 6*x^2 + 28*x^3 + 38*x^4 + 18*x^5 + 4*x^6)/x^3,x)

[Out]

30*x - 6*log(x) + x^2*exp(2*x) + log(x)^2/x^2 - log(x)*(4*x + 2*exp(x) - (2*x^2 - 10)/x) + 19*x^2 + 6*x^3 + x^
4 + exp(x)*(10*x + 6*x^2 + 2*x^3)