3.41.64 \(\int \frac {-21-3 x+7 x^2-x^3+e^x (5+x)+(5+2 x-x^2) \log (x)+(5-e^x+4 x-x^2+(-1-x) \log (x)) \log (x^2)}{4 x-5 x^2+x^3+e^x (-x+x^2)+(-x+x^2) \log (x)+(-4 x+e^x x+x^2+x \log (x)) \log (x^2)} \, dx\) [4064]

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

[Out]

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

________________________________________________________________________________________

Rubi [F]
time = 2.21, 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 {-21-3 x+7 x^2-x^3+e^x (5+x)+\left (5+2 x-x^2\right ) \log (x)+\left (5-e^x+4 x-x^2+(-1-x) \log (x)\right ) \log \left (x^2\right )}{4 x-5 x^2+x^3+e^x \left (-x+x^2\right )+\left (-x+x^2\right ) \log (x)+\left (-4 x+e^x x+x^2+x \log (x)\right ) \log \left (x^2\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(-21 - 3*x + 7*x^2 - x^3 + E^x*(5 + x) + (5 + 2*x - x^2)*Log[x] + (5 - E^x + 4*x - x^2 + (-1 - x)*Lo
g[x])*Log[x^2])/(4*x - 5*x^2 + x^3 + E^x*(-x + x^2) + (-x + x^2)*Log[x] + (-4*x + E^x*x + x^2 + x*Log[x])*Log[
x^2]),x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.32, size = 27, normalized size = 0.84

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.36, size = 26, normalized size = 0.81 \begin {gather*} -x + \log \left (x + e^{x} + \log \left (x\right ) - 4\right ) - \log \left (x\right ) + 2 \, \log \left (\frac {1}{2} \, x + \log \left (x\right ) - \frac {1}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 26, normalized size = 0.81 \begin {gather*} -x + \log \left (x + e^{x} + \log \left (x\right ) - 4\right ) + 2 \, \log \left (x + 2 \, \log \left (x\right ) - 1\right ) - \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-1-x)*ln(x)-exp(x)-x**2+4*x+5)*ln(x**2)+(-x**2+2*x+5)*ln(x)+(5+x)*exp(x)-x**3+7*x**2-3*x-21)/((x*
ln(x)+exp(x)*x+x**2-4*x)*ln(x**2)+ln(x)*(x**2-x)+(x**2-x)*exp(x)+x**3-5*x**2+4*x),x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 28, normalized size = 0.88 \begin {gather*} -x + \log \left (x + e^{x} + \log \left (x\right ) - 4\right ) - \log \left (x\right ) + 2 \, \log \left (-x - 2 \, \log \left (x\right ) + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________