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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.45, antiderivative size = 42, normalized size of antiderivative = 1.45, number of steps used = 1, number of rules used = 2, integrand size = 117, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.017, Rules used = {6816, 6818} \begin {gather*} -\log ^2\left (\frac {4}{2 e^{x^2+2 x+1}+e^{2 x^2+2 x+2}-x+e^{2 x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6816

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

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]

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.95, size = 391, normalized size = 13.48

method result size
risch \(-\ln \left (-{\mathrm e}^{2 x^{2}+2 x +2}-2 \,{\mathrm e}^{\left (x +1\right )^{2}}-{\mathrm e}^{2 x}+x \right )^{2}+4 \ln \left (-{\mathrm e}^{2 x^{2}+2 x +2}-2 \,{\mathrm e}^{\left (x +1\right )^{2}}-{\mathrm e}^{2 x}+x \right )+2 i \pi \ln \left ({\mathrm e}^{2 x^{2}+2 x +2}+2 \,{\mathrm e}^{\left (x +1\right )^{2}}+{\mathrm e}^{2 x}-x \right )-2 i \pi \ln \left ({\mathrm e}^{2 x^{2}+2 x +2}+2 \,{\mathrm e}^{\left (x +1\right )^{2}}+{\mathrm e}^{2 x}-x \right ) \mathrm {csgn}\left (\frac {i}{-{\mathrm e}^{2 x^{2}+2 x +2}-2 \,{\mathrm e}^{\left (x +1\right )^{2}}-{\mathrm e}^{2 x}+x}\right )^{2}-4 i \pi \mathrm {csgn}\left (\frac {i}{-{\mathrm e}^{2 x^{2}+2 x +2}-2 \,{\mathrm e}^{\left (x +1\right )^{2}}-{\mathrm e}^{2 x}+x}\right )^{3}+4 i \pi \mathrm {csgn}\left (\frac {i}{-{\mathrm e}^{2 x^{2}+2 x +2}-2 \,{\mathrm e}^{\left (x +1\right )^{2}}-{\mathrm e}^{2 x}+x}\right )^{2}-4 i \pi +2 i \pi \ln \left ({\mathrm e}^{2 x^{2}+2 x +2}+2 \,{\mathrm e}^{\left (x +1\right )^{2}}+{\mathrm e}^{2 x}-x \right ) \mathrm {csgn}\left (\frac {i}{-{\mathrm e}^{2 x^{2}+2 x +2}-2 \,{\mathrm e}^{\left (x +1\right )^{2}}-{\mathrm e}^{2 x}+x}\right )^{3}+8+4 \ln \left (2\right ) \ln \left ({\mathrm e}^{2 x^{2}+2 x +2}+2 \,{\mathrm e}^{\left (x +1\right )^{2}}+{\mathrm e}^{2 x}-x \right )-8 \ln \left (2\right )-4 \ln \left ({\mathrm e}^{2 x^{2}+2 x +2}+2 \,{\mathrm e}^{\left (x +1\right )^{2}}+{\mathrm e}^{2 x}-x \right )\) \(391\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (27) = 54\).
time = 0.36, size = 72, normalized size = 2.48 \begin {gather*} -\log \left (-\frac {4 \, e^{\left (2 \, x^{2} + 2 \, x + 2\right )}}{{\left (x - 2 \, e^{\left (x^{2} + 2 \, x + 1\right )}\right )} e^{\left (2 \, x^{2} + 2 \, x + 2\right )} - e^{\left (4 \, x^{2} + 4 \, x + 4\right )} - e^{\left (2 \, x^{2} + 4 \, x + 2\right )}}\right )^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.51, size = 37, normalized size = 1.28 \begin {gather*} - \log {\left (\frac {4}{- x + e^{2 x} + 2 e^{x} e^{x^{2} + x + 1} + e^{2 x^{2} + 2 x + 2}} \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.43, size = 42, normalized size = 1.45 \begin {gather*} -{\ln \left (\frac {4}{{\mathrm {e}}^{2\,x}-x+2\,{\mathrm {e}}^{2\,x}\,{\mathrm {e}}^{x^2}\,\mathrm {e}+{\mathrm {e}}^{2\,x}\,{\mathrm {e}}^2\,{\mathrm {e}}^{2\,x^2}}\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________