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

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

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.47, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {642} \[ \int \frac {3+2 x}{1+3 x+x^2} \, dx=\log \left (x^2+3 x+1\right ) \]

[In]

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

[Out]

Log[1 + 3*x + x^2]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.47 \[ \int \frac {3+2 x}{1+3 x+x^2} \, dx=\log \left (1+3 x+x^2\right ) \]

[In]

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

[Out]

Log[1 + 3*x + x^2]

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.53

method result size
derivativedivides \(\ln \left (x^{2}+3 x +1\right )\) \(10\)
default \(\ln \left (x^{2}+3 x +1\right )\) \(10\)
norman \(\ln \left (x^{2}+3 x +1\right )\) \(10\)
risch \(\ln \left (x^{2}+3 x +1\right )\) \(10\)
parallelrisch \(\ln \left (x^{2}+3 x +1\right )\) \(10\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.42 \[ \int \frac {3+2 x}{1+3 x+x^2} \, dx=\log {\left (x^{2} + 3 x + 1 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 15.70 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.47 \[ \int \frac {3+2 x}{1+3 x+x^2} \, dx=\ln \left (x^2+3\,x+1\right ) \]

[In]

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

[Out]

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