3.58.84 \(\int \frac {-1125-2325 x-335 x^2+849 x^3-216 x^4+16 x^5+(-150 x-140 x^2+74 x^3-8 x^4) \log (5-x)+(-500 x+300 x^2-60 x^3+4 x^4) \log ^2(5-x)+(-90-222 x-112 x^2+32 x^3) \log (x)+(-18 x-48 x^2-32 x^3) \log ^2(x)}{-1125 x-2325 x^2-335 x^3+849 x^4-216 x^5+16 x^6} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.57, antiderivative size = 51, normalized size of antiderivative = 1.55, number of steps used = 29, number of rules used = 16, integrand size = 148, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.108, Rules used = {6688, 2418, 2390, 12, 2301, 2394, 2393, 2391, 2397, 2347, 2344, 2316, 2315, 2314, 31, 2319} \begin {gather*} -\frac {4 (5-x) \log ^2(5-x)}{23 (4 x+3)}-\frac {1}{23} \log ^2(5-x)+\frac {\log ^2(x)}{(5-x)^2}+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-1125 - 2325*x - 335*x^2 + 849*x^3 - 216*x^4 + 16*x^5 + (-150*x - 140*x^2 + 74*x^3 - 8*x^4)*Log[5 - x] +
(-500*x + 300*x^2 - 60*x^3 + 4*x^4)*Log[5 - x]^2 + (-90 - 222*x - 112*x^2 + 32*x^3)*Log[x] + (-18*x - 48*x^2 -
 32*x^3)*Log[x]^2)/(-1125*x - 2325*x^2 - 335*x^3 + 849*x^4 - 216*x^5 + 16*x^6),x]

[Out]

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

Rule 12

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

Rule 31

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

Rule 2301

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 2314

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

Rule 2315

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

Rule 2316

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

Rule 2319

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1
)*(a + b*Log[c*x^n])^p)/(e*(q + 1)), x] - Dist[(b*n*p)/(e*(q + 1)), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2344

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

Rule 2347

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/(x_), x_Symbol] :> Dist[1/d, Int[((
d + e*x)^(q + 1)*(a + b*Log[c*x^n])^p)/x, x], x] - Dist[e/d, Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; F
reeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]

Rule 2390

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 2391

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 2393

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

Rule 2394

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

Rule 2397

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

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 6688

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1}{x}+\frac {2 \log (5-x)}{15+17 x-4 x^2}+\frac {4 \log ^2(5-x)}{(3+4 x)^2}+\frac {2 \log (x)}{(-5+x)^2 x}-\frac {2 \log ^2(x)}{(-5+x)^3}\right ) \, dx\\ &=\log (x)+2 \int \frac {\log (5-x)}{15+17 x-4 x^2} \, dx+2 \int \frac {\log (x)}{(-5+x)^2 x} \, dx-2 \int \frac {\log ^2(x)}{(-5+x)^3} \, dx+4 \int \frac {\log ^2(5-x)}{(3+4 x)^2} \, dx\\ &=-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {\log ^2(x)}{(5-x)^2}-\frac {8}{23} \int \frac {\log (5-x)}{3+4 x} \, dx+\frac {2}{5} \int \frac {\log (x)}{(-5+x)^2} \, dx-\frac {2}{5} \int \frac {\log (x)}{(-5+x) x} \, dx+2 \int \left (\frac {8 \log (5-x)}{23 (40-8 x)}+\frac {8 \log (5-x)}{23 (6+8 x)}\right ) \, dx-2 \int \frac {\log (x)}{(-5+x)^2 x} \, dx\\ &=-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {2 x \log (x)}{25 (5-x)}+\frac {\log ^2(x)}{(5-x)^2}-\frac {2}{23} \log (5-x) \log \left (\frac {1}{23} (3+4 x)\right )+\frac {2}{25} \int \frac {1}{-5+x} \, dx-\frac {2}{25} \int \frac {\log (x)}{-5+x} \, dx+\frac {2}{25} \int \frac {\log (x)}{x} \, dx-\frac {2}{23} \int \frac {\log \left (\frac {1}{23} (3+4 x)\right )}{5-x} \, dx-\frac {2}{5} \int \frac {\log (x)}{(-5+x)^2} \, dx+\frac {2}{5} \int \frac {\log (x)}{(-5+x) x} \, dx+\frac {16}{23} \int \frac {\log (5-x)}{40-8 x} \, dx+\frac {16}{23} \int \frac {\log (5-x)}{6+8 x} \, dx\\ &=\frac {2}{25} \log (5-x)-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}-\frac {2}{25} \log (5) \log (-5+x)+\log (x)+\frac {\log ^2(x)}{25}+\frac {\log ^2(x)}{(5-x)^2}-\frac {2}{25} \int \frac {1}{-5+x} \, dx-\frac {2}{25} \int \frac {\log \left (\frac {x}{5}\right )}{-5+x} \, dx+\frac {2}{25} \int \frac {\log (x)}{-5+x} \, dx-\frac {2}{25} \int \frac {\log (x)}{x} \, dx+\frac {2}{23} \int \frac {\log \left (\frac {1}{46} (6+8 x)\right )}{5-x} \, dx+\frac {2}{23} \operatorname {Subst}\left (\int \frac {\log \left (1-\frac {4 x}{23}\right )}{x} \, dx,x,5-x\right )-\frac {16}{23} \operatorname {Subst}\left (\int \frac {\log (x)}{8 x} \, dx,x,5-x\right )\\ &=-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {\log ^2(x)}{(5-x)^2}-\frac {2}{23} \text {Li}_2\left (\frac {4 (5-x)}{23}\right )+\frac {2}{25} \text {Li}_2\left (1-\frac {x}{5}\right )+\frac {2}{25} \int \frac {\log \left (\frac {x}{5}\right )}{-5+x} \, dx-\frac {2}{23} \operatorname {Subst}\left (\int \frac {\log \left (1-\frac {4 x}{23}\right )}{x} \, dx,x,5-x\right )-\frac {2}{23} \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,5-x\right )\\ &=-\frac {1}{23} \log ^2(5-x)-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {\log ^2(x)}{(5-x)^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 58, normalized size = 1.76 \begin {gather*} -\frac {\log ^2(5-x)}{3+4 x}+\log (x)+\frac {\log ^2(x)}{(-5+x)^2}-\frac {2}{23} \log \left (\frac {23}{4}\right ) \log (3+4 x)+\frac {2}{23} \log \left (\frac {23}{4}\right ) \log (6+8 x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-1125 - 2325*x - 335*x^2 + 849*x^3 - 216*x^4 + 16*x^5 + (-150*x - 140*x^2 + 74*x^3 - 8*x^4)*Log[5 -
 x] + (-500*x + 300*x^2 - 60*x^3 + 4*x^4)*Log[5 - x]^2 + (-90 - 222*x - 112*x^2 + 32*x^3)*Log[x] + (-18*x - 48
*x^2 - 32*x^3)*Log[x]^2)/(-1125*x - 2325*x^2 - 335*x^3 + 849*x^4 - 216*x^5 + 16*x^6),x]

[Out]

-(Log[5 - x]^2/(3 + 4*x)) + Log[x] + Log[x]^2/(-5 + x)^2 - (2*Log[23/4]*Log[3 + 4*x])/23 + (2*Log[23/4]*Log[6
+ 8*x])/23

________________________________________________________________________________________

fricas [B]  time = 0.85, size = 65, normalized size = 1.97 \begin {gather*} \frac {{\left (4 \, x + 3\right )} \log \relax (x)^{2} - {\left (x^{2} - 10 \, x + 25\right )} \log \left (-x + 5\right )^{2} + {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )} \log \relax (x)}{4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-32*x^3-48*x^2-18*x)*log(x)^2+(32*x^3-112*x^2-222*x-90)*log(x)+(4*x^4-60*x^3+300*x^2-500*x)*log(5-
x)^2+(-8*x^4+74*x^3-140*x^2-150*x)*log(5-x)+16*x^5-216*x^4+849*x^3-335*x^2-2325*x-1125)/(16*x^6-216*x^5+849*x^
4-335*x^3-2325*x^2-1125*x),x, algorithm="fricas")

[Out]

((4*x + 3)*log(x)^2 - (x^2 - 10*x + 25)*log(-x + 5)^2 + (4*x^3 - 37*x^2 + 70*x + 75)*log(x))/(4*x^3 - 37*x^2 +
 70*x + 75)

________________________________________________________________________________________

giac [A]  time = 0.16, size = 35, normalized size = 1.06 \begin {gather*} \frac {\log \relax (x)^{2}}{x^{2} - 10 \, x + 25} - \frac {\log \left (-x + 5\right )^{2}}{4 \, x + 3} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-32*x^3-48*x^2-18*x)*log(x)^2+(32*x^3-112*x^2-222*x-90)*log(x)+(4*x^4-60*x^3+300*x^2-500*x)*log(5-
x)^2+(-8*x^4+74*x^3-140*x^2-150*x)*log(5-x)+16*x^5-216*x^4+849*x^3-335*x^2-2325*x-1125)/(16*x^6-216*x^5+849*x^
4-335*x^3-2325*x^2-1125*x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 50, normalized size = 1.52




method result size



risch \(-\frac {\ln \left (5-x \right )^{2}}{3+4 x}+\frac {x^{2} \ln \relax (x )-10 x \ln \relax (x )+\ln \relax (x )^{2}+25 \ln \relax (x )}{x^{2}-10 x +25}\) \(50\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-32*x^3-48*x^2-18*x)*ln(x)^2+(32*x^3-112*x^2-222*x-90)*ln(x)+(4*x^4-60*x^3+300*x^2-500*x)*ln(5-x)^2+(-8*
x^4+74*x^3-140*x^2-150*x)*ln(5-x)+16*x^5-216*x^4+849*x^3-335*x^2-2325*x-1125)/(16*x^6-216*x^5+849*x^4-335*x^3-
2325*x^2-1125*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.44, size = 148, normalized size = 4.48 \begin {gather*} \frac {279841 \, {\left (4 \, x + 3\right )} \log \relax (x)^{2} - 279841 \, {\left (x^{2} - 10 \, x + 25\right )} \log \left (-x + 5\right )^{2} + 2275620 \, x^{2} + 135441 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )} \log \left (-x + 5\right ) - 14114985 \, x - 1828500}{279841 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )}} + \frac {15 \, {\left (1688 \, x^{2} - 24194 \, x + 86705\right )}}{24334 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )}} - \frac {2325 \, {\left (96 \, x^{2} - 684 \, x + 491\right )}}{24334 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )}} - \frac {135441}{279841} \, \log \left (x - 5\right ) + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-32*x^3-48*x^2-18*x)*log(x)^2+(32*x^3-112*x^2-222*x-90)*log(x)+(4*x^4-60*x^3+300*x^2-500*x)*log(5-
x)^2+(-8*x^4+74*x^3-140*x^2-150*x)*log(5-x)+16*x^5-216*x^4+849*x^3-335*x^2-2325*x-1125)/(16*x^6-216*x^5+849*x^
4-335*x^3-2325*x^2-1125*x),x, algorithm="maxima")

[Out]

1/279841*(279841*(4*x + 3)*log(x)^2 - 279841*(x^2 - 10*x + 25)*log(-x + 5)^2 + 2275620*x^2 + 135441*(4*x^3 - 3
7*x^2 + 70*x + 75)*log(-x + 5) - 14114985*x - 1828500)/(4*x^3 - 37*x^2 + 70*x + 75) + 15/24334*(1688*x^2 - 241
94*x + 86705)/(4*x^3 - 37*x^2 + 70*x + 75) - 2325/24334*(96*x^2 - 684*x + 491)/(4*x^3 - 37*x^2 + 70*x + 75) -
135441/279841*log(x - 5) + log(x)

________________________________________________________________________________________

mupad [B]  time = 4.32, size = 35, normalized size = 1.06 \begin {gather*} \ln \relax (x)+\frac {{\ln \relax (x)}^2}{x^2-10\,x+25}-\frac {{\ln \left (5-x\right )}^2}{4\,\left (x+\frac {3}{4}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2325*x + log(5 - x)^2*(500*x - 300*x^2 + 60*x^3 - 4*x^4) + log(x)^2*(18*x + 48*x^2 + 32*x^3) + 335*x^2 -
849*x^3 + 216*x^4 - 16*x^5 + log(5 - x)*(150*x + 140*x^2 - 74*x^3 + 8*x^4) + log(x)*(222*x + 112*x^2 - 32*x^3
+ 90) + 1125)/(1125*x + 2325*x^2 + 335*x^3 - 849*x^4 + 216*x^5 - 16*x^6),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.45, size = 27, normalized size = 0.82 \begin {gather*} \log {\relax (x )} + \frac {\log {\relax (x )}^{2}}{x^{2} - 10 x + 25} - \frac {\log {\left (5 - x \right )}^{2}}{4 x + 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-32*x**3-48*x**2-18*x)*ln(x)**2+(32*x**3-112*x**2-222*x-90)*ln(x)+(4*x**4-60*x**3+300*x**2-500*x)*
ln(5-x)**2+(-8*x**4+74*x**3-140*x**2-150*x)*ln(5-x)+16*x**5-216*x**4+849*x**3-335*x**2-2325*x-1125)/(16*x**6-2
16*x**5+849*x**4-335*x**3-2325*x**2-1125*x),x)

[Out]

log(x) + log(x)**2/(x**2 - 10*x + 25) - log(5 - x)**2/(4*x + 3)

________________________________________________________________________________________