3.87.73 \(\int \frac {x+e^x (-2-2 x) x-4 x^2 \log (x)-4 x^2 \log ^2(x)}{2 x} \, dx\)

Optimal. Leaf size=22 \[ -1+\frac {x}{2}-e^x x-x^2 \log ^2(x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 26, normalized size of antiderivative = 1.18, number of steps used = 8, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {12, 14, 2176, 2194, 2304, 2305} \begin {gather*} -x^2 \log ^2(x)+e^x+\frac {x}{2}-e^x (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x + x/2 - E^x*(1 + x) - x^2*Log[x]^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 2176

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] &&  !$UseGamma === True

Rule 2194

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \frac {x+e^x (-2-2 x) x-4 x^2 \log (x)-4 x^2 \log ^2(x)}{x} \, dx\\ &=\frac {1}{2} \int \left (1-2 e^x (1+x)-4 x \log (x)-4 x \log ^2(x)\right ) \, dx\\ &=\frac {x}{2}-2 \int x \log (x) \, dx-2 \int x \log ^2(x) \, dx-\int e^x (1+x) \, dx\\ &=\frac {x}{2}+\frac {x^2}{2}-e^x (1+x)-x^2 \log (x)-x^2 \log ^2(x)+2 \int x \log (x) \, dx+\int e^x \, dx\\ &=e^x+\frac {x}{2}-e^x (1+x)-x^2 \log ^2(x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 21, normalized size = 0.95 \begin {gather*} \frac {x}{2}-e^x x-x^2 \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x/2 - E^x*x - x^2*Log[x]^2

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 20, normalized size = 0.91 \begin {gather*} -x^{2} \log \relax (x)^{2} + \frac {1}{2} \, x - e^{\left (x + \log \relax (x)\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.22, size = 18, normalized size = 0.82 \begin {gather*} -x^{2} \log \relax (x)^{2} - x e^{x} + \frac {1}{2} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 19, normalized size = 0.86




method result size



default \(\frac {x}{2}-x^{2} \ln \relax (x )^{2}-{\mathrm e}^{x} x\) \(19\)
risch \(\frac {x}{2}-x^{2} \ln \relax (x )^{2}-{\mathrm e}^{x} x\) \(19\)
norman \(\frac {x}{2}-x^{2} \ln \relax (x )^{2}-{\mathrm e}^{x +\ln \relax (x )}\) \(21\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 44, normalized size = 2.00 \begin {gather*} -\frac {1}{2} \, {\left (2 \, \log \relax (x)^{2} - 2 \, \log \relax (x) + 1\right )} x^{2} - x^{2} \log \relax (x) + \frac {1}{2} \, x^{2} - {\left (x - 1\right )} e^{x} + \frac {1}{2} \, x - e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.58, size = 16, normalized size = 0.73 \begin {gather*} -\frac {x\,\left (2\,x\,{\ln \relax (x)}^2+2\,{\mathrm {e}}^x-1\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.26, size = 15, normalized size = 0.68 \begin {gather*} - x^{2} \log {\relax (x )}^{2} - x e^{x} + \frac {x}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**2*log(x)**2 - x*exp(x) + x/2

________________________________________________________________________________________