3.84.78 \(\int \frac {-2+13 x-13 x^2+4 x^3+e^x (-2+5 x)+(-2+e^x (-2+x)+x-x^2) \log (x)+(-8+4 x-4 x^2+e^x (-8+4 x)) \log (e^{-x} (8+e^x (8-4 x)-4 x+4 x^2))}{-8+4 x-4 x^2+e^x (-8+4 x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 2.29, antiderivative size = 35, normalized size of antiderivative = 1.13, number of steps used = 20, number of rules used = 7, integrand size = 110, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.064, Rules used = {6741, 12, 6742, 6688, 2295, 43, 2548} \begin {gather*} x \log \left (4 e^{-x} \left (x^2-x+e^x (2-x)+2\right )\right )+\frac {1}{4} x \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

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 2548

Int[Log[u_], x_Symbol] :> Simp[x*Log[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/u, x], x] /; InverseFunctionFr
eeQ[u, x]

Rule 6688

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

Rule 6741

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

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.67, size = 32, normalized size = 1.03 \begin {gather*} x \log \left (4 \, {\left (x^{2} - x e^{x} - x + 2 \, e^{x} + 2\right )} e^{\left (-x\right )}\right ) + \frac {1}{4} \, x \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.20, size = 240, normalized size = 7.74




method result size



risch \(-x \ln \left ({\mathrm e}^{x}\right )+x \ln \left (x^{2}+\left (-{\mathrm e}^{x}-1\right ) x +2 \,{\mathrm e}^{x}+2\right )+\frac {x \ln \relax (x )}{4}-\frac {i \pi x \,\mathrm {csgn}\left (i \left (-x^{2}-\left (-{\mathrm e}^{x}-1\right ) x -2 \,{\mathrm e}^{x}-2\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (-x^{2}-\left (-{\mathrm e}^{x}-1\right ) x -2 \,{\mathrm e}^{x}-2\right )\right )^{2}}{2}-\frac {i \pi x \,\mathrm {csgn}\left (i \left (-x^{2}-\left (-{\mathrm e}^{x}-1\right ) x -2 \,{\mathrm e}^{x}-2\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (-x^{2}-\left (-{\mathrm e}^{x}-1\right ) x -2 \,{\mathrm e}^{x}-2\right )\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x}\right )}{2}+\frac {i \pi x \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (-x^{2}-\left (-{\mathrm e}^{x}-1\right ) x -2 \,{\mathrm e}^{x}-2\right )\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{-x}\right )}{2}+\frac {i \pi x \mathrm {csgn}\left (i {\mathrm e}^{-x} \left (-x^{2}-\left (-{\mathrm e}^{x}-1\right ) x -2 \,{\mathrm e}^{x}-2\right )\right )^{3}}{2}+2 x \ln \relax (2)\) \(240\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x*ln(exp(x))+x*ln(x^2+(-exp(x)-1)*x+2*exp(x)+2)+1/4*x*ln(x)-1/2*I*Pi*x*csgn(I*(-x^2-(-exp(x)-1)*x-2*exp(x)-2)
)*csgn(I*exp(-x)*(-x^2-(-exp(x)-1)*x-2*exp(x)-2))^2-1/2*I*Pi*x*csgn(I*(-x^2-(-exp(x)-1)*x-2*exp(x)-2))*csgn(I*
exp(-x)*(-x^2-(-exp(x)-1)*x-2*exp(x)-2))*csgn(I*exp(-x))+1/2*I*Pi*x*csgn(I*exp(-x)*(-x^2-(-exp(x)-1)*x-2*exp(x
)-2))^2*csgn(I*exp(-x))+1/2*I*Pi*x*csgn(I*exp(-x)*(-x^2-(-exp(x)-1)*x-2*exp(x)-2))^3+2*x*ln(2)

________________________________________________________________________________________

maxima [C]  time = 0.49, size = 39, normalized size = 1.26 \begin {gather*} -{\left (-i \, \pi - 2 \, \log \relax (2)\right )} x - x^{2} + x \log \left (-x^{2} + {\left (x - 2\right )} e^{x} + x - 2\right ) + \frac {1}{4} \, x \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.84, size = 31, normalized size = 1.00 \begin {gather*} \frac {x \log {\relax (x )}}{4} + x \log {\left (\left (4 x^{2} - 4 x + \left (8 - 4 x\right ) e^{x} + 8\right ) e^{- x} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________