3.43.31 \(\int \frac {6+e^x (-2 x+x^2)}{-2 x+e^x x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [F]  time = 0.28, 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 {6+e^x \left (-2 x+x^2\right )}{-2 x+e^x x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Int[(6 + E^x*(-2*x + x^2))/(-2*x + E^x*x^2),x]

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 14, normalized size = 0.67 \begin {gather*} -3 \log (x)+\log \left (2-e^x x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(6 + E^x*(-2*x + x^2))/(-2*x + E^x*x^2),x]

[Out]

-3*Log[x] + Log[2 - E^x*x]

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 16, normalized size = 0.76 \begin {gather*} -2 \, \log \relax (x) + \log \left (\frac {x e^{x} - 2}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-2*x)*exp(x)+6)/(exp(x)*x^2-2*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 12, normalized size = 0.57 \begin {gather*} \log \left (x e^{x} - 2\right ) - 3 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-2*x)*exp(x)+6)/(exp(x)*x^2-2*x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 13, normalized size = 0.62




method result size



norman \(-3 \ln \relax (x )+\ln \left ({\mathrm e}^{x} x -2\right )\) \(13\)
risch \(-2 \ln \relax (x )+\ln \left ({\mathrm e}^{x}-\frac {2}{x}\right )\) \(15\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2-2*x)*exp(x)+6)/(exp(x)*x^2-2*x),x,method=_RETURNVERBOSE)

[Out]

-3*ln(x)+ln(exp(x)*x-2)

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 16, normalized size = 0.76 \begin {gather*} -2 \, \log \relax (x) + \log \left (\frac {x e^{x} - 2}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-2*x)*exp(x)+6)/(exp(x)*x^2-2*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.99, size = 12, normalized size = 0.57 \begin {gather*} \ln \left (x\,{\mathrm {e}}^x-2\right )-3\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)*(2*x - x^2) - 6)/(2*x - x^2*exp(x)),x)

[Out]

log(x*exp(x) - 2) - 3*log(x)

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 12, normalized size = 0.57 \begin {gather*} - 2 \log {\relax (x )} + \log {\left (e^{x} - \frac {2}{x} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2-2*x)*exp(x)+6)/(exp(x)*x**2-2*x),x)

[Out]

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

________________________________________________________________________________________