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

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

[Out]

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

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, 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.125, Rules used = {646, 31} \[ \int \frac {3+5 x}{-3+2 x+x^2} \, dx=2 \log (1-x)+3 \log (x+3) \]

[In]

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

[Out]

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

Rule 31

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

Rule 646

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]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.93

method result size
default \(2 \ln \left (-1+x \right )+3 \ln \left (3+x \right )\) \(14\)
norman \(2 \ln \left (-1+x \right )+3 \ln \left (3+x \right )\) \(14\)
risch \(2 \ln \left (-1+x \right )+3 \ln \left (3+x \right )\) \(14\)
parallelrisch \(2 \ln \left (-1+x \right )+3 \ln \left (3+x \right )\) \(14\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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