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

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

[Out]

ln(x)+(1-x)/x-4-ln(2+2*x)-x-exp(4)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.52, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {1607, 1634} \[ \int \frac {-1-x^2-x^3}{x^2+x^3} \, dx=-x+\frac {1}{x}+\log (x)-\log (x+1) \]

[In]

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

[Out]

x^(-1) - x + Log[x] - Log[1 + x]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rubi steps \begin{align*} \text {integral}& = \int \frac {-1-x^2-x^3}{x^2 (1+x)} \, dx \\ & = \int \left (-1+\frac {1}{-1-x}-\frac {1}{x^2}+\frac {1}{x}\right ) \, dx \\ & = \frac {1}{x}-x+\log (x)-\log (1+x) \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

x^(-1) - x + Log[x] - Log[1 + x]

Maple [A] (verified)

Time = 1.19 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.55

method result size
default \(-x +\ln \left (x \right )+\frac {1}{x}-\ln \left (1+x \right )\) \(16\)
meijerg \(-x +\ln \left (x \right )+\frac {1}{x}-\ln \left (1+x \right )\) \(16\)
risch \(-x +\ln \left (x \right )+\frac {1}{x}-\ln \left (1+x \right )\) \(16\)
parallelrisch \(\frac {x \ln \left (x \right )-\ln \left (1+x \right ) x -x^{2}+1}{x}\) \(23\)

[In]

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

[Out]

-x+ln(x)+1/x-ln(1+x)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.41 \[ \int \frac {-1-x^2-x^3}{x^2+x^3} \, dx=- x + \log {\left (x \right )} - \log {\left (x + 1 \right )} + \frac {1}{x} \]

[In]

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

[Out]

-x + log(x) - log(x + 1) + 1/x

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

-x + 1/x - log(x + 1) + log(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.59 \[ \int \frac {-1-x^2-x^3}{x^2+x^3} \, dx=-x + \frac {1}{x} - \log \left ({\left | x + 1 \right |}\right ) + \log \left ({\left | x \right |}\right ) \]

[In]

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

[Out]

-x + 1/x - log(abs(x + 1)) + log(abs(x))

Mupad [B] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.52 \[ \int \frac {-1-x^2-x^3}{x^2+x^3} \, dx=\frac {1}{x}-2\,\mathrm {atanh}\left (2\,x+1\right )-x \]

[In]

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

[Out]

1/x - 2*atanh(2*x + 1) - x