\(\int \frac {-3 e^{\frac {3+4 x}{x}}+5 x^2+2 x^3}{x^2} \, dx\) [5100]

   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 [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 30 \[ \int \frac {-3 e^{\frac {3+4 x}{x}}+5 x^2+2 x^3}{x^2} \, dx=1+e^{4+\frac {3}{x}}+x+5 x^2+4 \left (x-x^2\right )-\log (4) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.53, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {14, 2240} \[ \int \frac {-3 e^{\frac {3+4 x}{x}}+5 x^2+2 x^3}{x^2} \, dx=x^2+5 x+e^{\frac {3}{x}+4} \]

[In]

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

[Out]

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

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 \left (5-\frac {3 e^{4+\frac {3}{x}}}{x^2}+2 x\right ) \, dx \\ & = 5 x+x^2-3 \int \frac {e^{4+\frac {3}{x}}}{x^2} \, dx \\ & = e^{4+\frac {3}{x}}+5 x+x^2 \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.53

method result size
derivativedivides \(x^{2}+5 x +{\mathrm e}^{4+\frac {3}{x}}\) \(16\)
default \(x^{2}+5 x +{\mathrm e}^{4+\frac {3}{x}}\) \(16\)
risch \(x^{2}+5 x +{\mathrm e}^{\frac {3+4 x}{x}}\) \(18\)
parallelrisch \(x^{2}+5 x +{\mathrm e}^{\frac {3+4 x}{x}}\) \(18\)
parts \(x^{2}+5 x +{\mathrm e}^{\frac {3+4 x}{x}}\) \(18\)
norman \(\frac {x^{3}+{\mathrm e}^{\frac {3+4 x}{x}} x +5 x^{2}}{x}\) \(26\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.47 \[ \int \frac {-3 e^{\frac {3+4 x}{x}}+5 x^2+2 x^3}{x^2} \, dx=x^{2} + 5 x + e^{\frac {4 x + 3}{x}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.50 \[ \int \frac {-3 e^{\frac {3+4 x}{x}}+5 x^2+2 x^3}{x^2} \, dx=x^{2} + 5 \, x + e^{\left (\frac {3}{x} + 4\right )} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (20) = 40\).

Time = 0.27 (sec) , antiderivative size = 91, normalized size of antiderivative = 3.03 \[ \int \frac {-3 e^{\frac {3+4 x}{x}}+5 x^2+2 x^3}{x^2} \, dx=\frac {\frac {{\left (4 \, x + 3\right )}^{2} e^{\left (\frac {4 \, x + 3}{x}\right )}}{x^{2}} - \frac {8 \, {\left (4 \, x + 3\right )} e^{\left (\frac {4 \, x + 3}{x}\right )}}{x} + \frac {15 \, {\left (4 \, x + 3\right )}}{x} + 16 \, e^{\left (\frac {4 \, x + 3}{x}\right )} - 51}{\frac {{\left (4 \, x + 3\right )}^{2}}{x^{2}} - \frac {8 \, {\left (4 \, x + 3\right )}}{x} + 16} \]

[In]

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

[Out]

((4*x + 3)^2*e^((4*x + 3)/x)/x^2 - 8*(4*x + 3)*e^((4*x + 3)/x)/x + 15*(4*x + 3)/x + 16*e^((4*x + 3)/x) - 51)/(
(4*x + 3)^2/x^2 - 8*(4*x + 3)/x + 16)

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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