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

Optimal. Leaf size=19 \[ \frac {7}{4} \log (1-x)+\frac {1}{4} \log (x+3) \]

[Out]

7/4*ln(1-x)+1/4*ln(3+x)

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {632, 31} \[ \frac {7}{4} \log (1-x)+\frac {1}{4} \log (x+3) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(7*Log[1 - x])/4 + Log[3 + x]/4

Rule 31

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 19, normalized size = 1.00 \[ \frac {7}{4} \log (1-x)+\frac {1}{4} \log (x+3) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(7*Log[1 - x])/4 + Log[3 + x]/4

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 13, normalized size = 0.68 \[ \frac {1}{4} \, \log \left (x + 3\right ) + \frac {7}{4} \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*log(x + 3) + 7/4*log(x - 1)

________________________________________________________________________________________

giac [A]  time = 0.01, size = 15, normalized size = 0.79 \[ \frac {1}{4} \, \log \left ({\left | x + 3 \right |}\right ) + \frac {7}{4} \, \log \left ({\left | x - 1 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*log(abs(x + 3)) + 7/4*log(abs(x - 1))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 14, normalized size = 0.74 \[ \frac {7 \ln \left (x -1\right )}{4}+\frac {\ln \left (x +3\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*ln(x+3)+7/4*ln(x-1)

________________________________________________________________________________________

maxima [A]  time = 0.47, size = 13, normalized size = 0.68 \[ \frac {1}{4} \, \log \left (x + 3\right ) + \frac {7}{4} \, \log \left (x - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*log(x + 3) + 7/4*log(x - 1)

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 13, normalized size = 0.68 \[ \frac {7\,\ln \left (x-1\right )}{4}+\frac {\ln \left (x+3\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(7*log(x - 1))/4 + log(x + 3)/4

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 14, normalized size = 0.74 \[ \frac {7 \log {\left (x - 1 \right )}}{4} + \frac {\log {\left (x + 3 \right )}}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

7*log(x - 1)/4 + log(x + 3)/4

________________________________________________________________________________________