3.103.68 \(\int \frac {18-x-x^2}{6 x+x^2} \, dx\)

Optimal. Leaf size=15 \[ \log \left (e^{-x} x^3 (6+x)^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 14, normalized size of antiderivative = 0.93, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {1593, 893} \begin {gather*} -x+3 \log (x)+2 \log (x+6) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(18 - x - x^2)/(6*x + x^2),x]

[Out]

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

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {18-x-x^2}{x (6+x)} \, dx\\ &=\int \left (-1+\frac {3}{x}+\frac {2}{6+x}\right ) \, dx\\ &=-x+3 \log (x)+2 \log (6+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 14, normalized size = 0.93 \begin {gather*} -x+3 \log (x)+2 \log (6+x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(18 - x - x^2)/(6*x + x^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 14, normalized size = 0.93 \begin {gather*} -x + 2 \, \log \left (x + 6\right ) + 3 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2-x+18)/(x^2+6*x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 16, normalized size = 1.07 \begin {gather*} -x + 2 \, \log \left ({\left | x + 6 \right |}\right ) + 3 \, \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2-x+18)/(x^2+6*x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.09, size = 15, normalized size = 1.00




method result size



default \(-x +3 \ln \relax (x )+2 \ln \left (x +6\right )\) \(15\)
norman \(-x +3 \ln \relax (x )+2 \ln \left (x +6\right )\) \(15\)
risch \(-x +3 \ln \relax (x )+2 \ln \left (x +6\right )\) \(15\)
meijerg \(2 \ln \left (1+\frac {x}{6}\right )+3 \ln \relax (x )-3 \ln \relax (2)-3 \ln \relax (3)-x\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2-x+18)/(x^2+6*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 14, normalized size = 0.93 \begin {gather*} -x + 2 \, \log \left (x + 6\right ) + 3 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2-x+18)/(x^2+6*x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 6.83, size = 14, normalized size = 0.93 \begin {gather*} 2\,\ln \left (x+6\right )-x+3\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x + x^2 - 18)/(6*x + x^2),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 12, normalized size = 0.80 \begin {gather*} - x + 3 \log {\relax (x )} + 2 \log {\left (x + 6 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2-x+18)/(x**2+6*x),x)

[Out]

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

________________________________________________________________________________________