\(\int \frac {e^x (1792-832 x+80 x^2+4 x^3+e^4 (-8 x-3 x^2+x^3))}{64-32 x+4 x^2} \, dx\) [6452]

   Optimal result
   Rubi [B] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 47, antiderivative size = 24 \[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=e^x \left (27+x-\frac {e^4 x^2}{4 (4-x)}\right ) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(58\) vs. \(2(24)=48\).

Time = 0.08 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.42, number of steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {27, 12, 2230, 2225, 2208, 2209, 2207} \[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=-\frac {1}{4} \left (4+e^4\right ) e^x (4-x)+\frac {1}{4} \left (128+9 e^4\right ) e^x-\frac {1}{4} \left (4+e^4\right ) e^x-\frac {4 e^{x+4}}{4-x} \]

[In]

Int[(E^x*(1792 - 832*x + 80*x^2 + 4*x^3 + E^4*(-8*x - 3*x^2 + x^3)))/(64 - 32*x + 4*x^2),x]

[Out]

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

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 2207

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] &&  !TrueQ[$UseGamma]

Rule 2208

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] &&  !TrueQ[$UseGamm
a]

Rule 2209

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

Rule 2225

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 2230

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] &&  !TrueQ[$UseGamma]

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{4 (-4+x)^2} \, dx \\ & = \frac {1}{4} \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{(-4+x)^2} \, dx \\ & = \frac {1}{4} \int \left (e^x \left (128+9 e^4\right )-\frac {16 e^{4+x}}{(-4+x)^2}+\frac {16 e^{4+x}}{-4+x}+e^x \left (4+e^4\right ) (-4+x)\right ) \, dx \\ & = -\left (4 \int \frac {e^{4+x}}{(-4+x)^2} \, dx\right )+4 \int \frac {e^{4+x}}{-4+x} \, dx+\frac {1}{4} \left (4+e^4\right ) \int e^x (-4+x) \, dx+\frac {1}{4} \left (128+9 e^4\right ) \int e^x \, dx \\ & = \frac {1}{4} e^x \left (128+9 e^4\right )-\frac {4 e^{4+x}}{4-x}-\frac {1}{4} e^x \left (4+e^4\right ) (4-x)+4 e^8 \text {Ei}(-4+x)-4 \int \frac {e^{4+x}}{-4+x} \, dx+\frac {1}{4} \left (-4-e^4\right ) \int e^x \, dx \\ & = -\frac {1}{4} e^x \left (4+e^4\right )+\frac {1}{4} e^x \left (128+9 e^4\right )-\frac {4 e^{4+x}}{4-x}-\frac {1}{4} e^x \left (4+e^4\right ) (4-x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.38 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08 \[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=\frac {e^x \left (-432+92 x+\left (4+e^4\right ) x^2\right )}{4 (-4+x)} \]

[In]

Integrate[(E^x*(1792 - 832*x + 80*x^2 + 4*x^3 + E^4*(-8*x - 3*x^2 + x^3)))/(64 - 32*x + 4*x^2),x]

[Out]

(E^x*(-432 + 92*x + (4 + E^4)*x^2))/(4*(-4 + x))

Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08

method result size
gosper \(\frac {\left (x^{2} {\mathrm e}^{4}+4 x^{2}+92 x -432\right ) {\mathrm e}^{x}}{4 x -16}\) \(26\)
risch \(\frac {\left (x^{2} {\mathrm e}^{4}+4 x^{2}+92 x -432\right ) {\mathrm e}^{x}}{4 x -16}\) \(26\)
norman \(\frac {\left (\frac {{\mathrm e}^{4}}{4}+1\right ) x^{2} {\mathrm e}^{x}+23 \,{\mathrm e}^{x} x -108 \,{\mathrm e}^{x}}{x -4}\) \(29\)
parallelrisch \(\frac {x^{2} {\mathrm e}^{4} {\mathrm e}^{x}+4 \,{\mathrm e}^{x} x^{2}+92 \,{\mathrm e}^{x} x -432 \,{\mathrm e}^{x}}{4 x -16}\) \(33\)
default \(\frac {{\mathrm e}^{4} \left (7 \,{\mathrm e}^{x}+{\mathrm e}^{x} x -\frac {64 \,{\mathrm e}^{x}}{x -4}-112 \,{\mathrm e}^{4} \operatorname {Ei}_{1}\left (-x +4\right )\right )}{4}+27 \,{\mathrm e}^{x}+{\mathrm e}^{x} x -2 \,{\mathrm e}^{4} \left (-\frac {4 \,{\mathrm e}^{x}}{x -4}-5 \,{\mathrm e}^{4} \operatorname {Ei}_{1}\left (-x +4\right )\right )-\frac {3 \,{\mathrm e}^{4} \left ({\mathrm e}^{x}-\frac {16 \,{\mathrm e}^{x}}{x -4}-24 \,{\mathrm e}^{4} \operatorname {Ei}_{1}\left (-x +4\right )\right )}{4}\) \(95\)

[In]

int(((x^3-3*x^2-8*x)*exp(4)+4*x^3+80*x^2-832*x+1792)*exp(x)/(4*x^2-32*x+64),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.04 \[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=\frac {{\left (x^{2} e^{4} + 4 \, x^{2} + 92 \, x - 432\right )} e^{x}}{4 \, {\left (x - 4\right )}} \]

[In]

integrate(((x^3-3*x^2-8*x)*exp(4)+4*x^3+80*x^2-832*x+1792)*exp(x)/(4*x^2-32*x+64),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=\frac {\left (4 x^{2} + x^{2} e^{4} + 92 x - 432\right ) e^{x}}{4 x - 16} \]

[In]

integrate(((x**3-3*x**2-8*x)*exp(4)+4*x**3+80*x**2-832*x+1792)*exp(x)/(4*x**2-32*x+64),x)

[Out]

(4*x**2 + x**2*exp(4) + 92*x - 432)*exp(x)/(4*x - 16)

Maxima [F]

\[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=\int { \frac {{\left (4 \, x^{3} + 80 \, x^{2} + {\left (x^{3} - 3 \, x^{2} - 8 \, x\right )} e^{4} - 832 \, x + 1792\right )} e^{x}}{4 \, {\left (x^{2} - 8 \, x + 16\right )}} \,d x } \]

[In]

integrate(((x^3-3*x^2-8*x)*exp(4)+4*x^3+80*x^2-832*x+1792)*exp(x)/(4*x^2-32*x+64),x, algorithm="maxima")

[Out]

1/4*(x^3*(e^4 + 4) - 4*x^2*(e^4 - 19) - 800*x)*e^x/(x^2 - 8*x + 16) - 448*e^4*exp_integral_e(2, -x + 4)/(x - 4
) - 1/4*integrate(64*(x + 50)*e^x/(x^3 - 12*x^2 + 48*x - 64), x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.33 \[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=\frac {x^{2} e^{\left (x + 4\right )} + 4 \, x^{2} e^{x} + 92 \, x e^{x} - 432 \, e^{x}}{4 \, {\left (x - 4\right )}} \]

[In]

integrate(((x^3-3*x^2-8*x)*exp(4)+4*x^3+80*x^2-832*x+1792)*exp(x)/(4*x^2-32*x+64),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 11.36 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08 \[ \int \frac {e^x \left (1792-832 x+80 x^2+4 x^3+e^4 \left (-8 x-3 x^2+x^3\right )\right )}{64-32 x+4 x^2} \, dx=\frac {{\mathrm {e}}^x\,\left (92\,x+x^2\,{\mathrm {e}}^4+4\,x^2-432\right )}{4\,\left (x-4\right )} \]

[In]

int((exp(x)*(80*x^2 - exp(4)*(8*x + 3*x^2 - x^3) - 832*x + 4*x^3 + 1792))/(4*x^2 - 32*x + 64),x)

[Out]

(exp(x)*(92*x + x^2*exp(4) + 4*x^2 - 432))/(4*(x - 4))