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

Optimal. Leaf size=24 \[ -5-e^x-\frac {-3+e^{e^x}}{-1+x}+x+\log (x) \]

________________________________________________________________________________________

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

Verification is not applicable to the result.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.16, size = 35, normalized size = 1.46 \begin {gather*} \frac {3-e^{e^x}-e^x (-1+x)-x+x^2+(-1+x) \log (x)}{-1+x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(3 - E^E^x - E^x*(-1 + x) - x + x^2 + (-1 + x)*Log[x])/(-1 + x)

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 32, normalized size = 1.33 \begin {gather*} \frac {x^{2} - {\left (x - 1\right )} e^{x} + {\left (x - 1\right )} \log \relax (x) - x - e^{\left (e^{x}\right )} + 3}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x^2+x)*exp(x)+x)*exp(exp(x))+(-x^3+2*x^2-x)*exp(x)+x^3-x^2-4*x+1)/(x^3-2*x^2+x),x, algorithm="fr
icas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.28, size = 58, normalized size = 2.42 \begin {gather*} \frac {x^{2} e^{x} + x e^{x} \log \relax (x) - x e^{\left (2 \, x\right )} - x e^{x} - e^{x} \log \relax (x) + e^{\left (2 \, x\right )} - e^{\left (x + e^{x}\right )} + 3 \, e^{x}}{x e^{x} - e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x^2+x)*exp(x)+x)*exp(exp(x))+(-x^3+2*x^2-x)*exp(x)+x^3-x^2-4*x+1)/(x^3-2*x^2+x),x, algorithm="gi
ac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 26, normalized size = 1.08




method result size



risch \(x +\frac {3}{x -1}+\ln \relax (x )-{\mathrm e}^{x}-\frac {{\mathrm e}^{{\mathrm e}^{x}}}{x -1}\) \(26\)
norman \(\frac {x^{2}-{\mathrm e}^{x} x -{\mathrm e}^{{\mathrm e}^{x}}+2+{\mathrm e}^{x}}{x -1}+\ln \relax (x )\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((-x^2+x)*exp(x)+x)*exp(exp(x))+(-x^3+2*x^2-x)*exp(x)+x^3-x^2-4*x+1)/(x^3-2*x^2+x),x,method=_RETURNVERBOS
E)

[Out]

x+3/(x-1)+ln(x)-exp(x)-1/(x-1)*exp(exp(x))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} x + \frac {e E_{2}\left (-x + 1\right )}{x - 1} - \frac {{\left (x^{2} - 2 \, x\right )} e^{x} + {\left (x - 1\right )} e^{\left (e^{x}\right )}}{x^{2} - 2 \, x + 1} + \frac {3}{x - 1} + 2 \, \int \frac {e^{x}}{x^{3} - 3 \, x^{2} + 3 \, x - 1}\,{d x} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-x^2+x)*exp(x)+x)*exp(exp(x))+(-x^3+2*x^2-x)*exp(x)+x^3-x^2-4*x+1)/(x^3-2*x^2+x),x, algorithm="ma
xima")

[Out]

x + e*exp_integral_e(2, -x + 1)/(x - 1) - ((x^2 - 2*x)*e^x + (x - 1)*e^(e^x))/(x^2 - 2*x + 1) + 3/(x - 1) + 2*
integrate(e^x/(x^3 - 3*x^2 + 3*x - 1), x) + log(x)

________________________________________________________________________________________

mupad [B]  time = 0.96, size = 20, normalized size = 0.83 \begin {gather*} x-{\mathrm {e}}^x+\ln \relax (x)-\frac {{\mathrm {e}}^{{\mathrm {e}}^x}-3}{x-1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - exp(x) + log(x) - (exp(exp(x)) - 3)/(x - 1)

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 20, normalized size = 0.83 \begin {gather*} x - e^{x} + \log {\relax (x )} - \frac {e^{e^{x}}}{x - 1} + \frac {3}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - exp(x) + log(x) - exp(exp(x))/(x - 1) + 3/(x - 1)

________________________________________________________________________________________