\(\int \frac {e^x (-256+256 x-255 x^2+256 x^3)}{x^2} \, dx\) [9545]

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

Optimal result

Integrand size = 22, antiderivative size = 23 \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=25-\frac {e^x \left (-256 (1-x)^2-x\right )}{x} \]

[Out]

25-(-x-16*(1-x)*(-16*x+16))*exp(x)/x

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.87, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {2230, 2225, 2208, 2209, 2207} \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=256 e^x x-511 e^x+\frac {256 e^x}{x} \]

[In]

Int[(E^x*(-256 + 256*x - 255*x^2 + 256*x^3))/x^2,x]

[Out]

-511*E^x + (256*E^x)/x + 256*E^x*x

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 \left (-255 e^x-\frac {256 e^x}{x^2}+\frac {256 e^x}{x}+256 e^x x\right ) \, dx \\ & = -\left (255 \int e^x \, dx\right )-256 \int \frac {e^x}{x^2} \, dx+256 \int \frac {e^x}{x} \, dx+256 \int e^x x \, dx \\ & = -255 e^x+\frac {256 e^x}{x}+256 e^x x+256 \operatorname {ExpIntegralEi}(x)-256 \int e^x \, dx-256 \int \frac {e^x}{x} \, dx \\ & = -511 e^x+\frac {256 e^x}{x}+256 e^x x \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61 \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=e^x \left (-511+\frac {256}{x}+256 x\right ) \]

[In]

Integrate[(E^x*(-256 + 256*x - 255*x^2 + 256*x^3))/x^2,x]

[Out]

E^x*(-511 + 256/x + 256*x)

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.74

method result size
gosper \(\frac {\left (256 x^{2}-511 x +256\right ) {\mathrm e}^{x}}{x}\) \(17\)
risch \(\frac {\left (256 x^{2}-511 x +256\right ) {\mathrm e}^{x}}{x}\) \(17\)
default \(\frac {256 \,{\mathrm e}^{x}}{x}+256 \,{\mathrm e}^{x} x -511 \,{\mathrm e}^{x}\) \(18\)
norman \(\frac {-511 \,{\mathrm e}^{x} x +256 \,{\mathrm e}^{x} x^{2}+256 \,{\mathrm e}^{x}}{x}\) \(22\)
parallelrisch \(\frac {-511 \,{\mathrm e}^{x} x +256 \,{\mathrm e}^{x} x^{2}+256 \,{\mathrm e}^{x}}{x}\) \(22\)
meijerg \(767-128 \left (2-2 x \right ) {\mathrm e}^{x}-255 \,{\mathrm e}^{x}+\frac {256}{x}-\frac {128 \left (2+2 x \right )}{x}+\frac {256 \,{\mathrm e}^{x}}{x}\) \(38\)

[In]

int((256*x^3-255*x^2+256*x-256)*exp(x)/x^2,x,method=_RETURNVERBOSE)

[Out]

1/x*(256*x^2-511*x+256)*exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.70 \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=\frac {{\left (256 \, x^{2} - 511 \, x + 256\right )} e^{x}}{x} \]

[In]

integrate((256*x^3-255*x^2+256*x-256)*exp(x)/x^2,x, algorithm="fricas")

[Out]

(256*x^2 - 511*x + 256)*e^x/x

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.61 \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=\frac {\left (256 x^{2} - 511 x + 256\right ) e^{x}}{x} \]

[In]

integrate((256*x**3-255*x**2+256*x-256)*exp(x)/x**2,x)

[Out]

(256*x**2 - 511*x + 256)*exp(x)/x

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.23 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=256 \, {\left (x - 1\right )} e^{x} + 256 \, {\rm Ei}\left (x\right ) - 255 \, e^{x} - 256 \, \Gamma \left (-1, -x\right ) \]

[In]

integrate((256*x^3-255*x^2+256*x-256)*exp(x)/x^2,x, algorithm="maxima")

[Out]

256*(x - 1)*e^x + 256*Ei(x) - 255*e^x - 256*gamma(-1, -x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=\frac {256 \, x^{2} e^{x} - 511 \, x e^{x} + 256 \, e^{x}}{x} \]

[In]

integrate((256*x^3-255*x^2+256*x-256)*exp(x)/x^2,x, algorithm="giac")

[Out]

(256*x^2*e^x - 511*x*e^x + 256*e^x)/x

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.70 \[ \int \frac {e^x \left (-256+256 x-255 x^2+256 x^3\right )}{x^2} \, dx=\frac {{\mathrm {e}}^x\,\left (256\,x^2-511\,x+256\right )}{x} \]

[In]

int((exp(x)*(256*x - 255*x^2 + 256*x^3 - 256))/x^2,x)

[Out]

(exp(x)*(256*x^2 - 511*x + 256))/x