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

Optimal. Leaf size=33 \[ 4 e^{4+x-x^2+\frac {3-\log (3)}{-1+e^{2 x}}}-\log (x) \]

[Out]

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

________________________________________________________________________________________

Rubi [F]
time = 52.85, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {-1+2 e^{2 x}-e^{4 x}+\exp \left (\frac {-1-x+x^2-\log (3)-\log (4)+e^{2 x} \left (4+x-x^2+\log (4)\right )}{-1+e^{2 x}}\right ) \left (x-2 x^2+e^{4 x} \left (x-2 x^2\right )+e^{2 x} \left (-8 x+4 x^2+2 x \log (3)\right )\right )}{x-2 e^{2 x} x+e^{4 x} x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [F]
time = 5.29, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {-1+2 e^{2 x}-e^{4 x}+e^{\frac {-1-x+x^2-\log (3)-\log (4)+e^{2 x} \left (4+x-x^2+\log (4)\right )}{-1+e^{2 x}}} \left (x-2 x^2+e^{4 x} \left (x-2 x^2\right )+e^{2 x} \left (-8 x+4 x^2+2 x \log (3)\right )\right )}{x-2 e^{2 x} x+e^{4 x} x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.37, size = 61, normalized size = 1.85

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 125 vs. \(2 (32) = 64\).
time = 0.54, size = 125, normalized size = 3.79 \begin {gather*} e^{\left (-\frac {x^{2} e^{\left (2 \, x\right )}}{e^{\left (2 \, x\right )} - 1} + \frac {x^{2}}{e^{\left (2 \, x\right )} - 1} + \frac {x e^{\left (2 \, x\right )}}{e^{\left (2 \, x\right )} - 1} + \frac {2 \, e^{\left (2 \, x\right )} \log \left (2\right )}{e^{\left (2 \, x\right )} - 1} - \frac {x}{e^{\left (2 \, x\right )} - 1} + \frac {4 \, e^{\left (2 \, x\right )}}{e^{\left (2 \, x\right )} - 1} - \frac {\log \left (3\right )}{e^{\left (2 \, x\right )} - 1} - \frac {2 \, \log \left (2\right )}{e^{\left (2 \, x\right )} - 1} - \frac {1}{e^{\left (2 \, x\right )} - 1}\right )} - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.54, size = 49, normalized size = 1.48 \begin {gather*} e^{\left (\frac {x^{2} - {\left (x^{2} - x - 2 \, \log \left (2\right ) - 4\right )} e^{\left (2 \, x\right )} - x - \log \left (3\right ) - 2 \, \log \left (2\right ) - 1}{e^{\left (2 \, x\right )} - 1}\right )} - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.96, size = 55, normalized size = 1.67 \begin {gather*} 12 \, e^{\left (-\frac {x^{2} e^{\left (2 \, x\right )} - x^{2} - x e^{\left (2 \, x\right )} + e^{\left (2 \, x\right )} \log \left (3\right ) + x - 3 \, e^{\left (2 \, x\right )}}{e^{\left (2 \, x\right )} - 1} + 1\right )} - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.98, size = 132, normalized size = 4.00 \begin {gather*} \frac {2^{\frac {2\,{\mathrm {e}}^{2\,x}}{{\mathrm {e}}^{2\,x}-1}}\,{\mathrm {e}}^{-\frac {x}{{\mathrm {e}}^{2\,x}-1}}\,{\mathrm {e}}^{\frac {x\,{\mathrm {e}}^{2\,x}}{{\mathrm {e}}^{2\,x}-1}}\,{\mathrm {e}}^{\frac {x^2}{{\mathrm {e}}^{2\,x}-1}}\,{\mathrm {e}}^{-\frac {1}{{\mathrm {e}}^{2\,x}-1}}\,{\mathrm {e}}^{-\frac {x^2\,{\mathrm {e}}^{2\,x}}{{\mathrm {e}}^{2\,x}-1}}\,{\mathrm {e}}^{\frac {4\,{\mathrm {e}}^{2\,x}}{{\mathrm {e}}^{2\,x}-1}}}{2^{\frac {2}{{\mathrm {e}}^{2\,x}-1}}\,3^{\frac {1}{{\mathrm {e}}^{2\,x}-1}}}-\ln \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________