3.482 \(\int \frac{-1+3 x-3 x^2+x^3}{x^2} \, dx\)

Optimal. Leaf size=18 \[ \frac{x^2}{2}-3 x+\frac{1}{x}+3 \log (x) \]

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.016003, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.059 \[ \frac{x^2}{2}-3 x+\frac{1}{x}+3 \log (x) \]

Antiderivative was successfully verified.

[In]  Int[(-1 + 3*x - 3*x^2 + x^3)/x^2,x]

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x^{3} - 3 x^{2} + 3 x - 1}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**3-3*x**2+3*x-1)/x**2,x)

[Out]

Integral((x**3 - 3*x**2 + 3*x - 1)/x**2, x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.00166039, size = 18, normalized size = 1. \[ \frac{x^2}{2}-3 x+\frac{1}{x}+3 \log (x) \]

Antiderivative was successfully verified.

[In]  Integrate[(-1 + 3*x - 3*x^2 + x^3)/x^2,x]

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 17, normalized size = 0.9 \[{x}^{-1}-3\,x+{\frac{{x}^{2}}{2}}+3\,\ln \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^3-3*x^2+3*x-1)/x^2,x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.781365, size = 22, normalized size = 1.22 \[ \frac{1}{2} \, x^{2} - 3 \, x + \frac{1}{x} + 3 \, \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^3 - 3*x^2 + 3*x - 1)/x^2,x, algorithm="maxima")

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.249545, size = 27, normalized size = 1.5 \[ \frac{x^{3} - 6 \, x^{2} + 6 \, x \log \left (x\right ) + 2}{2 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^3 - 3*x^2 + 3*x - 1)/x^2,x, algorithm="fricas")

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.129684, size = 15, normalized size = 0.83 \[ \frac{x^{2}}{2} - 3 x + 3 \log{\left (x \right )} + \frac{1}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**3-3*x**2+3*x-1)/x**2,x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.259882, size = 23, normalized size = 1.28 \[ \frac{1}{2} \, x^{2} - 3 \, x + \frac{1}{x} + 3 \,{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^3 - 3*x^2 + 3*x - 1)/x^2,x, algorithm="giac")

[Out]

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