3.89.87 \(\int \frac {8 e^{2 x} x+12 x^2+e^x (-8 x-8 x^2)+(-10+6 x^2+e^{2 x} (-2+8 x)+e^x (-4 x-8 x^2)) \log (x)+(-5+x^2-2 e^x x^2+e^{2 x} (-1+2 x)) \log ^2(x)}{x^2} \, dx\)

Optimal. Leaf size=28 \[ 4 x+\frac {x+\left (5+\left (e^x-x\right )^2\right ) (2+\log (x))^2}{x} \]

________________________________________________________________________________________

Rubi [B]  time = 0.28, antiderivative size = 90, normalized size of antiderivative = 3.21, number of steps used = 14, number of rules used = 8, integrand size = 94, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {14, 2288, 2334, 2353, 2296, 2295, 2305, 2304} \begin {gather*} \frac {e^{2 x} (\log (x)+2) (2 x+x \log (x))}{x^2}+8 x+\frac {20}{x}+x \log ^2(x)+\frac {5 \log ^2(x)}{x}-2 x \log (x)+2 \left (3 x+\frac {5}{x}\right ) \log (x)+\frac {10 \log (x)}{x}-\frac {2 e^x (\log (x)+2) (2 x+x \log (x))}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(8*E^(2*x)*x + 12*x^2 + E^x*(-8*x - 8*x^2) + (-10 + 6*x^2 + E^(2*x)*(-2 + 8*x) + E^x*(-4*x - 8*x^2))*Log[x
] + (-5 + x^2 - 2*E^x*x^2 + E^(2*x)*(-1 + 2*x))*Log[x]^2)/x^2,x]

[Out]

20/x + 8*x + (10*Log[x])/x - 2*x*Log[x] + 2*(5/x + 3*x)*Log[x] + (5*Log[x]^2)/x + x*Log[x]^2 + (E^(2*x)*(2 + L
og[x])*(2*x + x*Log[x]))/x^2 - (2*E^x*(2 + Log[x])*(2*x + x*Log[x]))/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 2288

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 2295

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

Rule 2296

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 2304

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 2305

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 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 2353

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {2 e^x (2+\log (x)) (2+2 x+x \log (x))}{x}+\frac {e^{2 x} (2+\log (x)) (4 x-\log (x)+2 x \log (x))}{x^2}+\frac {12 x^2-10 \log (x)+6 x^2 \log (x)-5 \log ^2(x)+x^2 \log ^2(x)}{x^2}\right ) \, dx\\ &=-\left (2 \int \frac {e^x (2+\log (x)) (2+2 x+x \log (x))}{x} \, dx\right )+\int \frac {e^{2 x} (2+\log (x)) (4 x-\log (x)+2 x \log (x))}{x^2} \, dx+\int \frac {12 x^2-10 \log (x)+6 x^2 \log (x)-5 \log ^2(x)+x^2 \log ^2(x)}{x^2} \, dx\\ &=\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}+\int \left (12+\frac {2 \left (-5+3 x^2\right ) \log (x)}{x^2}+\frac {\left (-5+x^2\right ) \log ^2(x)}{x^2}\right ) \, dx\\ &=12 x+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}+2 \int \frac {\left (-5+3 x^2\right ) \log (x)}{x^2} \, dx+\int \frac {\left (-5+x^2\right ) \log ^2(x)}{x^2} \, dx\\ &=12 x+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}-2 \int \left (3+\frac {5}{x^2}\right ) \, dx+\int \left (\log ^2(x)-\frac {5 \log ^2(x)}{x^2}\right ) \, dx\\ &=\frac {10}{x}+6 x+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}-5 \int \frac {\log ^2(x)}{x^2} \, dx+\int \log ^2(x) \, dx\\ &=\frac {10}{x}+6 x+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {5 \log ^2(x)}{x}+x \log ^2(x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}-2 \int \log (x) \, dx-10 \int \frac {\log (x)}{x^2} \, dx\\ &=\frac {20}{x}+8 x+\frac {10 \log (x)}{x}-2 x \log (x)+2 \left (\frac {5}{x}+3 x\right ) \log (x)+\frac {5 \log ^2(x)}{x}+x \log ^2(x)+\frac {e^{2 x} (2+\log (x)) (2 x+x \log (x))}{x^2}-\frac {2 e^x (2+\log (x)) (2 x+x \log (x))}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.09, size = 66, normalized size = 2.36 \begin {gather*} \frac {4 \left (5+e^{2 x}-2 e^x x+2 x^2\right )+4 \left (5+e^{2 x}-2 e^x x+x^2\right ) \log (x)+\left (5+e^{2 x}-2 e^x x+x^2\right ) \log ^2(x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(8*E^(2*x)*x + 12*x^2 + E^x*(-8*x - 8*x^2) + (-10 + 6*x^2 + E^(2*x)*(-2 + 8*x) + E^x*(-4*x - 8*x^2))
*Log[x] + (-5 + x^2 - 2*E^x*x^2 + E^(2*x)*(-1 + 2*x))*Log[x]^2)/x^2,x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 59, normalized size = 2.11 \begin {gather*} \frac {{\left (x^{2} - 2 \, x e^{x} + e^{\left (2 \, x\right )} + 5\right )} \log \relax (x)^{2} + 8 \, x^{2} - 8 \, x e^{x} + 4 \, {\left (x^{2} - 2 \, x e^{x} + e^{\left (2 \, x\right )} + 5\right )} \log \relax (x) + 4 \, e^{\left (2 \, x\right )} + 20}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x-1)*exp(x)^2-2*exp(x)*x^2+x^2-5)*log(x)^2+((8*x-2)*exp(x)^2+(-8*x^2-4*x)*exp(x)+6*x^2-10)*log(
x)+8*x*exp(x)^2+(-8*x^2-8*x)*exp(x)+12*x^2)/x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.12, size = 80, normalized size = 2.86 \begin {gather*} \frac {x^{2} \log \relax (x)^{2} - 2 \, x e^{x} \log \relax (x)^{2} + 4 \, x^{2} \log \relax (x) - 8 \, x e^{x} \log \relax (x) + e^{\left (2 \, x\right )} \log \relax (x)^{2} + 8 \, x^{2} - 8 \, x e^{x} + 4 \, e^{\left (2 \, x\right )} \log \relax (x) + 5 \, \log \relax (x)^{2} + 4 \, e^{\left (2 \, x\right )} + 20 \, \log \relax (x) + 20}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x-1)*exp(x)^2-2*exp(x)*x^2+x^2-5)*log(x)^2+((8*x-2)*exp(x)^2+(-8*x^2-4*x)*exp(x)+6*x^2-10)*log(
x)+8*x*exp(x)^2+(-8*x^2-8*x)*exp(x)+12*x^2)/x^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.10, size = 66, normalized size = 2.36




method result size



risch \(\frac {\left (x^{2}-2 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x}+5\right ) \ln \relax (x )^{2}}{x}+\frac {4 \left (x^{2}-2 \,{\mathrm e}^{x} x +{\mathrm e}^{2 x}+5\right ) \ln \relax (x )}{x}+\frac {8 x^{2}-8 \,{\mathrm e}^{x} x +4 \,{\mathrm e}^{2 x}+20}{x}\) \(66\)
default \(8 x -8 \,{\mathrm e}^{x} \ln \relax (x )-2 \,{\mathrm e}^{x} \ln \relax (x )^{2}-8 \,{\mathrm e}^{x}+\frac {\ln \relax (x )^{2} {\mathrm e}^{2 x}+4 \ln \relax (x ) {\mathrm e}^{2 x}+4 \,{\mathrm e}^{2 x}}{x}+x \ln \relax (x )^{2}+4 x \ln \relax (x )+\frac {5 \ln \relax (x )^{2}}{x}+\frac {20 \ln \relax (x )}{x}+\frac {20}{x}\) \(83\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((2*x-1)*exp(x)^2-2*exp(x)*x^2+x^2-5)*ln(x)^2+((8*x-2)*exp(x)^2+(-8*x^2-4*x)*exp(x)+6*x^2-10)*ln(x)+8*x*e
xp(x)^2+(-8*x^2-8*x)*exp(x)+12*x^2)/x^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} 6 \, x \log \relax (x) - 8 \, e^{x} \log \relax (x) + 6 \, x - \frac {2 \, x e^{x} \log \relax (x)^{2} - {\left (x^{2} + 5\right )} \log \relax (x)^{2} - 2 \, x^{2} - {\left (\log \relax (x)^{2} + 4 \, \log \relax (x)\right )} e^{\left (2 \, x\right )} + 2 \, {\left (x^{2} - 5\right )} \log \relax (x) - 10}{x} + \frac {10 \, \log \relax (x)}{x} + \frac {10}{x} + 8 \, {\rm Ei}\left (2 \, x\right ) - 8 \, e^{x} - 4 \, \int \frac {e^{\left (2 \, x\right )}}{x^{2}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x-1)*exp(x)^2-2*exp(x)*x^2+x^2-5)*log(x)^2+((8*x-2)*exp(x)^2+(-8*x^2-4*x)*exp(x)+6*x^2-10)*log(
x)+8*x*exp(x)^2+(-8*x^2-8*x)*exp(x)+12*x^2)/x^2,x, algorithm="maxima")

[Out]

6*x*log(x) - 8*e^x*log(x) + 6*x - (2*x*e^x*log(x)^2 - (x^2 + 5)*log(x)^2 - 2*x^2 - (log(x)^2 + 4*log(x))*e^(2*
x) + 2*(x^2 - 5)*log(x) - 10)/x + 10*log(x)/x + 10/x + 8*Ei(2*x) - 8*e^x - 4*integrate(e^(2*x)/x^2, x)

________________________________________________________________________________________

mupad [B]  time = 5.35, size = 70, normalized size = 2.50 \begin {gather*} \frac {4\,{\mathrm {e}}^{2\,x}+20\,\ln \relax (x)+5\,{\ln \relax (x)}^2+4\,{\mathrm {e}}^{2\,x}\,\ln \relax (x)+{\mathrm {e}}^{2\,x}\,{\ln \relax (x)}^2+20}{x}-8\,{\mathrm {e}}^x\,\ln \relax (x)-8\,{\mathrm {e}}^x-2\,{\mathrm {e}}^x\,{\ln \relax (x)}^2+x\,\left ({\ln \relax (x)}^2+4\,\ln \relax (x)+8\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x)^2*(2*x^2*exp(x) - exp(2*x)*(2*x - 1) - x^2 + 5) - 8*x*exp(2*x) + log(x)*(exp(x)*(4*x + 8*x^2) - e
xp(2*x)*(8*x - 2) - 6*x^2 + 10) + exp(x)*(8*x + 8*x^2) - 12*x^2)/x^2,x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.44, size = 71, normalized size = 2.54 \begin {gather*} 8 x + \frac {\left (x^{2} + 5\right ) \log {\relax (x )}^{2}}{x} + \frac {\left (4 x^{2} + 20\right ) \log {\relax (x )}}{x} + \frac {\left (- 2 x \log {\relax (x )}^{2} - 8 x \log {\relax (x )} - 8 x\right ) e^{x} + \left (\log {\relax (x )}^{2} + 4 \log {\relax (x )} + 4\right ) e^{2 x}}{x} + \frac {20}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________