3.62.67 \(\int \frac {(2 x-x^2-x^3) \log (5)+(4+12 x+12 x^2+4 x^3) \log (\frac {18+9 x}{x})}{2 x+7 x^2+9 x^3+5 x^4+x^5} \, dx\) [6167]

Optimal. Leaf size=24 \[ 3+\frac {x \log (5)}{(1+x)^2}-\log ^2\left (\frac {9 (2+x)}{x}\right ) \]

[Out]

3-ln(27/x*(2/3+1/3*x))^2+ln(5)*x/(1+x)^2

________________________________________________________________________________________

Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
time = 0.23, antiderivative size = 60, normalized size of antiderivative = 2.50, number of steps used = 17, number of rules used = 13, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {6820, 6874, 24, 34, 2516, 2504, 2439, 2438, 2512, 266, 2463, 2437, 2338} \begin {gather*} 2 \text {PolyLog}\left (2,-\frac {2}{x}\right )+2 \text {PolyLog}\left (2,-\frac {x}{2}\right )+\log ^2(x+2)-2 \log \left (\frac {18}{x}+9\right ) \log (x+2)+2 \log (9) \log (x)-2 \log (2) \log (x)+\frac {x \log (5)}{(x+1)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((2*x - x^2 - x^3)*Log[5] + (4 + 12*x + 12*x^2 + 4*x^3)*Log[(18 + 9*x)/x])/(2*x + 7*x^2 + 9*x^3 + 5*x^4 +
x^5),x]

[Out]

(x*Log[5])/(1 + x)^2 - 2*Log[2]*Log[x] + 2*Log[9]*Log[x] - 2*Log[9 + 18/x]*Log[2 + x] + Log[2 + x]^2 + 2*PolyL
og[2, -2/x] + 2*PolyLog[2, -1/2*x]

Rule 24

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((A_.) + (B_.)*(v_) + (C_.)*(v_)^2), x_Symbol] :> Dist[1/b^2, Int[u*(a + b*
v)^(m + 1)*Simp[b*B - a*C + b*C*v, x], x], x] /; FreeQ[{a, b, A, B, C}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0] &&
 LeQ[m, -1]

Rule 34

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

Rule 266

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

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2437

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

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2439

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*d])*Log[x], x] + Dist[
b, Int[Log[1 + e*(x/d)]/x, x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[c*d, 0]

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2512

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

Rule 2516

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_.) + (g_.)*(x_))^(r_.), x_S
ymbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x^n)^p])^q, x^m*(f + g*x)^r, x], x] /; FreeQ[{a, b, c, d, e,
 f, g, n, p, q}, x] && IntegerQ[m] && IntegerQ[r]

Rule 6820

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

Rule 6874

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {\frac {-x \log (5)-x^2 \log (5)+\log (25)}{(1+x)^3}+\frac {4 \log \left (\frac {9 (2+x)}{x}\right )}{x}}{2+x} \, dx\\ &=\int \left (\frac {-x \log (5)-x^2 \log (5)+\log (25)}{(1+x)^3 (2+x)}+\frac {4 \log \left (9+\frac {18}{x}\right )}{x (2+x)}\right ) \, dx\\ &=4 \int \frac {\log \left (9+\frac {18}{x}\right )}{x (2+x)} \, dx+\int \frac {-x \log (5)-x^2 \log (5)+\log (25)}{(1+x)^3 (2+x)} \, dx\\ &=4 \int \left (\frac {\log \left (9+\frac {18}{x}\right )}{2 x}-\frac {\log \left (9+\frac {18}{x}\right )}{2 (2+x)}\right ) \, dx+\int \frac {\log (5)-x \log (5)}{(1+x)^3} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}+2 \int \frac {\log \left (9+\frac {18}{x}\right )}{x} \, dx-2 \int \frac {\log \left (9+\frac {18}{x}\right )}{2+x} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)-2 \text {Subst}\left (\int \frac {\log (9+18 x)}{x} \, dx,x,\frac {1}{x}\right )-36 \int \frac {\log (2+x)}{\left (9+\frac {18}{x}\right ) x^2} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)-2 \text {Subst}\left (\int \frac {\log (1+2 x)}{x} \, dx,x,\frac {1}{x}\right )-36 \int \left (\frac {\log (2+x)}{18 x}-\frac {\log (2+x)}{18 (2+x)}\right ) \, dx\\ &=\frac {x \log (5)}{(1+x)^2}+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)+2 \text {Li}_2\left (-\frac {2}{x}\right )-2 \int \frac {\log (2+x)}{x} \, dx+2 \int \frac {\log (2+x)}{2+x} \, dx\\ &=\frac {x \log (5)}{(1+x)^2}-2 \log (2) \log (x)+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)+2 \text {Li}_2\left (-\frac {2}{x}\right )-2 \int \frac {\log \left (1+\frac {x}{2}\right )}{x} \, dx+2 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,2+x\right )\\ &=\frac {x \log (5)}{(1+x)^2}-2 \log (2) \log (x)+2 \log (9) \log (x)-2 \log \left (9+\frac {18}{x}\right ) \log (2+x)+\log ^2(2+x)+2 \text {Li}_2\left (-\frac {2}{x}\right )+2 \text {Li}_2\left (-\frac {x}{2}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 31, normalized size = 1.29 \begin {gather*} -\frac {\log (5)}{(1+x)^2}+\frac {\log (5)}{1+x}-\log ^2\left (\frac {9 (2+x)}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((2*x - x^2 - x^3)*Log[5] + (4 + 12*x + 12*x^2 + 4*x^3)*Log[(18 + 9*x)/x])/(2*x + 7*x^2 + 9*x^3 + 5*
x^4 + x^5),x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 1.28, size = 40, normalized size = 1.67

method result size
risch \(\frac {\ln \left (5\right )}{x +1}-\frac {\ln \left (5\right )}{\left (x +1\right )^{2}}-\ln \left (9+\frac {18}{x}\right )^{2}\) \(31\)
derivativedivides \(-\frac {324 \ln \left (5\right )}{\left (\frac {18}{x}+18\right )^{2}}+\frac {18 \ln \left (5\right )}{\frac {18}{x}+18}-\ln \left (9+\frac {18}{x}\right )^{2}\) \(40\)
default \(-\frac {324 \ln \left (5\right )}{\left (\frac {18}{x}+18\right )^{2}}+\frac {18 \ln \left (5\right )}{\frac {18}{x}+18}-\ln \left (9+\frac {18}{x}\right )^{2}\) \(40\)
norman \(\frac {x \ln \left (5\right )-\ln \left (\frac {9 x +18}{x}\right )^{2}-2 x \ln \left (\frac {9 x +18}{x}\right )^{2}-x^{2} \ln \left (\frac {9 x +18}{x}\right )^{2}}{\left (x +1\right )^{2}}\) \(58\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((4*x^3+12*x^2+12*x+4)*ln((9*x+18)/x)+(-x^3-x^2+2*x)*ln(5))/(x^5+5*x^4+9*x^3+7*x^2+2*x),x,method=_RETURNVE
RBOSE)

[Out]

-324*ln(5)/(18/x+18)^2+18*ln(5)/(18/x+18)-ln(9+18/x)^2

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (24) = 48\).
time = 0.65, size = 99, normalized size = 4.12 \begin {gather*} -\frac {{\left (x^{2} + 2 \, x + 1\right )} \log \left (x + 2\right )^{2} + {\left (x^{2} + 2 \, x + 1\right )} \log \left (x\right )^{2} - x \log \left (5\right ) + 2 \, {\left (2 \, x^{2} \log \left (3\right ) + 4 \, x \log \left (3\right ) - {\left (x^{2} + 2 \, x + 1\right )} \log \left (x\right ) + 2 \, \log \left (3\right )\right )} \log \left (x + 2\right ) - 4 \, {\left (x^{2} \log \left (3\right ) + 2 \, x \log \left (3\right ) + \log \left (3\right )\right )} \log \left (x\right )}{x^{2} + 2 \, x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x^3+12*x^2+12*x+4)*log((9*x+18)/x)+(-x^3-x^2+2*x)*log(5))/(x^5+5*x^4+9*x^3+7*x^2+2*x),x, algorit
hm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 38, normalized size = 1.58 \begin {gather*} -\frac {{\left (x^{2} + 2 \, x + 1\right )} \log \left (\frac {9 \, {\left (x + 2\right )}}{x}\right )^{2} - x \log \left (5\right )}{x^{2} + 2 \, x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x^3+12*x^2+12*x+4)*log((9*x+18)/x)+(-x^3-x^2+2*x)*log(5))/(x^5+5*x^4+9*x^3+7*x^2+2*x),x, algorit
hm="fricas")

[Out]

-((x^2 + 2*x + 1)*log(9*(x + 2)/x)^2 - x*log(5))/(x^2 + 2*x + 1)

________________________________________________________________________________________

Sympy [A]
time = 0.10, size = 22, normalized size = 0.92 \begin {gather*} \frac {x \log {\left (5 \right )}}{x^{2} + 2 x + 1} - \log {\left (\frac {9 x + 18}{x} \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x**3+12*x**2+12*x+4)*ln((9*x+18)/x)+(-x**3-x**2+2*x)*ln(5))/(x**5+5*x**4+9*x**3+7*x**2+2*x),x)

[Out]

x*log(5)/(x**2 + 2*x + 1) - log((9*x + 18)/x)**2

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (24) = 48\).
time = 0.40, size = 51, normalized size = 2.12 \begin {gather*} -\log \left (\frac {9 \, {\left (x + 2\right )}}{x}\right )^{2} + \frac {2 \, {\left (\frac {{\left (x + 2\right )} \log \left (5\right )}{x} - \log \left (5\right )\right )}}{\frac {{\left (x + 2\right )}^{2}}{x^{2}} + \frac {2 \, {\left (x + 2\right )}}{x} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((4*x^3+12*x^2+12*x+4)*log((9*x+18)/x)+(-x^3-x^2+2*x)*log(5))/(x^5+5*x^4+9*x^3+7*x^2+2*x),x, algorit
hm="giac")

[Out]

-log(9*(x + 2)/x)^2 + 2*((x + 2)*log(5)/x - log(5))/((x + 2)^2/x^2 + 2*(x + 2)/x + 1)

________________________________________________________________________________________

Mupad [B]
time = 4.28, size = 24, normalized size = 1.00 \begin {gather*} \frac {x\,\ln \left (5\right )}{{\left (x+1\right )}^2}-{\ln \left (\frac {9\,x+18}{x}\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(5)*(x^2 - 2*x + x^3) - log((9*x + 18)/x)*(12*x + 12*x^2 + 4*x^3 + 4))/(2*x + 7*x^2 + 9*x^3 + 5*x^4 +
 x^5),x)

[Out]

(x*log(5))/(x + 1)^2 - log((9*x + 18)/x)^2

________________________________________________________________________________________