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

Optimal. Leaf size=26 \[ 7+\frac {-5+x}{x}-\frac {x}{e^3}+x^2-\log \left (e^{2 x}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 17, normalized size of antiderivative = 0.65, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {6, 14} \begin {gather*} x^2-\left (2+\frac {1}{e^3}\right ) x-\frac {5}{x} \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 18, normalized size = 0.69 \begin {gather*} -\frac {5}{x}-2 x-\frac {x}{e^3}+x^2 \end {gather*}

Antiderivative was successfully verified.

[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

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 25, normalized size = 0.96 \begin {gather*} -\frac {{\left (x^{2} - {\left (x^{3} - 2 \, x^{2} - 5\right )} e^{3}\right )} e^{\left (-3\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 26, normalized size = 1.00 \begin {gather*} {\left (x^{2} e^{6} - 2 \, x e^{6} - x e^{3}\right )} e^{\left (-6\right )} - \frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 18, normalized size = 0.69




method result size



risch \(-{\mathrm e}^{-3} x +x^{2}-2 x -\frac {5}{x}\) \(18\)
default \(x^{2}-2 x -\frac {5}{x}-{\mathrm e}^{\ln \relax (x )-3}\) \(20\)
norman \(\frac {-5+x^{3}-{\mathrm e}^{-3} \left (2 \,{\mathrm e}^{3}+1\right ) x^{2}}{x}\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 25, normalized size = 0.96 \begin {gather*} {\left (x^{2} e^{3} - x {\left (2 \, e^{3} + 1\right )}\right )} e^{\left (-3\right )} - \frac {5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 20, normalized size = 0.77 \begin {gather*} -\frac {-x^3+\left ({\mathrm {e}}^{-3}+2\right )\,x^2+5}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 26, normalized size = 1.00 \begin {gather*} \frac {x^{2} e^{3} + x \left (- 2 e^{3} - 1\right ) - \frac {5 e^{3}}{x}}{e^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________