3.51.39 \(\int \frac {4 e^x-8 x+4 x^2}{e^x x-x^2} \, dx\) [5039]

Optimal. Leaf size=23 \[ 4 \left (-5-x+\log (5)+\log ^2(25)+\log \left (x \left (-e^x+x\right )\right )\right ) \]

[Out]

16*ln(5)^2+4*ln((x-exp(x))*x)+4*ln(5)-4*x-20

________________________________________________________________________________________

Rubi [F]
time = 0.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 {4 e^x-8 x+4 x^2}{e^x x-x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 16, normalized size = 0.70 \begin {gather*} 4 \left (-x+\log \left (e^x-x\right )+\log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 18, normalized size = 0.78

method result size
norman \(-4 x +4 \ln \left (x \right )+4 \ln \left (x -{\mathrm e}^{x}\right )\) \(18\)
risch \(4 \ln \left (x \right )-4 x +4 \ln \left ({\mathrm e}^{x}-x \right )\) \(18\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*x+4*ln(x)+4*ln(x-exp(x))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 17, normalized size = 0.74 \begin {gather*} -4 \, x + 4 \, \log \left (x\right ) + 4 \, \log \left (-x + e^{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.43, size = 17, normalized size = 0.74 \begin {gather*} -4 \, x + 4 \, \log \left (x\right ) + 4 \, \log \left (-x + e^{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 15, normalized size = 0.65 \begin {gather*} - 4 x + 4 \log {\left (x \right )} + 4 \log {\left (- x + e^{x} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 17, normalized size = 0.74 \begin {gather*} -4 \, x + 4 \, \log \left (x - e^{x}\right ) + 4 \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.29, size = 17, normalized size = 0.74 \begin {gather*} 4\,\ln \left (x-{\mathrm {e}}^x\right )-4\,x+4\,\ln \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________