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

   Optimal result
   Rubi [A] (verified)
   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 = 154, antiderivative size = 24 \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=\frac {1}{-e^x+\frac {\log \left (x^2\right )}{2}+\log \left (-e^x+x\right )} \]

[Out]

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

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.013, Rules used = {6820, 6818} \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=-\frac {2}{-\log \left (x^2\right )+2 e^x-2 \log \left (x-e^x\right )} \]

[In]

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

[Out]

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

Rule 6818

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 6820

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

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

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=\frac {2}{-2 e^x+\log \left (x^2\right )+2 \log \left (-e^x+x\right )} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 4.72 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.04

method result size
parallelrisch \(-\frac {2}{2 \,{\mathrm e}^{x}-\ln \left (x^{2}\right )-2 \ln \left (x -{\mathrm e}^{x}\right )}\) \(25\)
risch \(\frac {4 i}{\pi \operatorname {csgn}\left (i x \right )^{2} \operatorname {csgn}\left (i x^{2}\right )-2 \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (i x^{2}\right )^{2}+\pi \operatorname {csgn}\left (i x^{2}\right )^{3}-4 i {\mathrm e}^{x}+4 i \ln \left (x \right )+4 i \ln \left (x -{\mathrm e}^{x}\right )}\) \(71\)

[In]

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

[Out]

-2/(2*exp(x)-ln(x^2)-2*ln(x-exp(x)))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=-\frac {2}{2 \, e^{x} - \log \left (x^{2}\right ) - 2 \, \log \left (x - e^{x}\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.79 \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=\frac {2}{- 2 e^{x} + \log {\left (x^{2} \right )} + 2 \log {\left (x - e^{x} \right )}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.83 \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=-\frac {1}{e^{x} - \log \left (x - e^{x}\right ) - \log \left (x\right )} \]

[In]

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

[Out]

-1/(e^x - log(x - e^x) - log(x))

Giac [A] (verification not implemented)

none

Time = 0.38 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=-\frac {2}{2 \, e^{x} - \log \left (x^{2}\right ) - 2 \, \log \left (x - e^{x}\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.90 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92 \[ \int \frac {8 x+4 e^{2 x} x+e^x \left (-4-4 x-4 x^2\right )}{4 e^{3 x} x-4 e^{2 x} x^2+\left (-4 e^{2 x} x+4 e^x x^2\right ) \log \left (x^2\right )+\left (e^x x-x^2\right ) \log ^2\left (x^2\right )+\left (-8 e^{2 x} x+8 e^x x^2+\left (4 e^x x-4 x^2\right ) \log \left (x^2\right )\right ) \log \left (-e^x+x\right )+\left (4 e^x x-4 x^2\right ) \log ^2\left (-e^x+x\right )} \, dx=\frac {2}{\ln \left (x^2\right )+2\,\ln \left (x-{\mathrm {e}}^x\right )-2\,{\mathrm {e}}^x} \]

[In]

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

[Out]

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