3.69.18 \(\int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx\)

Optimal. Leaf size=27 \[ 2 x-x^2-3 (1+2 x) \left (-1-x^2+\log (6+x)\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 29, normalized size of antiderivative = 1.07, number of steps used = 6, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {6742, 1850, 2389, 2295} \begin {gather*} 6 x^3+2 x^2+8 x-6 (x+6) \log (x+6)+33 \log (x+6) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(45 + 26*x + 112*x^2 + 18*x^3 + (-36 - 6*x)*Log[6 + x])/(6 + x),x]

[Out]

8*x + 2*x^2 + 6*x^3 + 33*Log[6 + x] - 6*(6 + x)*Log[6 + x]

Rule 1850

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {45+26 x+112 x^2+18 x^3}{6+x}-6 \log (6+x)\right ) \, dx\\ &=-(6 \int \log (6+x) \, dx)+\int \frac {45+26 x+112 x^2+18 x^3}{6+x} \, dx\\ &=-(6 \operatorname {Subst}(\int \log (x) \, dx,x,6+x))+\int \left (2+4 x+18 x^2+\frac {33}{6+x}\right ) \, dx\\ &=8 x+2 x^2+6 x^3+33 \log (6+x)-6 (6+x) \log (6+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 27, normalized size = 1.00 \begin {gather*} 8 x+2 x^2+6 x^3-3 \log (6+x)-6 x \log (6+x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(45 + 26*x + 112*x^2 + 18*x^3 + (-36 - 6*x)*Log[6 + x])/(6 + x),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 25, normalized size = 0.93 \begin {gather*} 6 \, x^{3} + 2 \, x^{2} - 3 \, {\left (2 \, x + 1\right )} \log \left (x + 6\right ) + 8 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-36)*log(x+6)+18*x^3+112*x^2+26*x+45)/(x+6),x, algorithm="fricas")

[Out]

6*x^3 + 2*x^2 - 3*(2*x + 1)*log(x + 6) + 8*x

________________________________________________________________________________________

giac [A]  time = 0.12, size = 27, normalized size = 1.00 \begin {gather*} 6 \, x^{3} + 2 \, x^{2} - 6 \, x \log \left (x + 6\right ) + 8 \, x - 3 \, \log \left (x + 6\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-36)*log(x+6)+18*x^3+112*x^2+26*x+45)/(x+6),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 28, normalized size = 1.04




method result size



norman \(-3 \ln \left (x +6\right )+8 x +2 x^{2}+6 x^{3}-6 x \ln \left (x +6\right )\) \(28\)
risch \(-3 \ln \left (x +6\right )+8 x +2 x^{2}+6 x^{3}-6 x \ln \left (x +6\right )\) \(28\)
derivativedivides \(6 \left (x +6\right )^{3}-6 \left (x +6\right ) \ln \left (x +6\right )+632 x +3792-106 \left (x +6\right )^{2}+33 \ln \left (x +6\right )\) \(35\)
default \(6 \left (x +6\right )^{3}-6 \left (x +6\right ) \ln \left (x +6\right )+632 x +3792-106 \left (x +6\right )^{2}+33 \ln \left (x +6\right )\) \(35\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-6*x-36)*ln(x+6)+18*x^3+112*x^2+26*x+45)/(x+6),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 42, normalized size = 1.56 \begin {gather*} 6 \, x^{3} + 2 \, x^{2} - 6 \, {\left (x - 6 \, \log \left (x + 6\right )\right )} \log \left (x + 6\right ) - 36 \, \log \left (x + 6\right )^{2} + 8 \, x - 3 \, \log \left (x + 6\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-36)*log(x+6)+18*x^3+112*x^2+26*x+45)/(x+6),x, algorithm="maxima")

[Out]

6*x^3 + 2*x^2 - 6*(x - 6*log(x + 6))*log(x + 6) - 36*log(x + 6)^2 + 8*x - 3*log(x + 6)

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 28, normalized size = 1.04 \begin {gather*} 2\,x^2-3\,\ln \left (x+6\right )+6\,x^3-x\,\left (6\,\ln \left (x+6\right )-8\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((26*x + 112*x^2 + 18*x^3 - log(x + 6)*(6*x + 36) + 45)/(x + 6),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 27, normalized size = 1.00 \begin {gather*} 6 x^{3} + 2 x^{2} - 6 x \log {\left (x + 6 \right )} + 8 x - 3 \log {\left (x + 6 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-6*x-36)*ln(x+6)+18*x**3+112*x**2+26*x+45)/(x+6),x)

[Out]

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

________________________________________________________________________________________