3.59.54 \(\int \frac {12-3 x}{-8+2 x+x^2} \, dx\)

Optimal. Leaf size=15 \[ \log \left (\frac {-4+2 x}{16 (4+x)^4}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 13, normalized size of antiderivative = 0.87, 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} \begin {gather*} \log (2-x)-4 \log (x+4) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 {gather*} \begin {aligned} \text {integral} &=-\left (4 \int \frac {1}{4+x} \, dx\right )+\int \frac {1}{-2+x} \, dx\\ &=\log (2-x)-4 \log (4+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 21, normalized size = 1.40 \begin {gather*} -3 \left (-\frac {1}{3} \log (2-x)+\frac {4}{3} \log (4+x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 11, normalized size = 0.73 \begin {gather*} -4 \, \log \left (x + 4\right ) + \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 13, normalized size = 0.87 \begin {gather*} -4 \, \log \left ({\left | x + 4 \right |}\right ) + \log \left ({\left | x - 2 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.39, size = 12, normalized size = 0.80




method result size



default \(-4 \ln \left (4+x \right )+\ln \left (x -2\right )\) \(12\)
norman \(-4 \ln \left (4+x \right )+\ln \left (x -2\right )\) \(12\)
risch \(-4 \ln \left (4+x \right )+\ln \left (x -2\right )\) \(12\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 11, normalized size = 0.73 \begin {gather*} -4 \, \log \left (x + 4\right ) + \log \left (x - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 4.04, size = 11, normalized size = 0.73 \begin {gather*} \ln \left (x-2\right )-4\,\ln \left (x+4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 10, normalized size = 0.67 \begin {gather*} \log {\left (x - 2 \right )} - 4 \log {\left (x + 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-3*x+12)/(x**2+2*x-8),x)

[Out]

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

________________________________________________________________________________________