3.31.57 \(\int \frac {-5+e^{4+x} (16-8 x+x^2)}{e^4 (16-8 x+x^2)} \, dx\)

Optimal. Leaf size=16 \[ e^x+\frac {1+x}{e^4 (-4+x)} \]

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {12, 27, 6742, 2194} \begin {gather*} e^x-\frac {5}{e^4 (4-x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x - 5/(E^4*(4 - x))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 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 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 19, normalized size = 1.19 \begin {gather*} \frac {e^{4+x}-\frac {5}{4-x}}{e^4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(E^(4 + x) - 5/(4 - x))/E^4

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 18, normalized size = 1.12 \begin {gather*} \frac {{\left ({\left (x - 4\right )} e^{\left (x + 4\right )} + 5\right )} e^{\left (-4\right )}}{x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.25, size = 22, normalized size = 1.38 \begin {gather*} \frac {{\left (x e^{\left (x + 4\right )} - 4 \, e^{\left (x + 4\right )} + 5\right )} e^{\left (-4\right )}}{x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.59, size = 13, normalized size = 0.81




method result size



risch \(\frac {5 \,{\mathrm e}^{-4}}{x -4}+{\mathrm e}^{x}\) \(13\)
norman \(\frac {{\mathrm e}^{x} x -4 \,{\mathrm e}^{x}+5 \,{\mathrm e}^{-4}}{x -4}\) \(22\)
default \({\mathrm e}^{-4} \left ({\mathrm e}^{4} \left ({\mathrm e}^{x}-\frac {16 \,{\mathrm e}^{x}}{x -4}-24 \,{\mathrm e}^{4} \expIntegralEi \left (1, -x +4\right )\right )+\frac {5}{x -4}+16 \,{\mathrm e}^{4} \left (-\frac {{\mathrm e}^{x}}{x -4}-{\mathrm e}^{4} \expIntegralEi \left (1, -x +4\right )\right )-8 \,{\mathrm e}^{4} \left (-\frac {4 \,{\mathrm e}^{x}}{x -4}-5 \,{\mathrm e}^{4} \expIntegralEi \left (1, -x +4\right )\right )\right )\) \(90\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

((x^2*e^4 - 8*x*e^4)*e^x/(x^2 - 8*x + 16) - 16*e^8*exp_integral_e(2, -x + 4)/(x - 4) + 5/(x - 4) - 32*integrat
e(e^(x + 4)/(x^3 - 12*x^2 + 48*x - 64), x))*e^(-4)

________________________________________________________________________________________

mupad [B]  time = 0.11, size = 22, normalized size = 1.38 \begin {gather*} {\mathrm {e}}^{x+4}\,{\mathrm {e}}^{-4}-\frac {5}{4\,{\mathrm {e}}^4-x\,{\mathrm {e}}^4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 14, normalized size = 0.88 \begin {gather*} e^{x} + \frac {5}{x e^{4} - 4 e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________