3.19.44 \(\int \frac {4+10 x-2 x^2-2 x^3+(-4 x+2 x^2) \log (e^{-4-2 e^3+4 x})+(-4 x+2 x^2) \log (x)+(2+6 x+2 x^2-2 x \log (e^{-4-2 e^3+4 x})-2 x \log (x)) \log (x-\log (e^{-4-2 e^3+4 x})-\log (x))}{-x^2+x \log (e^{-4-2 e^3+4 x})+x \log (x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.30, antiderivative size = 30, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, integrand size = 132, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.023, Rules used = {6688, 12, 6686} \begin {gather*} \left (-x+\log \left (x-\log \left (e^{4 x-2 \left (2+e^3\right )}\right )-\log (x)\right )+2\right )^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[(q*y^(m + 1))/(m + 1), x] /;  !F
alseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.04, size = 88, normalized size = 3.03 \begin {gather*} 2 \left (-2 x+\frac {x^2}{2}-x \log \left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )+\frac {1}{2} \log ^2\left (x-\log \left (e^{-4-2 e^3+4 x}\right )-\log (x)\right )+2 \log \left (-x+\log \left (e^{-4-2 e^3+4 x}\right )+\log (x)\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.00, size = 42, normalized size = 1.45 \begin {gather*} x^{2} - 2 \, {\left (x - 2\right )} \log \left (-3 \, x + 2 \, e^{3} - \log \relax (x) + 4\right ) + \log \left (-3 \, x + 2 \, e^{3} - \log \relax (x) + 4\right )^{2} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*log(exp(x)^2/exp(exp(3)+2-x)^2)-2*x*log(x)+2*x^2+6*x+2)*log(-log(exp(x)^2/exp(exp(3)+2-x)^2)+
x-log(x))+(2*x^2-4*x)*log(exp(x)^2/exp(exp(3)+2-x)^2)+(2*x^2-4*x)*log(x)-2*x^3-2*x^2+10*x+4)/(x*log(exp(x)^2/e
xp(exp(3)+2-x)^2)+x*log(x)-x^2),x, algorithm="fricas")

[Out]

x^2 - 2*(x - 2)*log(-3*x + 2*e^3 - log(x) + 4) + log(-3*x + 2*e^3 - log(x) + 4)^2 - 4*x

________________________________________________________________________________________

giac [A]  time = 0.27, size = 54, normalized size = 1.86 \begin {gather*} x^{2} - 2 \, x \log \left (-3 \, x + 2 \, e^{3} - \log \relax (x) + 4\right ) + \log \left (-3 \, x + 2 \, e^{3} - \log \relax (x) + 4\right )^{2} - 4 \, x + 4 \, \log \left (3 \, x - 2 \, e^{3} + \log \relax (x) - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*log(exp(x)^2/exp(exp(3)+2-x)^2)-2*x*log(x)+2*x^2+6*x+2)*log(-log(exp(x)^2/exp(exp(3)+2-x)^2)+
x-log(x))+(2*x^2-4*x)*log(exp(x)^2/exp(exp(3)+2-x)^2)+(2*x^2-4*x)*log(x)-2*x^3-2*x^2+10*x+4)/(x*log(exp(x)^2/e
xp(exp(3)+2-x)^2)+x*log(x)-x^2),x, algorithm="giac")

[Out]

x^2 - 2*x*log(-3*x + 2*e^3 - log(x) + 4) + log(-3*x + 2*e^3 - log(x) + 4)^2 - 4*x + 4*log(3*x - 2*e^3 + log(x)
 - 4)

________________________________________________________________________________________

maple [C]  time = 0.54, size = 529, normalized size = 18.24




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.51, size = 42, normalized size = 1.45 \begin {gather*} x^{2} - 2 \, {\left (x - 2\right )} \log \left (-3 \, x + 2 \, e^{3} - \log \relax (x) + 4\right ) + \log \left (-3 \, x + 2 \, e^{3} - \log \relax (x) + 4\right )^{2} - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*log(exp(x)^2/exp(exp(3)+2-x)^2)-2*x*log(x)+2*x^2+6*x+2)*log(-log(exp(x)^2/exp(exp(3)+2-x)^2)+
x-log(x))+(2*x^2-4*x)*log(exp(x)^2/exp(exp(3)+2-x)^2)+(2*x^2-4*x)*log(x)-2*x^3-2*x^2+10*x+4)/(x*log(exp(x)^2/e
xp(exp(3)+2-x)^2)+x*log(x)-x^2),x, algorithm="maxima")

[Out]

x^2 - 2*(x - 2)*log(-3*x + 2*e^3 - log(x) + 4) + log(-3*x + 2*e^3 - log(x) + 4)^2 - 4*x

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(exp(2*x)*exp(2*x - 2*exp(3) - 4))*(4*x - 2*x^2) - log(x - log(exp(2*x)*exp(2*x - 2*exp(3) - 4)) - lo
g(x))*(6*x - 2*x*log(exp(2*x)*exp(2*x - 2*exp(3) - 4)) - 2*x*log(x) + 2*x^2 + 2) - 10*x + log(x)*(4*x - 2*x^2)
 + 2*x^2 + 2*x^3 - 4)/(x*log(exp(2*x)*exp(2*x - 2*exp(3) - 4)) + x*log(x) - x^2),x)

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x*ln(exp(x)**2/exp(exp(3)+2-x)**2)-2*x*ln(x)+2*x**2+6*x+2)*ln(-ln(exp(x)**2/exp(exp(3)+2-x)**2)
+x-ln(x))+(2*x**2-4*x)*ln(exp(x)**2/exp(exp(3)+2-x)**2)+(2*x**2-4*x)*ln(x)-2*x**3-2*x**2+10*x+4)/(x*ln(exp(x)*
*2/exp(exp(3)+2-x)**2)+x*ln(x)-x**2),x)

[Out]

Timed out

________________________________________________________________________________________