\(\int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx\) [8848]

   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 = 30, antiderivative size = 23 \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=2-x+\left (-e^4+e^{3/x}-4 x\right ) x \]

[Out]

2-x+x*(exp(3/x)-4*x-exp(4))

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {6, 14, 2326} \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=-4 x^2+e^{3/x} x-\left (1+e^4\right ) x \]

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{3/x} (-3+x)+\left (-1-e^4\right ) x-8 x^2}{x} \, dx \\ & = \int \left (-1-e^4+\frac {e^{3/x} (-3+x)}{x}-8 x\right ) \, dx \\ & = -\left (\left (1+e^4\right ) x\right )-4 x^2+\int \frac {e^{3/x} (-3+x)}{x} \, dx \\ & = e^{3/x} x-\left (1+e^4\right ) x-4 x^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04 \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=-x-e^4 x+e^{3/x} x-4 x^2 \]

[In]

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

[Out]

-x - E^4*x + E^(3/x)*x - 4*x^2

Maple [A] (verified)

Time = 0.46 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00

method result size
derivativedivides \(-4 x^{2}-x -x \,{\mathrm e}^{4}+x \,{\mathrm e}^{\frac {3}{x}}\) \(23\)
default \(-4 x^{2}-x -x \,{\mathrm e}^{4}+x \,{\mathrm e}^{\frac {3}{x}}\) \(23\)
norman \(x \,{\mathrm e}^{\frac {3}{x}}+\left (-{\mathrm e}^{4}-1\right ) x -4 x^{2}\) \(23\)
risch \(-4 x^{2}-x -x \,{\mathrm e}^{4}+x \,{\mathrm e}^{\frac {3}{x}}\) \(23\)
parallelrisch \(-4 x^{2}-x -x \,{\mathrm e}^{4}+x \,{\mathrm e}^{\frac {3}{x}}\) \(23\)
parts \(-4 x^{2}-x -x \,{\mathrm e}^{4}+x \,{\mathrm e}^{\frac {3}{x}}\) \(23\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=-4 \, x^{2} - x e^{4} + x e^{\frac {3}{x}} - x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.83 \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=- 4 x^{2} + x e^{\frac {3}{x}} + x \left (- e^{4} - 1\right ) \]

[In]

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

[Out]

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

Maxima [C] (verification not implemented)

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

Time = 0.22 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.35 \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=-4 \, x^{2} - x e^{4} - x + 3 \, {\rm Ei}\left (\frac {3}{x}\right ) - 3 \, \Gamma \left (-1, -\frac {3}{x}\right ) \]

[In]

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

[Out]

-4*x^2 - x*e^4 - x + 3*Ei(3/x) - 3*gamma(-1, -3/x)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.17 \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=-x^{2} {\left (\frac {e^{4}}{x} - \frac {e^{\frac {3}{x}}}{x} + \frac {1}{x} + 4\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.83 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.78 \[ \int \frac {e^{3/x} (-3+x)-x-e^4 x-8 x^2}{x} \, dx=-x\,\left (4\,x+{\mathrm {e}}^4-{\mathrm {e}}^{3/x}+1\right ) \]

[In]

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

[Out]

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