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+1/2*x^2

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 16, normalized size of antiderivative = 1.00, 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.00, size = 16, normalized size = 1.00 \[ \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

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 15, normalized size = 0.94 \[ \frac {x^{3} + 10 \, x^{2} + 8}{2 \, x} \]

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

________________________________________________________________________________________

giac [A]  time = 0.31, size = 14, normalized size = 0.88 \[ \frac {1}{2} \, x^{2} + 5 \, x + \frac {4}{x} \]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 15, normalized size = 0.94 \[ \frac {x^{2}}{2}+5 x +\frac {4}{x} \]

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 = 0.46, size = 14, normalized size = 0.88 \[ \frac {1}{2} \, x^{2} + 5 \, x + \frac {4}{x} \]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 15, normalized size = 0.94 \[ \frac {x^3+10\,x^2+8}{2\,x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 10, normalized size = 0.62 \[ \frac {x^{2}}{2} + 5 x + \frac {4}{x} \]

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

________________________________________________________________________________________