### 3.275 $$\int \frac{x}{2+3 x+x^2} \, dx$$

Optimal. Leaf size=13 $2 \log (x+2)-\log (x+1)$

[Out]

-Log[1 + x] + 2*Log[2 + x]

________________________________________________________________________________________

Rubi [A]  time = 0.0034389, antiderivative size = 13, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 12, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.167, Rules used = {632, 31} $2 \log (x+2)-\log (x+1)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-Log[1 + x] + 2*Log[2 + x]

Rule 632

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{x}{2+3 x+x^2} \, dx &=2 \int \frac{1}{2+x} \, dx-\int \frac{1}{1+x} \, dx\\ &=-\log (1+x)+2 \log (2+x)\\ \end{align*}

Mathematica [A]  time = 0.0034576, size = 13, normalized size = 1. $2 \log (x+2)-\log (x+1)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

-Log[1 + x] + 2*Log[2 + x]

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 14, normalized size = 1.1 \begin{align*} -\ln \left ( 1+x \right ) +2\,\ln \left ( 2+x \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(1+x)+2*ln(2+x)

________________________________________________________________________________________

Maxima [A]  time = 0.948218, size = 18, normalized size = 1.38 \begin{align*} 2 \, \log \left (x + 2\right ) - \log \left (x + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.70567, size = 36, normalized size = 2.77 \begin{align*} 2 \, \log \left (x + 2\right ) - \log \left (x + 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.088606, size = 10, normalized size = 0.77 \begin{align*} - \log{\left (x + 1 \right )} + 2 \log{\left (x + 2 \right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.08687, size = 20, normalized size = 1.54 \begin{align*} 2 \, \log \left ({\left | x + 2 \right |}\right ) - \log \left ({\left | x + 1 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*log(abs(x + 2)) - log(abs(x + 1))