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

Optimal. Leaf size=30 \[ 2 x-\left (x+e^x x-\log (x)\right )^2-4 x^2 \log ^2\left (x^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 55, normalized size of antiderivative = 1.83, number of steps used = 20, number of rules used = 10, integrand size = 89, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.112, Rules used = {14, 2196, 2176, 2194, 2288, 2346, 2301, 2295, 2304, 2305} \begin {gather*} -e^{2 x} x^2-x^2-4 x^2 \log ^2\left (x^2\right )-2 e^x \left (x^2-x \log (x)\right )+2 x-\log ^2(x)+2 x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*x - x^2 - E^(2*x)*x^2 + 2*x*Log[x] - Log[x]^2 - 2*E^x*(x^2 - x*Log[x]) - 4*x^2*Log[x^2]^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 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 2196

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

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 2301

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

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 40, normalized size = 1.33 \begin {gather*} 2 \left (1+e^x\right ) x \log (x)-\log ^2(x)-x \left (-2+\left (1+e^x\right )^2 x+4 x \log ^2\left (x^2\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 48, normalized size = 1.60 \begin {gather*} -x^{2} e^{\left (2 \, x\right )} - 2 \, x^{2} e^{x} - {\left (16 \, x^{2} + 1\right )} \log \relax (x)^{2} - x^{2} + 2 \, {\left (x e^{x} + x\right )} \log \relax (x) + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.17, size = 52, normalized size = 1.73 \begin {gather*} -16 \, x^{2} \log \relax (x)^{2} - x^{2} e^{\left (2 \, x\right )} - 2 \, x^{2} e^{x} + 2 \, x e^{x} \log \relax (x) - x^{2} + 2 \, x \log \relax (x) - \log \relax (x)^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-16*x^2*log(x)^2 - x^2*e^(2*x) - 2*x^2*e^x + 2*x*e^x*log(x) - x^2 + 2*x*log(x) - log(x)^2 + 2*x

________________________________________________________________________________________

maple [A]  time = 0.08, size = 55, normalized size = 1.83




method result size



default \(2 x -2 \,{\mathrm e}^{x} x^{2}+2 x \,{\mathrm e}^{x} \ln \relax (x )-x^{2}-4 x^{2} \ln \left (x^{2}\right )^{2}+2 x \ln \relax (x )-\ln \relax (x )^{2}-{\mathrm e}^{2 x} x^{2}\) \(55\)
risch \(\left (-16 x^{2}-1\right ) \ln \relax (x )^{2}+\left (8 i x^{2} \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-16 i x^{2} \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}+8 i x^{2} \pi \mathrm {csgn}\left (i x^{2}\right )^{3}+2 x +2 \,{\mathrm e}^{x} x \right ) \ln \relax (x )+\pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}-4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}+6 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}-4 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}+\pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}-{\mathrm e}^{2 x} x^{2}-2 \,{\mathrm e}^{x} x^{2}-x^{2}+2 x\) \(217\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -16 \, x^{2} \log \relax (x)^{2} + 2 \, {\left (x - 1\right )} e^{x} \log \relax (x) - 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^{2} - 2 \, x + 2\right )} e^{x} - 4 \, {\left (x - 1\right )} e^{x} + 2 \, x \log \relax (x) + 2 \, e^{x} \log \relax (x) - \log \relax (x)^{2} + 2 \, x - 2 \, {\rm Ei}\relax (x) + 2 \, e^{x} - 2 \, \int \frac {{\left (x - 1\right )} e^{x}}{x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-16*x^2*log(x)^2 + 2*(x - 1)*e^x*log(x) - x^2 - 1/2*(2*x^2 - 2*x + 1)*e^(2*x) - 1/2*(2*x - 1)*e^(2*x) - 2*(x^2
 - 2*x + 2)*e^x - 4*(x - 1)*e^x + 2*x*log(x) + 2*e^x*log(x) - log(x)^2 + 2*x - 2*Ei(x) + 2*e^x - 2*integrate((
x - 1)*e^x/x, x)

________________________________________________________________________________________

mupad [B]  time = 5.28, size = 54, normalized size = 1.80 \begin {gather*} 2\,x-2\,x^2\,{\mathrm {e}}^x-{\ln \relax (x)}^2-x^2\,{\mathrm {e}}^{2\,x}+2\,x\,\ln \relax (x)-x^2-4\,x^2\,{\ln \left (x^2\right )}^2+2\,x\,{\mathrm {e}}^x\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.42, size = 49, normalized size = 1.63 \begin {gather*} - x^{2} e^{2 x} - x^{2} + 2 x \log {\relax (x )} + 2 x + \left (- 16 x^{2} - 1\right ) \log {\relax (x )}^{2} + \left (- 2 x^{2} + 2 x \log {\relax (x )}\right ) e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**2*exp(2*x) - x**2 + 2*x*log(x) + 2*x + (-16*x**2 - 1)*log(x)**2 + (-2*x**2 + 2*x*log(x))*exp(x)

________________________________________________________________________________________