3.94.39 \(\int \frac {16 x-8 x^3+(-24 x^2-12 x^3) \log (x)+(-24 x^2-12 x^3) \log (2+x)}{2+x} \, dx\)

Optimal. Leaf size=19 \[ 4 x^2 (1-x \log (x)-x \log (2+x)) \]

________________________________________________________________________________________

Rubi [A]  time = 0.36, antiderivative size = 22, normalized size of antiderivative = 1.16, number of steps used = 13, number of rules used = 8, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {6688, 12, 6742, 14, 772, 2304, 2395, 43} \begin {gather*} -4 x^3 \log (x)-4 x^3 \log (x+2)+4 x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 772

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegr
and[(d + e*x)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IGtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, 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 \frac {4 x \left (-2 \left (-2+x^2\right )-3 x (2+x) \log (x)-3 x (2+x) \log (2+x)\right )}{2+x} \, dx\\ &=4 \int \frac {x \left (-2 \left (-2+x^2\right )-3 x (2+x) \log (x)-3 x (2+x) \log (2+x)\right )}{2+x} \, dx\\ &=4 \int \left (-\frac {x \left (-4+2 x^2+6 x \log (x)+3 x^2 \log (x)\right )}{2+x}-3 x^2 \log (2+x)\right ) \, dx\\ &=-\left (4 \int \frac {x \left (-4+2 x^2+6 x \log (x)+3 x^2 \log (x)\right )}{2+x} \, dx\right )-12 \int x^2 \log (2+x) \, dx\\ &=-4 x^3 \log (2+x)+4 \int \frac {x^3}{2+x} \, dx-4 \int x \left (\frac {2 \left (-2+x^2\right )}{2+x}+3 x \log (x)\right ) \, dx\\ &=-4 x^3 \log (2+x)+4 \int \left (4-2 x+x^2-\frac {8}{2+x}\right ) \, dx-4 \int \left (\frac {2 x \left (-2+x^2\right )}{2+x}+3 x^2 \log (x)\right ) \, dx\\ &=16 x-4 x^2+\frac {4 x^3}{3}-32 \log (2+x)-4 x^3 \log (2+x)-8 \int \frac {x \left (-2+x^2\right )}{2+x} \, dx-12 \int x^2 \log (x) \, dx\\ &=16 x-4 x^2+\frac {8 x^3}{3}-4 x^3 \log (x)-32 \log (2+x)-4 x^3 \log (2+x)-8 \int \left (2-2 x+x^2-\frac {4}{2+x}\right ) \, dx\\ &=4 x^2-4 x^3 \log (x)-4 x^3 \log (2+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 22, normalized size = 1.16 \begin {gather*} -4 \left (-x^2+x^3 \log (x)+x^3 \log (2+x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 22, normalized size = 1.16 \begin {gather*} -4 \, x^{3} \log \left (x + 2\right ) - 4 \, x^{3} \log \relax (x) + 4 \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.13, size = 22, normalized size = 1.16 \begin {gather*} -4 \, x^{3} \log \left (x + 2\right ) - 4 \, x^{3} \log \relax (x) + 4 \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.53, size = 23, normalized size = 1.21




method result size



risch \(-4 x^{3} \ln \relax (x )-4 \ln \left (2+x \right ) x^{3}+4 x^{2}\) \(23\)
default \(-4 x^{3} \ln \relax (x )-4 \left (2+x \right )^{3} \ln \left (2+x \right )+4 x^{2}+\frac {176}{3}+24 \ln \left (2+x \right ) \left (2+x \right )^{2}-48 \left (2+x \right ) \ln \left (2+x \right )+32 \ln \left (2+x \right )\) \(52\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 30, normalized size = 1.58 \begin {gather*} -4 \, x^{3} \log \relax (x) + 4 \, x^{2} - 4 \, {\left (x^{3} + 8\right )} \log \left (x + 2\right ) + 32 \, \log \left (x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*x^3*log(x) + 4*x^2 - 4*(x^3 + 8)*log(x + 2) + 32*log(x + 2)

________________________________________________________________________________________

mupad [B]  time = 7.70, size = 22, normalized size = 1.16 \begin {gather*} 4\,x^2-4\,x^3\,\ln \left (x+2\right )-4\,x^3\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.59, size = 32, normalized size = 1.68 \begin {gather*} - 4 x^{3} \log {\relax (x )} + 4 x^{2} + \left (- 4 x^{3} - 8\right ) \log {\left (x + 2 \right )} + 8 \log {\left (x + 2 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________