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

   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 = 14 \[ \int \frac {-2+3 x+5 x^2}{2 x^2+x^3} \, dx=\frac {1}{x}+2 \log (x)+3 \log (2+x) \]

[Out]

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

Rubi [A] (verified)

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

[In]

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

[Out]

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

Rule 907

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

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]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.07

method result size
default \(\frac {1}{x}+2 \ln \left (x \right )+3 \ln \left (2+x \right )\) \(15\)
norman \(\frac {1}{x}+2 \ln \left (x \right )+3 \ln \left (2+x \right )\) \(15\)
risch \(\frac {1}{x}+2 \ln \left (x \right )+3 \ln \left (2+x \right )\) \(15\)
parallelrisch \(\frac {2 x \ln \left (x \right )+3 \ln \left (2+x \right ) x +1}{x}\) \(19\)
meijerg \(\frac {1}{x}+2 \ln \left (x \right )-2 \ln \left (2\right )+3 \ln \left (1+\frac {x}{2}\right )\) \(21\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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