\(\int \frac {(8-2 e^x-2 x) \log (-4+e^x+x)+(12 x+21 x^2-6 x^3+e^x (-3 x-6 x^2)) \log (x) \log ^2(-4+e^x+x)+(x+e^x x) \log (x) \log (\log ^2(x))}{(-12 x+3 e^x x+3 x^2) \log (x) \log ^2(-4+e^x+x)} \, dx\) [7496]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 104, antiderivative size = 27 \[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=-x-x^2-\frac {\log \left (\log ^2(x)\right )}{3 \log \left (-4+e^x+x\right )} \]

[Out]

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

Rubi [F]

\[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=\int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx \]

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.07 \[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=\frac {1}{3} \left (-3 x-3 x^2-\frac {\log \left (\log ^2(x)\right )}{\log \left (-4+e^x+x\right )}\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 22.38 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.74

method result size
parallelrisch \(-\frac {24 x^{2} \ln \left ({\mathrm e}^{x}+x -4\right )+24 \ln \left ({\mathrm e}^{x}+x -4\right ) x +8 \ln \left (\ln \left (x \right )^{2}\right )+96 \ln \left ({\mathrm e}^{x}+x -4\right )}{24 \ln \left ({\mathrm e}^{x}+x -4\right )}\) \(47\)
risch \(-x^{2}-x -\frac {-i \pi \,\operatorname {csgn}\left (i \ln \left (x \right )^{2}\right ) \operatorname {csgn}\left (i \ln \left (x \right )\right )^{2}+2 i \pi \,\operatorname {csgn}\left (i \ln \left (x \right )\right ) \operatorname {csgn}\left (i \ln \left (x \right )^{2}\right )^{2}-i \pi \operatorname {csgn}\left (i \ln \left (x \right )^{2}\right )^{3}+4 \ln \left (\ln \left (x \right )\right )}{6 \ln \left ({\mathrm e}^{x}+x -4\right )}\) \(80\)

[In]

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

[Out]

-1/24*(24*x^2*ln(exp(x)+x-4)+24*ln(exp(x)+x-4)*x+8*ln(ln(x)^2)+96*ln(exp(x)+x-4))/ln(exp(x)+x-4)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.07 \[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=-\frac {3 \, {\left (x^{2} + x\right )} \log \left (x + e^{x} - 4\right ) + \log \left (\log \left (x\right )^{2}\right )}{3 \, \log \left (x + e^{x} - 4\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.87 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81 \[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=- x^{2} - x - \frac {\log {\left (\log {\left (x \right )}^{2} \right )}}{3 \log {\left (x + e^{x} - 4 \right )}} \]

[In]

integrate(((exp(x)*x+x)*ln(x)*ln(ln(x)**2)+((-6*x**2-3*x)*exp(x)-6*x**3+21*x**2+12*x)*ln(x)*ln(exp(x)+x-4)**2+
(-2*exp(x)-2*x+8)*ln(exp(x)+x-4))/(3*exp(x)*x+3*x**2-12*x)/ln(x)/ln(exp(x)+x-4)**2,x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.07 \[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=-\frac {3 \, {\left (x^{2} + x\right )} \log \left (x + e^{x} - 4\right ) + 2 \, \log \left (\log \left (x\right )\right )}{3 \, \log \left (x + e^{x} - 4\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.33 \[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=-\frac {3 \, x^{2} \log \left (x + e^{x} - 4\right ) + 3 \, x \log \left (x + e^{x} - 4\right ) + \log \left (\log \left (x\right )^{2}\right )}{3 \, \log \left (x + e^{x} - 4\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.31 (sec) , antiderivative size = 171, normalized size of antiderivative = 6.33 \[ \int \frac {\left (8-2 e^x-2 x\right ) \log \left (-4+e^x+x\right )+\left (12 x+21 x^2-6 x^3+e^x \left (-3 x-6 x^2\right )\right ) \log (x) \log ^2\left (-4+e^x+x\right )+\left (x+e^x x\right ) \log (x) \log \left (\log ^2(x)\right )}{\left (-12 x+3 e^x x+3 x^2\right ) \log (x) \log ^2\left (-4+e^x+x\right )} \, dx=\frac {2}{3\,x}-\frac {\frac {\ln \left ({\ln \left (x\right )}^2\right )}{3}-\frac {2\,\ln \left (x+{\mathrm {e}}^x-4\right )\,\left (x+{\mathrm {e}}^x-4\right )}{3\,x\,\ln \left (x\right )\,\left ({\mathrm {e}}^x+1\right )}}{\ln \left (x+{\mathrm {e}}^x-4\right )}-\frac {\frac {2\,\left (x+{\mathrm {e}}^x-4\right )}{3\,x\,\left ({\mathrm {e}}^x+1\right )}-\frac {2\,\ln \left (x\right )\,\left (3\,{\mathrm {e}}^x-{\mathrm {e}}^{2\,x}-x^2\,{\mathrm {e}}^x+5\,x\,{\mathrm {e}}^x+4\right )}{3\,x\,{\left ({\mathrm {e}}^x+1\right )}^2}}{\ln \left (x\right )}-x-x^2+\frac {2\,\left (5\,x^2-x^3\right )}{3\,x^2\,\left ({\mathrm {e}}^{2\,x}+2\,{\mathrm {e}}^x+1\right )}-\frac {2\,\left (-x^3+5\,x^2+5\,x\right )}{3\,x^2\,\left ({\mathrm {e}}^x+1\right )} \]

[In]

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

[Out]

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