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

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

________________________________________________________________________________________

Rubi [B]  time = 0.12, antiderivative size = 52, normalized size of antiderivative = 2.74, number of steps used = 16, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {12, 2196, 2194, 2176} \begin {gather*} -\frac {4 e^{1-x} x^2}{4-e}+\frac {16 e^{-x} x^2}{4-e}-\frac {4 e^{-x} x}{4-e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-4*x)/((4 - E)*E^x) - (4*E^(1 - x)*x^2)/(4 - E) + (16*x^2)/((4 - E)*E^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 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), 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] && GtQ[m, 0] && IntegerQ[2*m] &&  !$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 2196

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 20, normalized size = 1.05 \begin {gather*} \frac {4 e^{-x} x (1+(-4+e) x)}{-4+e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4*x*(1 + (-4 + E)*x))/((-4 + E)*E^x)

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 25, normalized size = 1.32 \begin {gather*} \frac {4 \, {\left (x^{2} e - 4 \, x^{2} + x\right )} e^{\left (-x\right )}}{e - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.22, size = 34, normalized size = 1.79 \begin {gather*} \frac {4 \, {\left (x^{2} e^{\left (-x + 1\right )} - {\left (4 \, x^{2} - x\right )} e^{\left (-x\right )}\right )}}{e - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*(x^2*e^(-x + 1) - (4*x^2 - x)*e^(-x))/(e - 4)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 21, normalized size = 1.11




method result size



norman \(\left (4 x^{2}+\frac {4 x}{{\mathrm e}-4}\right ) {\mathrm e}^{-x}\) \(21\)
gosper \(\frac {4 x \left (x \,{\mathrm e}-4 x +1\right ) {\mathrm e}^{-x}}{{\mathrm e}-4}\) \(23\)
risch \(\frac {\left (4 x^{2} {\mathrm e}-16 x^{2}+4 x \right ) {\mathrm e}^{-x}}{{\mathrm e}-4}\) \(28\)
default \(\frac {4 x \,{\mathrm e}^{-x}-16 x^{2} {\mathrm e}^{-x}+8 \,{\mathrm e} \left (-x \,{\mathrm e}^{-x}-{\mathrm e}^{-x}\right )-4 \,{\mathrm e} \left (-x^{2} {\mathrm e}^{-x}-2 x \,{\mathrm e}^{-x}-2 \,{\mathrm e}^{-x}\right )}{{\mathrm e}-4}\) \(70\)
meijerg \(\frac {4-4 \,{\mathrm e}^{-x}}{{\mathrm e}-4}+\frac {\left (-4 \,{\mathrm e}+16\right ) \left (2-\frac {\left (3 x^{2}+6 x +6\right ) {\mathrm e}^{-x}}{3}\right )}{{\mathrm e}-4}+\frac {\left (8 \,{\mathrm e}-36\right ) \left (1-\frac {\left (2 x +2\right ) {\mathrm e}^{-x}}{2}\right )}{{\mathrm e}-4}\) \(75\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.37, size = 72, normalized size = 3.79 \begin {gather*} \frac {4 \, {\left ({\left (x^{2} e + 2 \, x e + 2 \, e\right )} e^{\left (-x\right )} - 4 \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} - 2 \, {\left (x e + e\right )} e^{\left (-x\right )} + 9 \, {\left (x + 1\right )} e^{\left (-x\right )} - e^{\left (-x\right )}\right )}}{e - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*((x^2*e + 2*x*e + 2*e)*e^(-x) - 4*(x^2 + 2*x + 2)*e^(-x) - 2*(x*e + e)*e^(-x) + 9*(x + 1)*e^(-x) - e^(-x))/(
e - 4)

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 22, normalized size = 1.16 \begin {gather*} \frac {4\,x\,{\mathrm {e}}^{-x}\,\left (x\,\mathrm {e}-4\,x+1\right )}{\mathrm {e}-4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 24, normalized size = 1.26 \begin {gather*} \frac {\left (- 16 x^{2} + 4 e x^{2} + 4 x\right ) e^{- x}}{-4 + e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-16*x**2 + 4*E*x**2 + 4*x)*exp(-x)/(-4 + E)

________________________________________________________________________________________