3.102.59 \(\int \frac {-4-12 x-12 x^2-20 x^3+(4 x+8 x^2+12 x^3) \log (\frac {4}{x+x^2})}{x} \, dx\)

Optimal. Leaf size=26 \[ \left (1+x+x \left (x+x^2\right )\right ) \left (-4+4 \log \left (\frac {4}{x (1+x)}\right )\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.20, antiderivative size = 131, normalized size of antiderivative = 5.04, number of steps used = 21, number of rules used = 9, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.204, Rules used = {14, 2513, 2356, 2295, 2304, 2417, 2389, 2395, 43} \begin {gather*} -4 x^3-4 x^3 \log (x)-4 x^3 \log (x+1)+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (x+1)}\right )+\log (x+1)\right )-4 x^2-4 x^2 \log (x)-4 x^2 \log (x+1)+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (x+1)}\right )+\log (x+1)\right )-4 x-4 x \log (x)+4 x \left (\log (x)+\log \left (\frac {4}{x (x+1)}\right )+\log (x+1)\right )-4 \log (x)-4 (x+1) \log (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-4*x - 4*x^2 - 4*x^3 - 4*Log[x] - 4*x*Log[x] - 4*x^2*Log[x] - 4*x^3*Log[x] - 4*x^2*Log[1 + x] - 4*x^3*Log[1 +
x] - 4*(1 + x)*Log[1 + x] + 4*x*(Log[x] + Log[4/(x*(1 + x))] + Log[1 + x]) + 4*x^2*(Log[x] + Log[4/(x*(1 + x))
] + Log[1 + x]) + 4*x^3*(Log[x] + Log[4/(x*(1 + x))] + Log[1 + 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 2295

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

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 2356

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(Polyx_), x_Symbol] :> Int[ExpandIntegrand[Polyx*(a + b*Log[c*
x^n])^p, x], x] /; FreeQ[{a, b, c, n, p}, x] && PolynomialQ[Polyx, 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 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 2417

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(Polyx_), x_Symbol] :> Int[ExpandIntegrand[Poly
x*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, n, p}, x] && PolynomialQ[Polyx, x]

Rule 2513

Int[Log[(e_.)*((f_.)*((a_.) + (b_.)*(x_))^(p_.)*((c_.) + (d_.)*(x_))^(q_.))^(r_.)]*(RFx_.), x_Symbol] :> Dist[
p*r, Int[RFx*Log[a + b*x], x], x] + (Dist[q*r, Int[RFx*Log[c + d*x], x], x] - Dist[p*r*Log[a + b*x] + q*r*Log[
c + d*x] - Log[e*(f*(a + b*x)^p*(c + d*x)^q)^r], Int[RFx, x], x]) /; FreeQ[{a, b, c, d, e, f, p, q, r}, x] &&
RationalFunctionQ[RFx, x] && NeQ[b*c - a*d, 0] &&  !MatchQ[RFx, (u_.)*(a + b*x)^(m_.)*(c + d*x)^(n_.) /; Integ
ersQ[m, n]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {4 \left (1+3 x+3 x^2+5 x^3\right )}{x}+4 \left (1+2 x+3 x^2\right ) \log \left (\frac {4}{x (1+x)}\right )\right ) \, dx\\ &=-\left (4 \int \frac {1+3 x+3 x^2+5 x^3}{x} \, dx\right )+4 \int \left (1+2 x+3 x^2\right ) \log \left (\frac {4}{x (1+x)}\right ) \, dx\\ &=-\left (4 \int \left (3+\frac {1}{x}+3 x+5 x^2\right ) \, dx\right )-4 \int \left (1+2 x+3 x^2\right ) \log (x) \, dx-4 \int \left (1+2 x+3 x^2\right ) \log (1+x) \, dx-\left (4 \left (-\log (x)-\log \left (\frac {4}{x (1+x)}\right )-\log (1+x)\right )\right ) \int \left (1+2 x+3 x^2\right ) \, dx\\ &=-12 x-6 x^2-\frac {20 x^3}{3}-4 \log (x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )-4 \int \left (\log (x)+2 x \log (x)+3 x^2 \log (x)\right ) \, dx-4 \int \left (\log (1+x)+2 x \log (1+x)+3 x^2 \log (1+x)\right ) \, dx\\ &=-12 x-6 x^2-\frac {20 x^3}{3}-4 \log (x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )-4 \int \log (x) \, dx-4 \int \log (1+x) \, dx-8 \int x \log (x) \, dx-8 \int x \log (1+x) \, dx-12 \int x^2 \log (x) \, dx-12 \int x^2 \log (1+x) \, dx\\ &=-8 x-4 x^2-\frac {16 x^3}{3}-4 \log (x)-4 x \log (x)-4 x^2 \log (x)-4 x^3 \log (x)-4 x^2 \log (1+x)-4 x^3 \log (1+x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 \int \frac {x^2}{1+x} \, dx+4 \int \frac {x^3}{1+x} \, dx-4 \operatorname {Subst}(\int \log (x) \, dx,x,1+x)\\ &=-4 x-4 x^2-\frac {16 x^3}{3}-4 \log (x)-4 x \log (x)-4 x^2 \log (x)-4 x^3 \log (x)-4 x^2 \log (1+x)-4 x^3 \log (1+x)-4 (1+x) \log (1+x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 \int \left (1+\frac {1}{-1-x}-x+x^2\right ) \, dx+4 \int \left (-1+x+\frac {1}{1+x}\right ) \, dx\\ &=-4 x-4 x^2-4 x^3-4 \log (x)-4 x \log (x)-4 x^2 \log (x)-4 x^3 \log (x)-4 x^2 \log (1+x)-4 x^3 \log (1+x)-4 (1+x) \log (1+x)+4 x \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^2 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )+4 x^3 \left (\log (x)+\log \left (\frac {4}{x (1+x)}\right )+\log (1+x)\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 32, normalized size = 1.23 \begin {gather*} -4 \log (x)-4 \log (1+x)+4 x \left (1+x+x^2\right ) \left (-1+\log \left (\frac {4}{x+x^2}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 35, normalized size = 1.35 \begin {gather*} -4 \, x^{3} - 4 \, x^{2} + 4 \, {\left (x^{3} + x^{2} + x + 1\right )} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 44, normalized size = 1.69 \begin {gather*} -4 \, x^{3} - 4 \, x^{2} + 4 \, {\left (x^{3} + x^{2} + x\right )} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x - 4 \, \log \left (x + 1\right ) - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 48, normalized size = 1.85




method result size



risch \(\left (4 x^{3}+4 x^{2}+4 x \right ) \ln \left (\frac {4}{x^{2}+x}\right )-4 x^{3}-4 x^{2}-4 x -4 \ln \left (x^{2}+x \right )\) \(48\)
norman \(-4 x -4 x^{2}-4 x^{3}+4 x \ln \left (\frac {4}{x^{2}+x}\right )+4 x^{2} \ln \left (\frac {4}{x^{2}+x}\right )+4 x^{3} \ln \left (\frac {4}{x^{2}+x}\right )+4 \ln \left (\frac {4}{x^{2}+x}\right )\) \(70\)
default \(4 x^{2} \ln \left (\frac {1}{x \left (x +1\right )}\right )-4 x^{2}+4 x^{3} \ln \left (\frac {1}{x \left (x +1\right )}\right )-4 x^{3}+4 x \ln \left (\frac {1}{x \left (x +1\right )}\right )-4 x -4 \ln \left (x +1\right )+8 x^{3} \ln \relax (2)+8 x^{2} \ln \relax (2)+8 x \ln \relax (2)-4 \ln \relax (x )\) \(87\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.35, size = 67, normalized size = 2.58 \begin {gather*} 4 \, x^{3} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x^{3} + 4 \, x^{2} \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x^{2} + 4 \, x \log \left (\frac {4}{x^{2} + x}\right ) - 4 \, x - 4 \, \log \left (x + 1\right ) - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 6.77, size = 63, normalized size = 2.42 \begin {gather*} 4\,\ln \left (\frac {1}{x^2+x}\right )+x\,\left (4\,\ln \left (\frac {4}{x^2+x}\right )-4\right )+x^2\,\left (4\,\ln \left (\frac {4}{x^2+x}\right )-4\right )+x^3\,\left (4\,\ln \left (\frac {4}{x^2+x}\right )-4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(12*x + 12*x^2 + 20*x^3 - log(4/(x + x^2))*(4*x + 8*x^2 + 12*x^3) + 4)/x,x)

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 0.21, size = 42, normalized size = 1.62 \begin {gather*} - 4 x^{3} - 4 x^{2} - 4 x + \left (4 x^{3} + 4 x^{2} + 4 x\right ) \log {\left (\frac {4}{x^{2} + x} \right )} - 4 \log {\left (x^{2} + x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((12*x**3+8*x**2+4*x)*ln(4/(x**2+x))-20*x**3-12*x**2-12*x-4)/x,x)

[Out]

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

________________________________________________________________________________________