3.1.80 \(\int \frac {69 x-141 x^2-135 x^3-315 x^4+135 x^5+(300-75 x-1800 x^3+450 x^4) \log (4-x)+(-38 x+2 x^2+(-160+40 x) \log (4-x)) \log (x)+(5 x+(20-5 x) \log (4-x)) \log ^2(x)}{-180 x^2+45 x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [C]  time = 4.08, antiderivative size = 148, normalized size of antiderivative = 4.48, number of steps used = 148, number of rules used = 39, integrand size = 105, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.371, Rules used = {1593, 6742, 1620, 14, 2414, 6688, 72, 2395, 36, 31, 29, 77, 2389, 2295, 43, 2351, 2316, 2315, 2304, 2370, 2411, 2314, 2301, 2376, 2392, 2391, 2375, 2317, 2374, 6589, 2353, 2296, 2371, 2302, 30, 2305, 2378, 2344, 2383} \begin {gather*} \frac {2}{9} \text {Li}_2\left (1-\frac {x}{4}\right )+\frac {2 \text {Li}_2\left (\frac {x}{4}\right )}{9}+x^3+5 x^2 \log (4-x)-3 x+\frac {\log ^2(x)}{45}+\frac {\log (4-x) \log ^2(x)}{9 x}-\frac {1}{18} \log (4) \log (4-x)-15 \log (4-x)-\frac {1}{6} \log (4) \log (x-4)+\frac {2}{9} \log (4-x) \log (x)-\frac {2}{9} \log (4) \log (x)-\frac {2 \log (x)}{15}+\frac {\log (4-x)}{x}-\frac {2 \log (4-x) \log (x)}{3 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(69*x - 141*x^2 - 135*x^3 - 315*x^4 + 135*x^5 + (300 - 75*x - 1800*x^3 + 450*x^4)*Log[4 - x] + (-38*x + 2*
x^2 + (-160 + 40*x)*Log[4 - x])*Log[x] + (5*x + (20 - 5*x)*Log[4 - x])*Log[x]^2)/(-180*x^2 + 45*x^3),x]

[Out]

-3*x + x^3 - 15*Log[4 - x] + Log[4 - x]/x + 5*x^2*Log[4 - x] - (Log[4]*Log[4 - x])/18 - (Log[4]*Log[-4 + x])/6
 - (2*Log[x])/15 - (2*Log[4]*Log[x])/9 + (2*Log[4 - x]*Log[x])/9 - (2*Log[4 - x]*Log[x])/(3*x) + Log[x]^2/45 +
 (Log[4 - x]*Log[x]^2)/(9*x) + (2*PolyLog[2, 1 - x/4])/9 + (2*PolyLog[2, x/4])/9

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 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 31

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

Rule 36

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

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 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

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 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

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 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, 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 2305

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

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 2317

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

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 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2370

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[Log[d*(e + f*x^m)^r], x]}, Dist[(a + b*Log[c*x^n])^p, u, x] - Dist[b*n*p, Int[Dist[(a + b*Log[c*x
^n])^(p - 1)/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && RationalQ[m] && (EqQ[
p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 1] && EqQ[m, 1] && EqQ[d*e, 1]))

Rule 2371

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[Log[d*(e + f*x^m)^r], u, x] - Dist[f*m*r, Int[Dist[x^(m - 1)/(e +
 f*x^m), u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && IntegerQ[m]

Rule 2374

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

Rule 2375

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

Rule 2376

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2378

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((g_.)*(x_))^(q_.),
 x_Symbol] :> With[{u = IntHide[(g*x)^q*(a + b*Log[c*x^n])^p, x]}, Dist[Log[d*(e + f*x^m)^r], u, x] - Dist[f*m
*r, Int[Dist[x^(m - 1)/(e + f*x^m), u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && IGtQ[p, 0
] && RationalQ[m] && RationalQ[q]

Rule 2383

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*PolyLog[k_, (e_.)*(x_)^(q_.)])/(x_), x_Symbol] :> Simp[(PolyL
og[k + 1, e*x^q]*(a + b*Log[c*x^n])^p)/q, x] - Dist[(b*n*p)/q, Int[(PolyLog[k + 1, e*x^q]*(a + b*Log[c*x^n])^(
p - 1))/x, x], x] /; FreeQ[{a, b, c, e, k, n, q}, x] && GtQ[p, 0]

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 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 2392

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 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 2411

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

Rule 2414

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*(x_)^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q_.), x_Symbol]
 :> With[{u = IntHide[x^m*(f + g*x^r)^q, x]}, Dist[a + b*Log[c*(d + e*x)^n], u, x] - Dist[b*e*n, Int[SimplifyI
ntegrand[u/(d + e*x), x], x], x] /; InverseFunctionFreeQ[u, x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, q, r}, x]
 && IntegerQ[m] && IntegerQ[q] && IntegerQ[r]

Rule 6589

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

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 {69 x-141 x^2-135 x^3-315 x^4+135 x^5+\left (300-75 x-1800 x^3+450 x^4\right ) \log (4-x)+\left (-38 x+2 x^2+(-160+40 x) \log (4-x)\right ) \log (x)+(5 x+(20-5 x) \log (4-x)) \log ^2(x)}{x^2 (-180+45 x)} \, dx\\ &=\int \left (\frac {23 x-47 x^2-45 x^3-105 x^4+45 x^5+100 \log (4-x)-25 x \log (4-x)-600 x^3 \log (4-x)+150 x^4 \log (4-x)}{15 (-4+x) x^2}+\frac {2 \left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{45 (-4+x) x^2}-\frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{9 (-4+x) x^2}\right ) \, dx\\ &=\frac {2}{45} \int \frac {\left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{(-4+x) x^2} \, dx+\frac {1}{15} \int \frac {23 x-47 x^2-45 x^3-105 x^4+45 x^5+100 \log (4-x)-25 x \log (4-x)-600 x^3 \log (4-x)+150 x^4 \log (4-x)}{(-4+x) x^2} \, dx-\frac {1}{9} \int \frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{(-4+x) x^2} \, dx\\ &=\frac {2}{45} \int \left (\frac {\left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{16 (-4+x)}-\frac {\left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{4 x^2}-\frac {\left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{16 x}\right ) \, dx+\frac {1}{15} \int \left (\frac {23-47 x-45 x^2-105 x^3+45 x^4}{(-4+x) x}+\frac {25 \left (-1+6 x^3\right ) \log (4-x)}{x^2}\right ) \, dx-\frac {1}{9} \int \left (\frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{16 (-4+x)}-\frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{4 x^2}-\frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{16 x}\right ) \, dx\\ &=\frac {1}{360} \int \frac {\left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{-4+x} \, dx-\frac {1}{360} \int \frac {\left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{x} \, dx-\frac {1}{144} \int \frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{-4+x} \, dx+\frac {1}{144} \int \frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{x} \, dx-\frac {1}{90} \int \frac {\left (-19 x+x^2-80 \log (4-x)+20 x \log (4-x)\right ) \log (x)}{x^2} \, dx+\frac {1}{36} \int \frac {(-x-4 \log (4-x)+x \log (4-x)) \log ^2(x)}{x^2} \, dx+\frac {1}{15} \int \frac {23-47 x-45 x^2-105 x^3+45 x^4}{(-4+x) x} \, dx+\frac {5}{3} \int \frac {\left (-1+6 x^3\right ) \log (4-x)}{x^2} \, dx\\ &=\frac {5 \log (4-x)}{3 x}+5 x^2 \log (4-x)+\frac {1}{360} \int \left (\frac {(-19+x) x}{-4+x}+20 \log (4-x)\right ) \log (x) \, dx-\frac {1}{360} \int \frac {((-19+x) x+20 (-4+x) \log (4-x)) \log (x)}{x} \, dx-\frac {1}{144} \int \left (-\frac {x}{-4+x}+\log (4-x)\right ) \log ^2(x) \, dx+\frac {1}{144} \int \frac {(-x+(-4+x) \log (4-x)) \log ^2(x)}{x} \, dx-\frac {1}{90} \int \frac {((-19+x) x+20 (-4+x) \log (4-x)) \log (x)}{x^2} \, dx+\frac {1}{36} \int \frac {(-x+(-4+x) \log (4-x)) \log ^2(x)}{x^2} \, dx+\frac {1}{15} \int \left (255+\frac {3915}{4 (-4+x)}-\frac {23}{4 x}+75 x+45 x^2\right ) \, dx+\frac {5}{3} \int \frac {1+3 x^3}{(4-x) x} \, dx\\ &=17 x+\frac {5 x^2}{2}+x^3+\frac {261}{4} \log (4-x)+\frac {5 \log (4-x)}{3 x}+5 x^2 \log (4-x)-\frac {23 \log (x)}{60}+\frac {1}{360} \int \left (-\frac {19 x \log (x)}{-4+x}+\frac {x^2 \log (x)}{-4+x}+20 \log (4-x) \log (x)\right ) \, dx-\frac {1}{360} \int \left (-19 \log (x)+x \log (x)+20 \log (4-x) \log (x)-\frac {80 \log (4-x) \log (x)}{x}\right ) \, dx-\frac {1}{144} \int \left (-\frac {x \log ^2(x)}{-4+x}+\log (4-x) \log ^2(x)\right ) \, dx+\frac {1}{144} \int \left (-\log ^2(x)+\log (4-x) \log ^2(x)-\frac {4 \log (4-x) \log ^2(x)}{x}\right ) \, dx-\frac {1}{90} \int \left (\log (x)-\frac {19 \log (x)}{x}-\frac {80 \log (4-x) \log (x)}{x^2}+\frac {20 \log (4-x) \log (x)}{x}\right ) \, dx+\frac {1}{36} \int \left (-\frac {\log ^2(x)}{x}-\frac {4 \log (4-x) \log ^2(x)}{x^2}+\frac {\log (4-x) \log ^2(x)}{x}\right ) \, dx+\frac {5}{3} \int \left (-12-\frac {193}{4 (-4+x)}+\frac {1}{4 x}-3 x\right ) \, dx\\ &=-3 x+x^3-\frac {91}{6} \log (4-x)+\frac {5 \log (4-x)}{3 x}+5 x^2 \log (4-x)+\frac {\log (x)}{30}-\frac {1}{360} \int x \log (x) \, dx+\frac {1}{360} \int \frac {x^2 \log (x)}{-4+x} \, dx-\frac {1}{144} \int \log ^2(x) \, dx+\frac {1}{144} \int \frac {x \log ^2(x)}{-4+x} \, dx-\frac {1}{90} \int \log (x) \, dx-\frac {1}{36} \int \frac {\log ^2(x)}{x} \, dx+\frac {19}{360} \int \log (x) \, dx-\frac {19}{360} \int \frac {x \log (x)}{-4+x} \, dx-\frac {1}{9} \int \frac {\log (4-x) \log ^2(x)}{x^2} \, dx+\frac {19}{90} \int \frac {\log (x)}{x} \, dx+\frac {8}{9} \int \frac {\log (4-x) \log (x)}{x^2} \, dx\\ &=-\frac {73 x}{24}+\frac {x^2}{1440}+x^3-\frac {91}{6} \log (4-x)+\frac {17 \log (4-x)}{9 x}+5 x^2 \log (4-x)+\frac {\log (x)}{30}+\frac {1}{24} x \log (x)-\frac {1}{720} x^2 \log (x)+\frac {2}{9} \log (4-x) \log (x)-\frac {2 \log (4-x) \log (x)}{3 x}-\frac {7 \log ^2(x)}{60}-\frac {1}{144} x \log ^2(x)+\frac {\log (4-x) \log ^2(x)}{9 x}+\frac {1}{360} \int \left (4 \log (x)+\frac {16 \log (x)}{-4+x}+x \log (x)\right ) \, dx+\frac {1}{144} \int \left (\log ^2(x)+\frac {4 \log ^2(x)}{-4+x}\right ) \, dx+\frac {1}{72} \int \log (x) \, dx-\frac {1}{36} \operatorname {Subst}\left (\int x^2 \, dx,x,\log (x)\right )-\frac {19}{360} \int \left (\log (x)+\frac {4 \log (x)}{-4+x}\right ) \, dx-\frac {1}{9} \int \left (-\frac {2}{(4-x) x}-\frac {2 \log (x)}{(4-x) x}-\frac {\log ^2(x)}{(4-x) x}\right ) \, dx-\frac {8}{9} \int \left (-\frac {\log (4-x)}{x^2}+\frac {\log (4-x)}{4 x}-\frac {\log (x)}{4 x}\right ) \, dx\\ &=-\frac {55 x}{18}+\frac {x^2}{1440}+x^3-\frac {91}{6} \log (4-x)+\frac {17 \log (4-x)}{9 x}+5 x^2 \log (4-x)+\frac {\log (x)}{30}+\frac {1}{18} x \log (x)-\frac {1}{720} x^2 \log (x)+\frac {2}{9} \log (4-x) \log (x)-\frac {2 \log (4-x) \log (x)}{3 x}-\frac {7 \log ^2(x)}{60}-\frac {1}{144} x \log ^2(x)+\frac {\log (4-x) \log ^2(x)}{9 x}-\frac {\log ^3(x)}{108}+\frac {1}{360} \int x \log (x) \, dx+\frac {1}{144} \int \log ^2(x) \, dx+\frac {1}{90} \int \log (x) \, dx+\frac {1}{36} \int \frac {\log ^2(x)}{-4+x} \, dx+\frac {2}{45} \int \frac {\log (x)}{-4+x} \, dx-\frac {19}{360} \int \log (x) \, dx+\frac {1}{9} \int \frac {\log ^2(x)}{(4-x) x} \, dx-\frac {19}{90} \int \frac {\log (x)}{-4+x} \, dx+\frac {2}{9} \int \frac {1}{(4-x) x} \, dx-\frac {2}{9} \int \frac {\log (4-x)}{x} \, dx+\frac {2}{9} \int \frac {\log (x)}{x} \, dx+\frac {2}{9} \int \frac {\log (x)}{(4-x) x} \, dx+\frac {8}{9} \int \frac {\log (4-x)}{x^2} \, dx\\ &=-\frac {217 x}{72}+x^3-\frac {91}{6} \log (4-x)+\frac {\log (4-x)}{x}+5 x^2 \log (4-x)-\frac {1}{6} \log (4) \log (-4+x)+\frac {\log (x)}{30}+\frac {1}{72} x \log (x)-\frac {2}{9} \log (4) \log (x)+\frac {2}{9} \log (4-x) \log (x)-\frac {2 \log (4-x) \log (x)}{3 x}-\frac {\log ^2(x)}{180}+\frac {\log (4-x) \log ^2(x)}{9 x}+\frac {1}{36} \log \left (1-\frac {x}{4}\right ) \log ^2(x)-\frac {\log ^3(x)}{108}-\frac {1}{72} \int \log (x) \, dx+\frac {1}{36} \int \frac {\log ^2(x)}{4-x} \, dx+\frac {1}{36} \int \frac {\log ^2(x)}{x} \, dx+\frac {2}{45} \int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx+\frac {1}{18} \int \frac {1}{4-x} \, dx+\frac {1}{18} \int \frac {1}{x} \, dx+\frac {1}{18} \int \frac {\log (x)}{4-x} \, dx+\frac {1}{18} \int \frac {\log (x)}{x} \, dx-\frac {1}{18} \int \frac {\log \left (1-\frac {x}{4}\right ) \log (x)}{x} \, dx-\frac {19}{90} \int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx-\frac {2}{9} \int \frac {\log \left (1-\frac {x}{4}\right )}{x} \, dx-\frac {8}{9} \int \frac {1}{(4-x) x} \, dx\\ &=-3 x+x^3-\frac {137}{9} \log (4-x)+\frac {\log (4-x)}{x}+5 x^2 \log (4-x)-\frac {1}{18} \log (4) \log (4-x)-\frac {1}{6} \log (4) \log (-4+x)+\frac {4 \log (x)}{45}-\frac {2}{9} \log (4) \log (x)+\frac {2}{9} \log (4-x) \log (x)-\frac {2 \log (4-x) \log (x)}{3 x}+\frac {\log ^2(x)}{45}+\frac {\log (4-x) \log ^2(x)}{9 x}-\frac {\log ^3(x)}{108}+\frac {1}{6} \text {Li}_2\left (1-\frac {x}{4}\right )+\frac {2 \text {Li}_2\left (\frac {x}{4}\right )}{9}+\frac {1}{18} \log (x) \text {Li}_2\left (\frac {x}{4}\right )+\frac {1}{36} \operatorname {Subst}\left (\int x^2 \, dx,x,\log (x)\right )+\frac {1}{18} \int \frac {\log \left (\frac {x}{4}\right )}{4-x} \, dx+\frac {1}{18} \int \frac {\log \left (1-\frac {x}{4}\right ) \log (x)}{x} \, dx-\frac {1}{18} \int \frac {\text {Li}_2\left (\frac {x}{4}\right )}{x} \, dx-\frac {2}{9} \int \frac {1}{4-x} \, dx-\frac {2}{9} \int \frac {1}{x} \, dx\\ &=-3 x+x^3-15 \log (4-x)+\frac {\log (4-x)}{x}+5 x^2 \log (4-x)-\frac {1}{18} \log (4) \log (4-x)-\frac {1}{6} \log (4) \log (-4+x)-\frac {2 \log (x)}{15}-\frac {2}{9} \log (4) \log (x)+\frac {2}{9} \log (4-x) \log (x)-\frac {2 \log (4-x) \log (x)}{3 x}+\frac {\log ^2(x)}{45}+\frac {\log (4-x) \log ^2(x)}{9 x}+\frac {2}{9} \text {Li}_2\left (1-\frac {x}{4}\right )+\frac {2 \text {Li}_2\left (\frac {x}{4}\right )}{9}-\frac {\text {Li}_3\left (\frac {x}{4}\right )}{18}+\frac {1}{18} \int \frac {\text {Li}_2\left (\frac {x}{4}\right )}{x} \, dx\\ &=-3 x+x^3-15 \log (4-x)+\frac {\log (4-x)}{x}+5 x^2 \log (4-x)-\frac {1}{18} \log (4) \log (4-x)-\frac {1}{6} \log (4) \log (-4+x)-\frac {2 \log (x)}{15}-\frac {2}{9} \log (4) \log (x)+\frac {2}{9} \log (4-x) \log (x)-\frac {2 \log (4-x) \log (x)}{3 x}+\frac {\log ^2(x)}{45}+\frac {\log (4-x) \log ^2(x)}{9 x}+\frac {2}{9} \text {Li}_2\left (1-\frac {x}{4}\right )+\frac {2 \text {Li}_2\left (\frac {x}{4}\right )}{9}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.20, size = 50, normalized size = 1.52 \begin {gather*} \frac {1}{45} \left (45 x \left (-3+x^2\right )-6 \log (x)+\log ^2(x)+\frac {5 \log (4-x) \left (9-135 x+45 x^3-6 \log (x)+\log ^2(x)\right )}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(69*x - 141*x^2 - 135*x^3 - 315*x^4 + 135*x^5 + (300 - 75*x - 1800*x^3 + 450*x^4)*Log[4 - x] + (-38*
x + 2*x^2 + (-160 + 40*x)*Log[4 - x])*Log[x] + (5*x + (20 - 5*x)*Log[4 - x])*Log[x]^2)/(-180*x^2 + 45*x^3),x]

[Out]

(45*x*(-3 + x^2) - 6*Log[x] + Log[x]^2 + (5*Log[4 - x]*(9 - 135*x + 45*x^3 - 6*Log[x] + Log[x]^2))/x)/45

________________________________________________________________________________________

fricas [B]  time = 0.64, size = 63, normalized size = 1.91 \begin {gather*} \frac {45 \, x^{4} + {\left (x + 5 \, \log \left (-x + 4\right )\right )} \log \relax (x)^{2} - 135 \, x^{2} - 6 \, {\left (x + 5 \, \log \left (-x + 4\right )\right )} \log \relax (x) + 45 \, {\left (5 \, x^{3} - 15 \, x + 1\right )} \log \left (-x + 4\right )}{45 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-5*x+20)*log(-x+4)+5*x)*log(x)^2+((40*x-160)*log(-x+4)+2*x^2-38*x)*log(x)+(450*x^4-1800*x^3-75*x+
300)*log(-x+4)+135*x^5-315*x^4-135*x^3-141*x^2+69*x)/(45*x^3-180*x^2),x, algorithm="fricas")

[Out]

1/45*(45*x^4 + (x + 5*log(-x + 4))*log(x)^2 - 135*x^2 - 6*(x + 5*log(-x + 4))*log(x) + 45*(5*x^3 - 15*x + 1)*l
og(-x + 4))/x

________________________________________________________________________________________

giac [A]  time = 0.33, size = 57, normalized size = 1.73 \begin {gather*} x^{3} + \frac {1}{45} \, \log \relax (x)^{2} + \frac {1}{9} \, {\left (45 \, x^{2} + \frac {\log \relax (x)^{2}}{x} - \frac {6 \, \log \relax (x)}{x} + \frac {9}{x}\right )} \log \left (-x + 4\right ) - 3 \, x - 15 \, \log \left (x - 4\right ) - \frac {2}{15} \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-5*x+20)*log(-x+4)+5*x)*log(x)^2+((40*x-160)*log(-x+4)+2*x^2-38*x)*log(x)+(450*x^4-1800*x^3-75*x+
300)*log(-x+4)+135*x^5-315*x^4-135*x^3-141*x^2+69*x)/(45*x^3-180*x^2),x, algorithm="giac")

[Out]

x^3 + 1/45*log(x)^2 + 1/9*(45*x^2 + log(x)^2/x - 6*log(x)/x + 9/x)*log(-x + 4) - 3*x - 15*log(x - 4) - 2/15*lo
g(x)

________________________________________________________________________________________

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




method result size



risch \(\frac {\left (45 x^{3}+\ln \relax (x )^{2}-6 \ln \relax (x )+9\right ) \ln \left (-x +4\right )}{9 x}+\frac {\ln \relax (x )^{2}}{45}+x^{3}-3 x -\frac {2 \ln \relax (x )}{15}-15 \ln \left (x -4\right )\) \(50\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((-5*x+20)*ln(-x+4)+5*x)*ln(x)^2+((40*x-160)*ln(-x+4)+2*x^2-38*x)*ln(x)+(450*x^4-1800*x^3-75*x+300)*ln(-x
+4)+135*x^5-315*x^4-135*x^3-141*x^2+69*x)/(45*x^3-180*x^2),x,method=_RETURNVERBOSE)

[Out]

1/9*(45*x^3+ln(x)^2-6*ln(x)+9)/x*ln(-x+4)+1/45*ln(x)^2+x^3-3*x-2/15*ln(x)-15*ln(x-4)

________________________________________________________________________________________

maxima [A]  time = 0.81, size = 53, normalized size = 1.61 \begin {gather*} \frac {45 \, x^{4} + x \log \relax (x)^{2} - 135 \, x^{2} - 6 \, x \log \relax (x) + 5 \, {\left (45 \, x^{3} + \log \relax (x)^{2} - 135 \, x - 6 \, \log \relax (x) + 9\right )} \log \left (-x + 4\right )}{45 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-5*x+20)*log(-x+4)+5*x)*log(x)^2+((40*x-160)*log(-x+4)+2*x^2-38*x)*log(x)+(450*x^4-1800*x^3-75*x+
300)*log(-x+4)+135*x^5-315*x^4-135*x^3-141*x^2+69*x)/(45*x^3-180*x^2),x, algorithm="maxima")

[Out]

1/45*(45*x^4 + x*log(x)^2 - 135*x^2 - 6*x*log(x) + 5*(45*x^3 + log(x)^2 - 135*x - 6*log(x) + 9)*log(-x + 4))/x

________________________________________________________________________________________

mupad [B]  time = 0.61, size = 72, normalized size = 2.18 \begin {gather*} \frac {{\ln \relax (x)}^2}{45}-15\,\ln \left (x-4\right )-\frac {2\,\ln \relax (x)}{15}-3\,x+x^3+\frac {\ln \left (4-x\right )}{x}+5\,x^2\,\ln \left (4-x\right )+\frac {\ln \left (4-x\right )\,{\ln \relax (x)}^2}{9\,x}-\frac {2\,\ln \left (4-x\right )\,\ln \relax (x)}{3\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(69*x + log(x)^2*(5*x - log(4 - x)*(5*x - 20)) - log(4 - x)*(75*x + 1800*x^3 - 450*x^4 - 300) - 141*x^2 -
 135*x^3 - 315*x^4 + 135*x^5 + log(x)*(log(4 - x)*(40*x - 160) - 38*x + 2*x^2))/(180*x^2 - 45*x^3),x)

[Out]

log(x)^2/45 - 15*log(x - 4) - (2*log(x))/15 - 3*x + x^3 + log(4 - x)/x + 5*x^2*log(4 - x) + (log(4 - x)*log(x)
^2)/(9*x) - (2*log(4 - x)*log(x))/(3*x)

________________________________________________________________________________________

sympy [B]  time = 2.96, size = 51, normalized size = 1.55 \begin {gather*} x^{3} - 3 x + \frac {\log {\relax (x )}^{2}}{45} - \frac {2 \log {\relax (x )}}{15} - 15 \log {\left (x - 4 \right )} + \frac {\left (45 x^{3} + \log {\relax (x )}^{2} - 6 \log {\relax (x )} + 9\right ) \log {\left (4 - x \right )}}{9 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((-5*x+20)*ln(-x+4)+5*x)*ln(x)**2+((40*x-160)*ln(-x+4)+2*x**2-38*x)*ln(x)+(450*x**4-1800*x**3-75*x+
300)*ln(-x+4)+135*x**5-315*x**4-135*x**3-141*x**2+69*x)/(45*x**3-180*x**2),x)

[Out]

x**3 - 3*x + log(x)**2/45 - 2*log(x)/15 - 15*log(x - 4) + (45*x**3 + log(x)**2 - 6*log(x) + 9)*log(4 - x)/(9*x
)

________________________________________________________________________________________