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

   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 = 31, antiderivative size = 27 \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=2 x-x^2-3 (1+2 x) \left (-1-x^2+\log (6+x)\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.07, number of steps used = 6, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {6874, 1864, 2436, 2332} \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=6 x^3+2 x^2+8 x-6 (x+6) \log (x+6)+33 \log (x+6) \]

[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 1864

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 2332

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

Rule 2436

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 6874

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

Rubi steps \begin{align*} \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 \text {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{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=8 x+2 x^2+6 x^3-3 \log (6+x)-6 x \log (6+x) \]

[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]

Maple [A] (verified)

Time = 0.51 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.04

method result size
norman \(-3 \ln \left (6+x \right )+8 x +2 x^{2}+6 x^{3}-6 x \ln \left (6+x \right )\) \(28\)
risch \(-3 \ln \left (6+x \right )+8 x +2 x^{2}+6 x^{3}-6 x \ln \left (6+x \right )\) \(28\)
parallelrisch \(6 x^{3}+2 x^{2}-6 x \ln \left (6+x \right )+8 x -3 \ln \left (6+x \right )-168\) \(29\)
parts \(6 x^{3}+2 x^{2}+8 x +33 \ln \left (6+x \right )-6 \ln \left (6+x \right ) \left (6+x \right )+36\) \(31\)
derivativedivides \(6 \left (6+x \right )^{3}-6 \ln \left (6+x \right ) \left (6+x \right )+3792+632 x -106 \left (6+x \right )^{2}+33 \ln \left (6+x \right )\) \(35\)
default \(6 \left (6+x \right )^{3}-6 \ln \left (6+x \right ) \left (6+x \right )+3792+632 x -106 \left (6+x \right )^{2}+33 \ln \left (6+x \right )\) \(35\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.93 \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=6 \, x^{3} + 2 \, x^{2} - 3 \, {\left (2 \, x + 1\right )} \log \left (x + 6\right ) + 8 \, x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=6 x^{3} + 2 x^{2} - 6 x \log {\left (x + 6 \right )} + 8 x - 3 \log {\left (x + 6 \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.56 \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=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 ) \]

[In]

integrate(((-6*x-36)*log(6+x)+18*x^3+112*x^2+26*x+45)/(6+x),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)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=6 \, x^{3} + 2 \, x^{2} - 6 \, x \log \left (x + 6\right ) + 8 \, x - 3 \, \log \left (x + 6\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.04 \[ \int \frac {45+26 x+112 x^2+18 x^3+(-36-6 x) \log (6+x)}{6+x} \, dx=2\,x^2-3\,\ln \left (x+6\right )+6\,x^3-x\,\left (6\,\ln \left (x+6\right )-8\right ) \]

[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)