3.78.98 \(\int \frac {4 x^2+e^{\frac {-4+x-x^2}{x}} (-16+4 x^2)+(e^{\frac {-4+x-x^2}{x}} x^2-x^3) \log (e^{\frac {-4+x-x^2}{x}}-x)}{(e^{\frac {-4+x-x^2}{x}} x^2-x^3) \log (e^{\frac {-4+x-x^2}{x}}-x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.83, antiderivative size = 22, normalized size of antiderivative = 0.85, number of steps used = 3, number of rules used = 2, integrand size = 120, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.017, Rules used = {6688, 6684} \begin {gather*} x-4 \log \left (\log \left (e^{-x-\frac {4}{x}+1}-x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6684

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

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.43, size = 22, normalized size = 0.85 \begin {gather*} x-4 \log \left (\log \left (e^{1-\frac {4}{x}-x}-x\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 24, normalized size = 0.92 \begin {gather*} x - 4 \, \log \left (\log \left (-x + e^{\left (-\frac {x^{2} - x + 4}{x}\right )}\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 24, normalized size = 0.92




method result size



norman \(x -4 \ln \left (\ln \left ({\mathrm e}^{\frac {-x^{2}+x -4}{x}}-x \right )\right )\) \(24\)
risch \(x -4 \ln \left (\ln \left ({\mathrm e}^{-\frac {x^{2}-x +4}{x}}-x \right )\right )\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 33, normalized size = 1.27 \begin {gather*} x - 4 \, \log \left (-\frac {x^{2} - x \log \left (-x e^{\left (x + \frac {4}{x}\right )} + e\right ) + 4}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.59, size = 23, normalized size = 0.88 \begin {gather*} x-4\,\ln \left (\ln \left ({\mathrm {e}}^{-x}\,\mathrm {e}\,{\mathrm {e}}^{-\frac {4}{x}}-x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.58, size = 17, normalized size = 0.65 \begin {gather*} x - 4 \log {\left (\log {\left (- x + e^{\frac {- x^{2} + x - 4}{x}} \right )} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________