3.5.15 \(\int \frac {-16 e^5-16 x+e^5 (-16+8 x) \log (-\frac {x}{-2+x})}{e^{10} (-2+x)-2 x^2+x^3+e^5 (-4 x+2 x^2)} \, dx\) [415]

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

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(75\) vs. \(2(24)=48\).
time = 0.15, antiderivative size = 75, normalized size of antiderivative = 3.12, number of steps used = 10, number of rules used = 7, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {6820, 12, 6874, 36, 31, 2554, 2351} \begin {gather*} -\frac {16 \log (2-x)}{2+e^5}+\frac {8 x \log \left (\frac {x}{2-x}\right )}{x+e^5}+\frac {16 \log \left (x+e^5\right )}{2+e^5}-\frac {16 \log \left (-\frac {x+e^5}{2-x}\right )}{2+e^5} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-16*Log[2 - x])/(2 + E^5) + (8*x*Log[x/(2 - x)])/(E^5 + x) + (16*Log[E^5 + x])/(2 + E^5) - (16*Log[-((E^5 + x
)/(2 - x))])/(2 + E^5)

Rule 12

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

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2351

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

Rule 2554

Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_)
)^(m_.), x_Symbol] :> Dist[b*c - a*d, Subst[Int[(b*f - a*g - (d*f - c*g)*x)^m*((A + B*Log[e*x^n])^p/(b - d*x)^
(m + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && EqQ[n + mn, 0] && IGt
Q[n, 0] && NeQ[b*c - a*d, 0] && IntegerQ[m] && IGtQ[p, 0]

Rule 6820

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

Rule 6874

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 34, normalized size = 1.42 \begin {gather*} 8 \left (-\log (2-x)+\log (x)-\frac {e^5 \log \left (-\frac {x}{-2+x}\right )}{e^5+x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.28, size = 416, normalized size = 17.33

method result size
norman \(\frac {8 x \ln \left (-\frac {x}{x -2}\right )}{{\mathrm e}^{5}+x}\) \(19\)
risch \(-\frac {8 \,{\mathrm e}^{5} \ln \left (-\frac {x}{x -2}\right )}{{\mathrm e}^{5}+x}-8 \ln \left (x -2\right )+8 \ln \left (x \right )\) \(31\)
derivativedivides \(\frac {16 \ln \left (\left ({\mathrm e}^{5}+2\right ) \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{5}\right )}{{\mathrm e}^{5}+2}+\frac {4 \,{\mathrm e}^{5} \ln \left (-1-\frac {2}{x -2}\right ) \ln \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}-\frac {4 \,{\mathrm e}^{5} \ln \left (-1-\frac {2}{x -2}\right ) \ln \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}+\frac {4 \,{\mathrm e}^{5} \dilog \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}-\frac {4 \,{\mathrm e}^{5} \dilog \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\) \(416\)
default \(\frac {16 \ln \left (\left ({\mathrm e}^{5}+2\right ) \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{5}\right )}{{\mathrm e}^{5}+2}+\frac {4 \,{\mathrm e}^{5} \ln \left (-1-\frac {2}{x -2}\right ) \ln \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}-\frac {4 \,{\mathrm e}^{5} \ln \left (-1-\frac {2}{x -2}\right ) \ln \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}+\frac {4 \,{\mathrm e}^{5} \dilog \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}-2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}-\frac {4 \,{\mathrm e}^{5} \dilog \left (\frac {4 \,{\mathrm e}^{5} \left (-1-\frac {2}{x -2}\right )+{\mathrm e}^{10} \left (-1-\frac {2}{x -2}\right )+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}+{\mathrm e}^{10}-\frac {8}{x -2}-4}{{\mathrm e}^{10}+2 \,{\mathrm e}^{5}+2 \sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\right )}{\sqrt {\left ({\mathrm e}^{5}\right )^{2}-{\mathrm e}^{10}}}\) \(416\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

16*ln((exp(5)+2)*(-1-2/(x-2))+exp(5))/(exp(5)+2)+4*exp(5)*ln(-1-2/(x-2))/(exp(5)^2-exp(10))^(1/2)*ln((4*exp(5)
*(-1-2/(x-2))+exp(10)*(-1-2/(x-2))+2*exp(5)-2*(exp(5)^2-exp(10))^(1/2)+exp(10)-8/(x-2)-4)/(exp(10)+2*exp(5)-2*
(exp(5)^2-exp(10))^(1/2)))-4*exp(5)*ln(-1-2/(x-2))/(exp(5)^2-exp(10))^(1/2)*ln((4*exp(5)*(-1-2/(x-2))+exp(10)*
(-1-2/(x-2))+2*exp(5)+2*(exp(5)^2-exp(10))^(1/2)+exp(10)-8/(x-2)-4)/(exp(10)+2*exp(5)+2*(exp(5)^2-exp(10))^(1/
2)))+4*exp(5)/(exp(5)^2-exp(10))^(1/2)*dilog((4*exp(5)*(-1-2/(x-2))+exp(10)*(-1-2/(x-2))+2*exp(5)-2*(exp(5)^2-
exp(10))^(1/2)+exp(10)-8/(x-2)-4)/(exp(10)+2*exp(5)-2*(exp(5)^2-exp(10))^(1/2)))-4*exp(5)/(exp(5)^2-exp(10))^(
1/2)*dilog((4*exp(5)*(-1-2/(x-2))+exp(10)*(-1-2/(x-2))+2*exp(5)+2*(exp(5)^2-exp(10))^(1/2)+exp(10)-8/(x-2)-4)/
(exp(10)+2*exp(5)+2*(exp(5)^2-exp(10))^(1/2)))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (20) = 40\).
time = 0.56, size = 168, normalized size = 7.00 \begin {gather*} 16 \, {\left (\frac {\log \left (x + e^{5}\right )}{e^{10} + 4 \, e^{5} + 4} - \frac {\log \left (x - 2\right )}{e^{10} + 4 \, e^{5} + 4} - \frac {1}{x {\left (e^{5} + 2\right )} + e^{10} + 2 \, e^{5}}\right )} e^{5} - \frac {8 \, {\left ({\left (e^{10} + 2 \, e^{5}\right )} \log \left (x\right ) + {\left (x e^{5} - 2 \, e^{5}\right )} \log \left (-x + 2\right )\right )}}{x {\left (e^{5} + 2\right )} + e^{10} + 2 \, e^{5}} + \frac {16 \, e^{5}}{x {\left (e^{5} + 2\right )} + e^{10} + 2 \, e^{5}} + \frac {32 \, \log \left (x + e^{5}\right )}{e^{10} + 4 \, e^{5} + 4} - \frac {16 \, \log \left (x + e^{5}\right )}{e^{5} + 2} - \frac {32 \, \log \left (x - 2\right )}{e^{10} + 4 \, e^{5} + 4} + 8 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

16*(log(x + e^5)/(e^10 + 4*e^5 + 4) - log(x - 2)/(e^10 + 4*e^5 + 4) - 1/(x*(e^5 + 2) + e^10 + 2*e^5))*e^5 - 8*
((e^10 + 2*e^5)*log(x) + (x*e^5 - 2*e^5)*log(-x + 2))/(x*(e^5 + 2) + e^10 + 2*e^5) + 16*e^5/(x*(e^5 + 2) + e^1
0 + 2*e^5) + 32*log(x + e^5)/(e^10 + 4*e^5 + 4) - 16*log(x + e^5)/(e^5 + 2) - 32*log(x - 2)/(e^10 + 4*e^5 + 4)
 + 8*log(x)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 18, normalized size = 0.75 \begin {gather*} \frac {8 \, x \log \left (-\frac {x}{x - 2}\right )}{x + e^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.10, size = 29, normalized size = 1.21 \begin {gather*} 8 \log {\left (x \right )} - 8 \log {\left (x - 2 \right )} - \frac {8 e^{5} \log {\left (- \frac {x}{x - 2} \right )}}{x + e^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (20) = 40\).
time = 0.43, size = 41, normalized size = 1.71 \begin {gather*} \frac {16 \, x \log \left (-\frac {x}{x - 2}\right )}{{\left (x - 2\right )} {\left (\frac {x e^{5}}{x - 2} + \frac {2 \, x}{x - 2} - e^{5}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 1.08, size = 26, normalized size = 1.08 \begin {gather*} 16\,\mathrm {atanh}\left (x-1\right )-\frac {8\,{\mathrm {e}}^5\,\ln \left (-\frac {x}{x-2}\right )}{x+{\mathrm {e}}^5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

16*atanh(x - 1) - (8*exp(5)*log(-x/(x - 2)))/(x + exp(5))

________________________________________________________________________________________