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

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

Optimal result

Integrand size = 31, antiderivative size = 30 \[ \int \frac {16 e^{4/x}+2 x^2+e^4 x^2+8 x^3}{x^2} \, dx=2 x+e^4 \left (e^{4/3}+x\right )-4 \left (e^{4/x}-x^2\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {6, 14, 2240} \[ \int \frac {16 e^{4/x}+2 x^2+e^4 x^2+8 x^3}{x^2} \, dx=4 x^2+\left (2+e^4\right ) x-4 e^{4/x} \]

[In]

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

[Out]

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

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(e + f*x)^n*(
F^(a + b*(c + d*x)^n)/(b*f*n*(c + d*x)^n*Log[F])), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.57 \[ \int \frac {16 e^{4/x}+2 x^2+e^4 x^2+8 x^3}{x^2} \, dx=4 x^{2} + x \left (2 + e^{4}\right ) - 4 e^{\frac {4}{x}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.93 \[ \int \frac {16 e^{4/x}+2 x^2+e^4 x^2+8 x^3}{x^2} \, dx=x^{2} {\left (\frac {e^{4}}{x} + \frac {2}{x} - \frac {4 \, e^{\frac {4}{x}}}{x^{2}} + 4\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.61 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.70 \[ \int \frac {16 e^{4/x}+2 x^2+e^4 x^2+8 x^3}{x^2} \, dx=2\,x-4\,{\mathrm {e}}^{4/x}+x\,{\mathrm {e}}^4+4\,x^2 \]

[In]

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

[Out]

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