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

Optimal. Leaf size=16 \[ \frac{x^2}{2}+5 x+\frac{4}{x} \]

[Out]

4/x + 5*x + x^2/2

________________________________________________________________________________________

Rubi [A]  time = 0.0050837, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {14} \[ \frac{x^2}{2}+5 x+\frac{4}{x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

4/x + 5*x + x^2/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]]

Rubi steps

\begin{align*} \int \frac{-4+5 x^2+x^3}{x^2} \, dx &=\int \left (5-\frac{4}{x^2}+x\right ) \, dx\\ &=\frac{4}{x}+5 x+\frac{x^2}{2}\\ \end{align*}

Mathematica [A]  time = 0.0009091, size = 16, normalized size = 1. \[ \frac{x^2}{2}+5 x+\frac{4}{x} \]

Antiderivative was successfully verified.

[In]

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

[Out]

4/x + 5*x + x^2/2

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 15, normalized size = 0.9 \begin{align*} 4\,{x}^{-1}+5\,x+{\frac{{x}^{2}}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4/x+5*x+1/2*x^2

________________________________________________________________________________________

Maxima [A]  time = 1.04251, size = 19, normalized size = 1.19 \begin{align*} \frac{1}{2} \, x^{2} + 5 \, x + \frac{4}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2 + 5*x + 4/x

________________________________________________________________________________________

Fricas [A]  time = 1.20301, size = 35, normalized size = 2.19 \begin{align*} \frac{x^{3} + 10 \, x^{2} + 8}{2 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(x^3 + 10*x^2 + 8)/x

________________________________________________________________________________________

Sympy [A]  time = 0.065589, size = 10, normalized size = 0.62 \begin{align*} \frac{x^{2}}{2} + 5 x + \frac{4}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**2/2 + 5*x + 4/x

________________________________________________________________________________________

Giac [A]  time = 1.10936, size = 19, normalized size = 1.19 \begin{align*} \frac{1}{2} \, x^{2} + 5 \, x + \frac{4}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*x^2 + 5*x + 4/x