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

   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 = 12, antiderivative size = 15 \[ \int \frac {-2+x^2+x^3}{x^4} \, dx=\frac {2}{3 x^3}-\frac {1}{x}+\log (x) \]

[Out]

2/3/x^3-1/x+ln(x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {14} \[ \int \frac {-2+x^2+x^3}{x^4} \, dx=\frac {2}{3 x^3}-\frac {1}{x}+\log (x) \]

[In]

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

[Out]

2/(3*x^3) - x^(-1) + Log[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 \left (-\frac {2}{x^4}+\frac {1}{x^2}+\frac {1}{x}\right ) \, dx \\ & = \frac {2}{3 x^3}-\frac {1}{x}+\log (x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \frac {-2+x^2+x^3}{x^4} \, dx=\frac {2}{3 x^3}-\frac {1}{x}+\log (x) \]

[In]

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

[Out]

2/(3*x^3) - x^(-1) + Log[x]

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.93

method result size
default \(\frac {2}{3 x^{3}}-\frac {1}{x}+\ln \left (x \right )\) \(14\)
norman \(\frac {\frac {2}{3}-x^{2}}{x^{3}}+\ln \left (x \right )\) \(15\)
risch \(\frac {\frac {2}{3}-x^{2}}{x^{3}}+\ln \left (x \right )\) \(15\)
parallelrisch \(\frac {3 \ln \left (x \right ) x^{3}+2-3 x^{2}}{3 x^{3}}\) \(20\)

[In]

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

[Out]

2/3/x^3-1/x+ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.27 \[ \int \frac {-2+x^2+x^3}{x^4} \, dx=\frac {3 \, x^{3} \log \left (x\right ) - 3 \, x^{2} + 2}{3 \, x^{3}} \]

[In]

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

[Out]

1/3*(3*x^3*log(x) - 3*x^2 + 2)/x^3

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.93 \[ \int \frac {-2+x^2+x^3}{x^4} \, dx=\log {\left (x \right )} + \frac {2 - 3 x^{2}}{3 x^{3}} \]

[In]

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

[Out]

log(x) + (2 - 3*x**2)/(3*x**3)

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

-1/3*(3*x^2 - 2)/x^3 + log(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.07 \[ \int \frac {-2+x^2+x^3}{x^4} \, dx=-\frac {3 \, x^{2} - 2}{3 \, x^{3}} + \log \left ({\left | x \right |}\right ) \]

[In]

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

[Out]

-1/3*(3*x^2 - 2)/x^3 + log(abs(x))

Mupad [B] (verification not implemented)

Time = 8.82 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \frac {-2+x^2+x^3}{x^4} \, dx=\ln \left (x\right )-\frac {x^2-\frac {2}{3}}{x^3} \]

[In]

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

[Out]

log(x) - (x^2 - 2/3)/x^3