3.31.9 \(\int \frac {-4+e^x+e (-1+x)}{4-e x+e^x x} \, dx\)

Optimal. Leaf size=17 \[ 1-x+\log \left (4-e x+e^x x\right ) \]

________________________________________________________________________________________

Rubi [F]  time = 0.45, 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+e (-1+x)}{4-e x+e^x x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.82, size = 23, normalized size = 1.35 \begin {gather*} -x + \log \relax (x) + \log \left (-\frac {x e - x e^{x} - 4}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(x)+(x-1)*exp(1)-4)/(exp(x)*x-x*exp(1)+4),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(x)+(x-1)*exp(1)-4)/(exp(x)*x-x*exp(1)+4),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 17, normalized size = 1.00




method result size



norman \(-x +\ln \left (x \,{\mathrm e}-{\mathrm e}^{x} x -4\right )\) \(17\)
risch \(\ln \relax (x )-x +\ln \left ({\mathrm e}^{x}-\frac {x \,{\mathrm e}-4}{x}\right )\) \(22\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x)+(x-1)*exp(1)-4)/(exp(x)*x-x*exp(1)+4),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.78, size = 23, normalized size = 1.35 \begin {gather*} -x + \log \relax (x) + \log \left (-\frac {x e - x e^{x} - 4}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(x)+(x-1)*exp(1)-4)/(exp(x)*x-x*exp(1)+4),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 16, normalized size = 0.94 \begin {gather*} \ln \left (x\,{\mathrm {e}}^x-x\,\mathrm {e}+4\right )-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x) + exp(1)*(x - 1) - 4)/(x*exp(x) - x*exp(1) + 4),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(x)+(x-1)*exp(1)-4)/(exp(x)*x-x*exp(1)+4),x)

[Out]

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

________________________________________________________________________________________