3.28.36 \(\int \frac {-2+e^x (-1+x)+2 x+(-e^x-x) \log (e^x+x)}{8 x-8 x^2+2 x^3+e^x (8-8 x+2 x^2)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.93, antiderivative size = 29, normalized size of antiderivative = 1.21, number of steps used = 15, number of rules used = 5, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {6688, 12, 6742, 43, 2551} \begin {gather*} \frac {1}{2 (2-x)}-\frac {\log \left (x+e^x\right )}{2 (2-x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[((a + b*x)^(m + 1)*Log[u])/(b*(m + 1)), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[((a + b*x)^(m + 1)*D[u, x])/u, x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

Rule 6688

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

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 {\left (2+e^x\right ) (-1+x)-\left (e^x+x\right ) \log \left (e^x+x\right )}{2 (2-x)^2 \left (e^x+x\right )} \, dx\\ &=\frac {1}{2} \int \frac {\left (2+e^x\right ) (-1+x)-\left (e^x+x\right ) \log \left (e^x+x\right )}{(2-x)^2 \left (e^x+x\right )} \, dx\\ &=\frac {1}{2} \int \left (-\frac {-1+x}{(-2+x) \left (e^x+x\right )}+\frac {-1+x-\log \left (e^x+x\right )}{(-2+x)^2}\right ) \, dx\\ &=-\left (\frac {1}{2} \int \frac {-1+x}{(-2+x) \left (e^x+x\right )} \, dx\right )+\frac {1}{2} \int \frac {-1+x-\log \left (e^x+x\right )}{(-2+x)^2} \, dx\\ &=-\left (\frac {1}{2} \int \left (\frac {1}{e^x+x}+\frac {1}{(-2+x) \left (e^x+x\right )}\right ) \, dx\right )+\frac {1}{2} \int \left (\frac {-1+x}{(-2+x)^2}-\frac {\log \left (e^x+x\right )}{(-2+x)^2}\right ) \, dx\\ &=\frac {1}{2} \int \frac {-1+x}{(-2+x)^2} \, dx-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx-\frac {1}{2} \int \frac {\log \left (e^x+x\right )}{(-2+x)^2} \, dx\\ &=-\frac {\log \left (e^x+x\right )}{2 (2-x)}+\frac {1}{2} \int \left (\frac {1}{(-2+x)^2}+\frac {1}{-2+x}\right ) \, dx-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx-\frac {1}{2} \int \frac {1+e^x}{(-2+x) \left (e^x+x\right )} \, dx\\ &=\frac {1}{2 (2-x)}+\frac {1}{2} \log (2-x)-\frac {\log \left (e^x+x\right )}{2 (2-x)}-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx-\frac {1}{2} \int \left (\frac {1}{-2+x}-\frac {-1+x}{(-2+x) \left (e^x+x\right )}\right ) \, dx\\ &=\frac {1}{2 (2-x)}-\frac {\log \left (e^x+x\right )}{2 (2-x)}-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx+\frac {1}{2} \int \frac {-1+x}{(-2+x) \left (e^x+x\right )} \, dx\\ &=\frac {1}{2 (2-x)}-\frac {\log \left (e^x+x\right )}{2 (2-x)}-\frac {1}{2} \int \frac {1}{e^x+x} \, dx-\frac {1}{2} \int \frac {1}{(-2+x) \left (e^x+x\right )} \, dx+\frac {1}{2} \int \left (\frac {1}{e^x+x}+\frac {1}{(-2+x) \left (e^x+x\right )}\right ) \, dx\\ &=\frac {1}{2 (2-x)}-\frac {\log \left (e^x+x\right )}{2 (2-x)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.31, size = 14, normalized size = 0.58 \begin {gather*} \frac {\log \left (x + e^{x}\right ) - 1}{2 \, {\left (x - 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 16, normalized size = 0.67




method result size



norman \(\frac {\frac {\ln \left ({\mathrm e}^{x}+x \right )}{2}-\frac {1}{2}}{x -2}\) \(16\)
risch \(\frac {\ln \left ({\mathrm e}^{x}+x \right )}{2 x -4}-\frac {1}{2 \left (x -2\right )}\) \(21\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-exp(x)-x)*ln(exp(x)+x)+(x-1)*exp(x)+2*x-2)/((2*x^2-8*x+8)*exp(x)+2*x^3-8*x^2+8*x),x,method=_RETURNVERBO
SE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.68, size = 14, normalized size = 0.58 \begin {gather*} \frac {\log \left (x + e^{x}\right ) - 1}{2 \, {\left (x - 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.33, size = 17, normalized size = 0.71 \begin {gather*} \frac {\log {\left (x + e^{x} \right )}}{2 x - 4} - \frac {1}{2 x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________