3.24.16 \(\int \frac {52+20 x+2 x^2+(-4-x) \log (4+x)}{4+x} \, dx\)

Optimal. Leaf size=17 \[ \frac {244}{3}+x+x^2-x (-12+\log (4+x)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 22, normalized size of antiderivative = 1.29, number of steps used = 6, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {6742, 698, 2389, 2295} \begin {gather*} x^2+13 x-(x+4) \log (x+4)+4 \log (x+4) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(52 + 20*x + 2*x^2 + (-4 - x)*Log[4 + x])/(4 + x),x]

[Out]

13*x + x^2 + 4*Log[4 + x] - (4 + x)*Log[4 + x]

Rule 698

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

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 {2 \left (26+10 x+x^2\right )}{4+x}-\log (4+x)\right ) \, dx\\ &=2 \int \frac {26+10 x+x^2}{4+x} \, dx-\int \log (4+x) \, dx\\ &=2 \int \left (6+x+\frac {2}{4+x}\right ) \, dx-\operatorname {Subst}(\int \log (x) \, dx,x,4+x)\\ &=13 x+x^2+4 \log (4+x)-(4+x) \log (4+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 1.12 \begin {gather*} x+4 (4+x)+(4+x)^2-x \log (4+x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(52 + 20*x + 2*x^2 + (-4 - x)*Log[4 + x])/(4 + x),x]

[Out]

x + 4*(4 + x) + (4 + x)^2 - x*Log[4 + x]

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 14, normalized size = 0.82 \begin {gather*} x^{2} - x \log \left (x + 4\right ) + 13 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x-4)*log(4+x)+2*x^2+20*x+52)/(4+x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 14, normalized size = 0.82 \begin {gather*} x^{2} - x \log \left (x + 4\right ) + 13 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x-4)*log(4+x)+2*x^2+20*x+52)/(4+x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.43, size = 15, normalized size = 0.88




method result size



norman \(x^{2}+13 x -\ln \left (4+x \right ) x\) \(15\)
risch \(x^{2}+13 x -\ln \left (4+x \right ) x\) \(15\)
derivativedivides \(-\left (4+x \right ) \ln \left (4+x \right )+20+5 x +\left (4+x \right )^{2}+4 \ln \left (4+x \right )\) \(26\)
default \(-\left (4+x \right ) \ln \left (4+x \right )+20+5 x +\left (4+x \right )^{2}+4 \ln \left (4+x \right )\) \(26\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-x-4)*ln(4+x)+2*x^2+20*x+52)/(4+x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 29, normalized size = 1.71 \begin {gather*} x^{2} - {\left (x - 4 \, \log \left (x + 4\right )\right )} \log \left (x + 4\right ) - 4 \, \log \left (x + 4\right )^{2} + 13 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x-4)*log(4+x)+2*x^2+20*x+52)/(4+x),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.41, size = 13, normalized size = 0.76 \begin {gather*} x^2-x\,\left (\ln \left (x+4\right )-13\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((20*x - log(x + 4)*(x + 4) + 2*x^2 + 52)/(x + 4),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 12, normalized size = 0.71 \begin {gather*} x^{2} - x \log {\left (x + 4 \right )} + 13 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x-4)*ln(4+x)+2*x**2+20*x+52)/(4+x),x)

[Out]

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

________________________________________________________________________________________