3.72.9 \(\int \frac {e^{-x} (20-28 x+17 x^2-6 x^3+x^4+e^{\frac {-4-x}{-2+x}} (-20+10 x-25 x^2+5 x^3)+(-4+4 x-x^2) \log (4))}{4-4 x+x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [F]  time = 4.61, 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 {e^{-x} \left (20-28 x+17 x^2-6 x^3+x^4+e^{\frac {-4-x}{-2+x}} \left (-20+10 x-25 x^2+5 x^3\right )+\left (-4+4 x-x^2\right ) \log (4)\right )}{4-4 x+x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Int[(20 - 28*x + 17*x^2 - 6*x^3 + x^4 + E^((-4 - x)/(-2 + x))*(-20 + 10*x - 25*x^2 + 5*x^3) + (-4 + 4*x - x^2)
*Log[4])/(E^x*(4 - 4*x + x^2)),x]

[Out]

-5/E^x - x^2/E^x + Log[4]/E^x - 5*Defer[Int][E^((-4 + x - x^2)/(-2 + x)), x] - 60*Defer[Int][E^((-4 + x - x^2)
/(-2 + x))/(-2 + x)^2, x] - 30*Defer[Int][E^((-4 + x - x^2)/(-2 + x))/(-2 + x), x] + 5*Defer[Int][E^((-4 + x -
 x^2)/(-2 + x))*x, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (20-28 x+17 x^2-6 x^3+x^4+e^{\frac {-4-x}{-2+x}} \left (-20+10 x-25 x^2+5 x^3\right )+\left (-4+4 x-x^2\right ) \log (4)\right )}{(-2+x)^2} \, dx\\ &=\int \left (\frac {20 e^{-x}}{(-2+x)^2}-\frac {28 e^{-x} x}{(-2+x)^2}+\frac {17 e^{-x} x^2}{(-2+x)^2}-\frac {6 e^{-x} x^3}{(-2+x)^2}+\frac {e^{-x} x^4}{(-2+x)^2}+\frac {5 e^{\frac {-4-x}{-2+x}-x} \left (-4+2 x-5 x^2+x^3\right )}{(2-x)^2}-e^{-x} \log (4)\right ) \, dx\\ &=5 \int \frac {e^{\frac {-4-x}{-2+x}-x} \left (-4+2 x-5 x^2+x^3\right )}{(2-x)^2} \, dx-6 \int \frac {e^{-x} x^3}{(-2+x)^2} \, dx+17 \int \frac {e^{-x} x^2}{(-2+x)^2} \, dx+20 \int \frac {e^{-x}}{(-2+x)^2} \, dx-28 \int \frac {e^{-x} x}{(-2+x)^2} \, dx-\log (4) \int e^{-x} \, dx+\int \frac {e^{-x} x^4}{(-2+x)^2} \, dx\\ &=\frac {20 e^{-x}}{2-x}+e^{-x} \log (4)+5 \int \frac {e^{\frac {-4+x-x^2}{-2+x}} \left (-4+2 x-5 x^2+x^3\right )}{(2-x)^2} \, dx-6 \int \left (4 e^{-x}+\frac {8 e^{-x}}{(-2+x)^2}+\frac {12 e^{-x}}{-2+x}+e^{-x} x\right ) \, dx+17 \int \left (e^{-x}+\frac {4 e^{-x}}{(-2+x)^2}+\frac {4 e^{-x}}{-2+x}\right ) \, dx-20 \int \frac {e^{-x}}{-2+x} \, dx-28 \int \left (\frac {2 e^{-x}}{(-2+x)^2}+\frac {e^{-x}}{-2+x}\right ) \, dx+\int \left (12 e^{-x}+\frac {16 e^{-x}}{(-2+x)^2}+\frac {32 e^{-x}}{-2+x}+4 e^{-x} x+e^{-x} x^2\right ) \, dx\\ &=\frac {20 e^{-x}}{2-x}-\frac {20 \text {Ei}(2-x)}{e^2}+e^{-x} \log (4)+4 \int e^{-x} x \, dx+5 \int \left (-e^{\frac {-4+x-x^2}{-2+x}}-\frac {12 e^{\frac {-4+x-x^2}{-2+x}}}{(-2+x)^2}-\frac {6 e^{\frac {-4+x-x^2}{-2+x}}}{-2+x}+e^{\frac {-4+x-x^2}{-2+x}} x\right ) \, dx-6 \int e^{-x} x \, dx+12 \int e^{-x} \, dx+16 \int \frac {e^{-x}}{(-2+x)^2} \, dx+17 \int e^{-x} \, dx-24 \int e^{-x} \, dx-28 \int \frac {e^{-x}}{-2+x} \, dx+32 \int \frac {e^{-x}}{-2+x} \, dx-48 \int \frac {e^{-x}}{(-2+x)^2} \, dx-56 \int \frac {e^{-x}}{(-2+x)^2} \, dx+68 \int \frac {e^{-x}}{(-2+x)^2} \, dx+68 \int \frac {e^{-x}}{-2+x} \, dx-72 \int \frac {e^{-x}}{-2+x} \, dx+\int e^{-x} x^2 \, dx\\ &=-5 e^{-x}+2 e^{-x} x-e^{-x} x^2-\frac {20 \text {Ei}(2-x)}{e^2}+e^{-x} \log (4)+2 \int e^{-x} x \, dx+4 \int e^{-x} \, dx-5 \int e^{\frac {-4+x-x^2}{-2+x}} \, dx+5 \int e^{\frac {-4+x-x^2}{-2+x}} x \, dx-6 \int e^{-x} \, dx-16 \int \frac {e^{-x}}{-2+x} \, dx-30 \int \frac {e^{\frac {-4+x-x^2}{-2+x}}}{-2+x} \, dx+48 \int \frac {e^{-x}}{-2+x} \, dx+56 \int \frac {e^{-x}}{-2+x} \, dx-60 \int \frac {e^{\frac {-4+x-x^2}{-2+x}}}{(-2+x)^2} \, dx-68 \int \frac {e^{-x}}{-2+x} \, dx\\ &=-3 e^{-x}-e^{-x} x^2+e^{-x} \log (4)+2 \int e^{-x} \, dx-5 \int e^{\frac {-4+x-x^2}{-2+x}} \, dx+5 \int e^{\frac {-4+x-x^2}{-2+x}} x \, dx-30 \int \frac {e^{\frac {-4+x-x^2}{-2+x}}}{-2+x} \, dx-60 \int \frac {e^{\frac {-4+x-x^2}{-2+x}}}{(-2+x)^2} \, dx\\ &=-5 e^{-x}-e^{-x} x^2+e^{-x} \log (4)-5 \int e^{\frac {-4+x-x^2}{-2+x}} \, dx+5 \int e^{\frac {-4+x-x^2}{-2+x}} x \, dx-30 \int \frac {e^{\frac {-4+x-x^2}{-2+x}}}{-2+x} \, dx-60 \int \frac {e^{\frac {-4+x-x^2}{-2+x}}}{(-2+x)^2} \, dx\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 3.21, size = 40, normalized size = 1.33 \begin {gather*} e^{-1-\frac {6}{-2+x}-x} \left (-5 x+e^{\frac {4+x}{-2+x}} \left (-5-x^2+\log (4)\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(20 - 28*x + 17*x^2 - 6*x^3 + x^4 + E^((-4 - x)/(-2 + x))*(-20 + 10*x - 25*x^2 + 5*x^3) + (-4 + 4*x
- x^2)*Log[4])/(E^x*(4 - 4*x + x^2)),x]

[Out]

E^(-1 - 6/(-2 + x) - x)*(-5*x + E^((4 + x)/(-2 + x))*(-5 - x^2 + Log[4]))

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 34, normalized size = 1.13 \begin {gather*} -{\left (x^{2} - 2 \, \log \relax (2) + 5\right )} e^{\left (-x\right )} - 5 \, x e^{\left (-x - \frac {x + 4}{x - 2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x^3-25*x^2+10*x-20)*exp((-x-4)/(x-2))+2*(-x^2+4*x-4)*log(2)+x^4-6*x^3+17*x^2-28*x+20)/(x^2-4*x+4
)/exp(x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.22, size = 42, normalized size = 1.40 \begin {gather*} -x^{2} e^{\left (-x\right )} - 5 \, x e^{\left (-\frac {x^{2} + x}{x - 2} + 2\right )} + 2 \, e^{\left (-x\right )} \log \relax (2) - 5 \, e^{\left (-x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x^3-25*x^2+10*x-20)*exp((-x-4)/(x-2))+2*(-x^2+4*x-4)*log(2)+x^4-6*x^3+17*x^2-28*x+20)/(x^2-4*x+4
)/exp(x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.16, size = 37, normalized size = 1.23




method result size



risch \(\left (-x^{2}+2 \ln \relax (2)-5\right ) {\mathrm e}^{-x}-5 x \,{\mathrm e}^{-\frac {x^{2}-x +4}{x -2}}\) \(37\)
norman \(\frac {\left (\left (2 \ln \relax (2)-5\right ) x +2 x^{2}-x^{3}+10 x \,{\mathrm e}^{\frac {-x -4}{x -2}}-5 x^{2} {\mathrm e}^{\frac {-x -4}{x -2}}+10-4 \ln \relax (2)\right ) {\mathrm e}^{-x}}{x -2}\) \(67\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((5*x^3-25*x^2+10*x-20)*exp((-x-4)/(x-2))+2*(-x^2+4*x-4)*ln(2)+x^4-6*x^3+17*x^2-28*x+20)/(x^2-4*x+4)/exp(x
),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x^3-25*x^2+10*x-20)*exp((-x-4)/(x-2))+2*(-x^2+4*x-4)*log(2)+x^4-6*x^3+17*x^2-28*x+20)/(x^2-4*x+4
)/exp(x),x, algorithm="maxima")

[Out]

-8*(2*log(2) - 5)*integrate(e^(-x)/(x^3 - 6*x^2 + 12*x - 8), x) + 8*e^(-2)*exp_integral_e(2, x - 2)*log(2)/(x
- 2) - (x^4*e - 4*x^3*e - x^2*(2*log(2) - 9)*e + 4*x*(2*log(2) - 5)*e + 5*(x^3 - 4*x^2 + 4*x)*e^(-6/(x - 2)))*
e^(-x)/(x^2*e - 4*x*e + 4*e) - 20*e^(-2)*exp_integral_e(2, x - 2)/(x - 2)

________________________________________________________________________________________

mupad [B]  time = 4.44, size = 48, normalized size = 1.60 \begin {gather*} 2\,{\mathrm {e}}^{-x}\,\ln \relax (2)-5\,{\mathrm {e}}^{-x}-x^2\,{\mathrm {e}}^{-x}-5\,x\,{\mathrm {e}}^{-x}\,{\mathrm {e}}^{-\frac {x}{x-2}}\,{\mathrm {e}}^{-\frac {4}{x-2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-x)*(exp(-(x + 4)/(x - 2))*(10*x - 25*x^2 + 5*x^3 - 20) - 28*x + 17*x^2 - 6*x^3 + x^4 - 2*log(2)*(x^2
 - 4*x + 4) + 20))/(x^2 - 4*x + 4),x)

[Out]

2*exp(-x)*log(2) - 5*exp(-x) - x^2*exp(-x) - 5*x*exp(-x)*exp(-x/(x - 2))*exp(-4/(x - 2))

________________________________________________________________________________________

sympy [A]  time = 11.02, size = 29, normalized size = 0.97 \begin {gather*} - 5 x e^{- x} e^{\frac {- x - 4}{x - 2}} + \left (- x^{2} - 5 + 2 \log {\relax (2 )}\right ) e^{- x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((5*x**3-25*x**2+10*x-20)*exp((-x-4)/(x-2))+2*(-x**2+4*x-4)*ln(2)+x**4-6*x**3+17*x**2-28*x+20)/(x**2
-4*x+4)/exp(x),x)

[Out]

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

________________________________________________________________________________________