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

   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 = 24, antiderivative size = 26 \[ \int \frac {5-2 x^2-\frac {x^2}{e^3}+2 x^3}{x^2} \, dx=7+\frac {-5+x}{x}-\frac {x}{e^3}+x^2-\log \left (e^{2 x}\right ) \]

[Out]

7+(-5+x)/x-exp(ln(x)-3)-ln(exp(x)^2)+x^2

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.65, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {6, 14} \[ \int \frac {5-2 x^2-\frac {x^2}{e^3}+2 x^3}{x^2} \, dx=x^2-\left (2+\frac {1}{e^3}\right ) x-\frac {5}{x} \]

[In]

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

[Out]

-5/x - (2 + E^(-3))*x + 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]]

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.69 \[ \int \frac {5-2 x^2-\frac {x^2}{e^3}+2 x^3}{x^2} \, dx=-\frac {5}{x}-2 x-\frac {x}{e^3}+x^2 \]

[In]

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

[Out]

-5/x - 2*x - x/E^3 + x^2

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.69

method result size
risch \(-x \,{\mathrm e}^{-3}+x^{2}-2 x -\frac {5}{x}\) \(18\)
default \(x^{2}-2 x -\frac {5}{x}-{\mathrm e}^{\ln \left (x \right )-3}\) \(20\)
parts \(x^{2}-2 x -\frac {5}{x}-{\mathrm e}^{\ln \left (x \right )-3}\) \(20\)
norman \(\frac {-5+x^{3}-{\mathrm e}^{-3} \left (2 \,{\mathrm e}^{3}+1\right ) x^{2}}{x}\) \(25\)
parallelrisch \(\frac {x^{5}-2 x^{4}-{\mathrm e}^{\ln \left (x \right )-3} x^{3}-5 x^{2}}{x^{3}}\) \(29\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

-(x^2 - (x^3 - 2*x^2 - 5)*e^3)*e^(-3)/x

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {5-2 x^2-\frac {x^2}{e^3}+2 x^3}{x^2} \, dx=\frac {x^{2} e^{3} + x \left (- 2 e^{3} - 1\right ) - \frac {5 e^{3}}{x}}{e^{3}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {5-2 x^2-\frac {x^2}{e^3}+2 x^3}{x^2} \, dx={\left (x^{2} e^{6} - 2 \, x e^{6} - x e^{3}\right )} e^{\left (-6\right )} - \frac {5}{x} \]

[In]

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

[Out]

(x^2*e^6 - 2*x*e^6 - x*e^3)*e^(-6) - 5/x

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.77 \[ \int \frac {5-2 x^2-\frac {x^2}{e^3}+2 x^3}{x^2} \, dx=-\frac {-x^3+\left ({\mathrm {e}}^{-3}+2\right )\,x^2+5}{x} \]

[In]

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

[Out]

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