3.13.62 \(\int \frac {e^{-x} (3840+1920 x-1622 x^2+194 x^3+10 x^4+e^x (16 x^2-8 x^3+x^4))}{16 x^2-8 x^3+x^4} \, dx\)

Optimal. Leaf size=28 \[ -3+x-\frac {e^{-x} \left (x+(30+x) \left (8+\frac {x}{-4+x}\right )\right )}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 1.52, antiderivative size = 33, normalized size of antiderivative = 1.18, number of steps used = 31, number of rules used = 7, integrand size = 60, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.117, Rules used = {1594, 27, 6742, 2177, 2178, 2199, 2194} \begin {gather*} x-10 e^{-x}+\frac {34 e^{-x}}{4-x}-\frac {240 e^{-x}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3840 + 1920*x - 1622*x^2 + 194*x^3 + 10*x^4 + E^x*(16*x^2 - 8*x^3 + x^4))/(E^x*(16*x^2 - 8*x^3 + x^4)),x]

[Out]

-10/E^x + 34/(E^x*(4 - x)) - 240/(E^x*x) + x

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2177

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[((c + d*x)^(m
 + 1)*(b*F^(g*(e + f*x)))^n)/(d*(m + 1)), x] - Dist[(f*g*n*Log[F])/(d*(m + 1)), Int[(c + d*x)^(m + 1)*(b*F^(g*
(e + f*x)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && LtQ[m, -1] && IntegerQ[2*m] &&  !$UseGamma ===
True

Rule 2178

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - (c*f)/d))*ExpIntegral
Ei[(f*g*(c + d*x)*Log[F])/d])/d, x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2199

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !$UseGamma === True

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-x} \left (3840+1920 x-1622 x^2+194 x^3+10 x^4+e^x \left (16 x^2-8 x^3+x^4\right )\right )}{x^2 \left (16-8 x+x^2\right )} \, dx\\ &=\int \frac {e^{-x} \left (3840+1920 x-1622 x^2+194 x^3+10 x^4+e^x \left (16 x^2-8 x^3+x^4\right )\right )}{(-4+x)^2 x^2} \, dx\\ &=\int \left (1-\frac {1622 e^{-x}}{(-4+x)^2}+\frac {3840 e^{-x}}{(-4+x)^2 x^2}+\frac {1920 e^{-x}}{(-4+x)^2 x}+\frac {194 e^{-x} x}{(-4+x)^2}+\frac {10 e^{-x} x^2}{(-4+x)^2}\right ) \, dx\\ &=x+10 \int \frac {e^{-x} x^2}{(-4+x)^2} \, dx+194 \int \frac {e^{-x} x}{(-4+x)^2} \, dx-1622 \int \frac {e^{-x}}{(-4+x)^2} \, dx+1920 \int \frac {e^{-x}}{(-4+x)^2 x} \, dx+3840 \int \frac {e^{-x}}{(-4+x)^2 x^2} \, dx\\ &=-\frac {1622 e^{-x}}{4-x}+x+10 \int \left (e^{-x}+\frac {16 e^{-x}}{(-4+x)^2}+\frac {8 e^{-x}}{-4+x}\right ) \, dx+194 \int \left (\frac {4 e^{-x}}{(-4+x)^2}+\frac {e^{-x}}{-4+x}\right ) \, dx+1622 \int \frac {e^{-x}}{-4+x} \, dx+1920 \int \left (\frac {e^{-x}}{4 (-4+x)^2}-\frac {e^{-x}}{16 (-4+x)}+\frac {e^{-x}}{16 x}\right ) \, dx+3840 \int \left (\frac {e^{-x}}{16 (-4+x)^2}-\frac {e^{-x}}{32 (-4+x)}+\frac {e^{-x}}{16 x^2}+\frac {e^{-x}}{32 x}\right ) \, dx\\ &=-\frac {1622 e^{-x}}{4-x}+x+\frac {1622 \text {Ei}(4-x)}{e^4}+10 \int e^{-x} \, dx+80 \int \frac {e^{-x}}{-4+x} \, dx-2 \left (120 \int \frac {e^{-x}}{-4+x} \, dx\right )+2 \left (120 \int \frac {e^{-x}}{x} \, dx\right )+160 \int \frac {e^{-x}}{(-4+x)^2} \, dx+194 \int \frac {e^{-x}}{-4+x} \, dx+240 \int \frac {e^{-x}}{(-4+x)^2} \, dx+240 \int \frac {e^{-x}}{x^2} \, dx+480 \int \frac {e^{-x}}{(-4+x)^2} \, dx+776 \int \frac {e^{-x}}{(-4+x)^2} \, dx\\ &=-10 e^{-x}+\frac {34 e^{-x}}{4-x}-\frac {240 e^{-x}}{x}+x+\frac {1656 \text {Ei}(4-x)}{e^4}+240 \text {Ei}(-x)-160 \int \frac {e^{-x}}{-4+x} \, dx-240 \int \frac {e^{-x}}{-4+x} \, dx-240 \int \frac {e^{-x}}{x} \, dx-480 \int \frac {e^{-x}}{-4+x} \, dx-776 \int \frac {e^{-x}}{-4+x} \, dx\\ &=-10 e^{-x}+\frac {34 e^{-x}}{4-x}-\frac {240 e^{-x}}{x}+x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.41, size = 22, normalized size = 0.79 \begin {gather*} e^{-x} \left (-10-\frac {34}{-4+x}-\frac {240}{x}\right )+x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3840 + 1920*x - 1622*x^2 + 194*x^3 + 10*x^4 + E^x*(16*x^2 - 8*x^3 + x^4))/(E^x*(16*x^2 - 8*x^3 + x^
4)),x]

[Out]

(-10 - 34/(-4 + x) - 240/x)/E^x + x

________________________________________________________________________________________

fricas [A]  time = 1.09, size = 38, normalized size = 1.36 \begin {gather*} -\frac {{\left (10 \, x^{2} - {\left (x^{3} - 4 \, x^{2}\right )} e^{x} + 234 \, x - 960\right )} e^{\left (-x\right )}}{x^{2} - 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^4-8*x^3+16*x^2)*exp(x)+10*x^4+194*x^3-1622*x^2+1920*x+3840)/(x^4-8*x^3+16*x^2)/exp(x),x, algorit
hm="fricas")

[Out]

-(10*x^2 - (x^3 - 4*x^2)*e^x + 234*x - 960)*e^(-x)/(x^2 - 4*x)

________________________________________________________________________________________

giac [A]  time = 0.36, size = 41, normalized size = 1.46 \begin {gather*} \frac {x^{3} - 10 \, x^{2} e^{\left (-x\right )} - 4 \, x^{2} - 234 \, x e^{\left (-x\right )} + 960 \, e^{\left (-x\right )}}{x^{2} - 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^4-8*x^3+16*x^2)*exp(x)+10*x^4+194*x^3-1622*x^2+1920*x+3840)/(x^4-8*x^3+16*x^2)/exp(x),x, algorit
hm="giac")

[Out]

(x^3 - 10*x^2*e^(-x) - 4*x^2 - 234*x*e^(-x) + 960*e^(-x))/(x^2 - 4*x)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 27, normalized size = 0.96




method result size



risch \(x -\frac {2 \left (5 x^{2}+117 x -480\right ) {\mathrm e}^{-x}}{\left (x -4\right ) x}\) \(27\)
norman \(\frac {\left (960+{\mathrm e}^{x} x^{3}-16 \,{\mathrm e}^{x} x -234 x -10 x^{2}\right ) {\mathrm e}^{-x}}{x \left (x -4\right )}\) \(35\)
default \(x -\frac {480 \,{\mathrm e}^{-x} \left (x -2\right )}{\left (x -4\right ) x}+\frac {206 \,{\mathrm e}^{-x}}{x -4}-10 \,{\mathrm e}^{-x}\) \(37\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^4-8*x^3+16*x^2)*exp(x)+10*x^4+194*x^3-1622*x^2+1920*x+3840)/(x^4-8*x^3+16*x^2)/exp(x),x,method=_RETURN
VERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 35, normalized size = 1.25 \begin {gather*} \frac {x^{3} - 4 \, x^{2} - 2 \, {\left (5 \, x^{2} + 117 \, x - 480\right )} e^{\left (-x\right )}}{x^{2} - 4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^4-8*x^3+16*x^2)*exp(x)+10*x^4+194*x^3-1622*x^2+1920*x+3840)/(x^4-8*x^3+16*x^2)/exp(x),x, algorit
hm="maxima")

[Out]

(x^3 - 4*x^2 - 2*(5*x^2 + 117*x - 480)*e^(-x))/(x^2 - 4*x)

________________________________________________________________________________________

mupad [B]  time = 0.96, size = 32, normalized size = 1.14 \begin {gather*} {\mathrm {e}}^{-x}\,\left (x\,{\mathrm {e}}^x-10\right )-\frac {240\,{\mathrm {e}}^{-x}}{x}-\frac {34\,{\mathrm {e}}^{-x}}{x-4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-x)*(1920*x - 1622*x^2 + 194*x^3 + 10*x^4 + exp(x)*(16*x^2 - 8*x^3 + x^4) + 3840))/(16*x^2 - 8*x^3 +
x^4),x)

[Out]

exp(-x)*(x*exp(x) - 10) - (240*exp(-x))/x - (34*exp(-x))/(x - 4)

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 20, normalized size = 0.71 \begin {gather*} x + \frac {\left (- 10 x^{2} - 234 x + 960\right ) e^{- x}}{x^{2} - 4 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**4-8*x**3+16*x**2)*exp(x)+10*x**4+194*x**3-1622*x**2+1920*x+3840)/(x**4-8*x**3+16*x**2)/exp(x),x
)

[Out]

x + (-10*x**2 - 234*x + 960)*exp(-x)/(x**2 - 4*x)

________________________________________________________________________________________