3.76.74 \(\int \frac {-4 x^3-18 x^4-8 x^5-x^6+(4 x+66 x^2+40 x^3+6 x^4) \log (4+x)+(-48-32 x-5 x^2) \log ^2(4+x)}{4 x^7+x^8} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 1.31, antiderivative size = 81, normalized size of antiderivative = 3.86, number of steps used = 75, number of rules used = 22, integrand size = 74, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.297, Rules used = {1593, 6742, 1620, 2418, 2395, 44, 36, 29, 31, 2392, 2391, 2390, 2301, 2416, 2398, 2411, 2347, 2344, 2316, 2315, 2314, 2319} \begin {gather*} \frac {2 \log ^2(x+4)}{x^6}+\frac {\log ^2(x+4)}{x^5}-\frac {4 \log (x+4)}{x^4}-\frac {2 \log (x+4)}{x^3}+\frac {2}{x^2}+\frac {1}{x}-\frac {(x+4) \log (x+4)}{1024 x}+\frac {\log (x+4)}{256 x}+\frac {\log (x+4)}{1024} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-4*x^3 - 18*x^4 - 8*x^5 - x^6 + (4*x + 66*x^2 + 40*x^3 + 6*x^4)*Log[4 + x] + (-48 - 32*x - 5*x^2)*Log[4 +
 x]^2)/(4*x^7 + x^8),x]

[Out]

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

Rule 29

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

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 44

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

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

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((
f + g*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(g*(q + 1)), x] - Dist[(b*e*n*p)/(g*(q + 1)), Int[((f + g*x)^(q
 + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*
f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && IntegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && 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 2416

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 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 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^3-18 x^4-8 x^5-x^6+\left (4 x+66 x^2+40 x^3+6 x^4\right ) \log (4+x)+\left (-48-32 x-5 x^2\right ) \log ^2(4+x)}{x^7 (4+x)} \, dx\\ &=\int \left (\frac {-4-18 x-8 x^2-x^3}{x^4 (4+x)}+\frac {2 \left (2+33 x+20 x^2+3 x^3\right ) \log (4+x)}{x^6 (4+x)}-\frac {(12+5 x) \log ^2(4+x)}{x^7}\right ) \, dx\\ &=2 \int \frac {\left (2+33 x+20 x^2+3 x^3\right ) \log (4+x)}{x^6 (4+x)} \, dx+\int \frac {-4-18 x-8 x^2-x^3}{x^4 (4+x)} \, dx-\int \frac {(12+5 x) \log ^2(4+x)}{x^7} \, dx\\ &=2 \int \left (\frac {\log (4+x)}{2 x^6}+\frac {65 \log (4+x)}{8 x^5}+\frac {95 \log (4+x)}{32 x^4}+\frac {\log (4+x)}{128 x^3}-\frac {\log (4+x)}{512 x^2}+\frac {\log (4+x)}{2048 x}-\frac {\log (4+x)}{2048 (4+x)}\right ) \, dx+\int \left (-\frac {1}{x^4}-\frac {17}{4 x^3}-\frac {15}{16 x^2}-\frac {1}{64 x}+\frac {1}{64 (4+x)}\right ) \, dx-\int \left (\frac {12 \log ^2(4+x)}{x^7}+\frac {5 \log ^2(4+x)}{x^6}\right ) \, dx\\ &=\frac {1}{3 x^3}+\frac {17}{8 x^2}+\frac {15}{16 x}-\frac {\log (x)}{64}+\frac {1}{64} \log (4+x)+\frac {\int \frac {\log (4+x)}{x} \, dx}{1024}-\frac {\int \frac {\log (4+x)}{4+x} \, dx}{1024}-\frac {1}{256} \int \frac {\log (4+x)}{x^2} \, dx+\frac {1}{64} \int \frac {\log (4+x)}{x^3} \, dx-5 \int \frac {\log ^2(4+x)}{x^6} \, dx+\frac {95}{16} \int \frac {\log (4+x)}{x^4} \, dx-12 \int \frac {\log ^2(4+x)}{x^7} \, dx+\frac {65}{4} \int \frac {\log (4+x)}{x^5} \, dx+\int \frac {\log (4+x)}{x^6} \, dx\\ &=\frac {1}{3 x^3}+\frac {17}{8 x^2}+\frac {15}{16 x}-\frac {\log (x)}{64}+\frac {\log (4) \log (x)}{1024}+\frac {1}{64} \log (4+x)-\frac {\log (4+x)}{5 x^5}-\frac {65 \log (4+x)}{16 x^4}-\frac {95 \log (4+x)}{48 x^3}-\frac {\log (4+x)}{128 x^2}+\frac {\log (4+x)}{256 x}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}+\frac {\int \frac {\log \left (1+\frac {x}{4}\right )}{x} \, dx}{1024}-\frac {\operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,4+x\right )}{1024}-\frac {1}{256} \int \frac {1}{x (4+x)} \, dx+\frac {1}{128} \int \frac {1}{x^2 (4+x)} \, dx+\frac {1}{5} \int \frac {1}{x^5 (4+x)} \, dx+\frac {95}{48} \int \frac {1}{x^3 (4+x)} \, dx-2 \int \frac {\log (4+x)}{x^5 (4+x)} \, dx-4 \int \frac {\log (4+x)}{x^6 (4+x)} \, dx+\frac {65}{16} \int \frac {1}{x^4 (4+x)} \, dx\\ &=\frac {1}{3 x^3}+\frac {17}{8 x^2}+\frac {15}{16 x}-\frac {\log (x)}{64}+\frac {\log (4) \log (x)}{1024}+\frac {1}{64} \log (4+x)-\frac {\log (4+x)}{5 x^5}-\frac {65 \log (4+x)}{16 x^4}-\frac {95 \log (4+x)}{48 x^3}-\frac {\log (4+x)}{128 x^2}+\frac {\log (4+x)}{256 x}-\frac {\log ^2(4+x)}{2048}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}-\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}-\frac {\int \frac {1}{x} \, dx}{1024}+\frac {\int \frac {1}{4+x} \, dx}{1024}+\frac {1}{128} \int \left (\frac {1}{4 x^2}-\frac {1}{16 x}+\frac {1}{16 (4+x)}\right ) \, dx+\frac {1}{5} \int \left (\frac {1}{4 x^5}-\frac {1}{16 x^4}+\frac {1}{64 x^3}-\frac {1}{256 x^2}+\frac {1}{1024 x}-\frac {1}{1024 (4+x)}\right ) \, dx+\frac {95}{48} \int \left (\frac {1}{4 x^3}-\frac {1}{16 x^2}+\frac {1}{64 x}-\frac {1}{64 (4+x)}\right ) \, dx-2 \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^5 x} \, dx,x,4+x\right )-4 \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^6 x} \, dx,x,4+x\right )+\frac {65}{16} \int \left (\frac {1}{4 x^4}-\frac {1}{16 x^3}+\frac {1}{64 x^2}-\frac {1}{256 x}+\frac {1}{256 (4+x)}\right ) \, dx\\ &=-\frac {1}{80 x^4}-\frac {1}{960 x^3}+\frac {15383}{7680 x^2}+\frac {15307}{15360 x}-\frac {113 \log (x)}{61440}+\frac {\log (4) \log (x)}{1024}+\frac {113 \log (4+x)}{61440}-\frac {\log (4+x)}{5 x^5}-\frac {65 \log (4+x)}{16 x^4}-\frac {95 \log (4+x)}{48 x^3}-\frac {\log (4+x)}{128 x^2}+\frac {\log (4+x)}{256 x}-\frac {\log ^2(4+x)}{2048}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}-\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^5} \, dx,x,4+x\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^4 x} \, dx,x,4+x\right )-\operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^6} \, dx,x,4+x\right )+\operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^5 x} \, dx,x,4+x\right )\\ &=-\frac {1}{80 x^4}-\frac {1}{960 x^3}+\frac {15383}{7680 x^2}+\frac {15307}{15360 x}-\frac {113 \log (x)}{61440}+\frac {\log (4) \log (x)}{1024}+\frac {113 \log (4+x)}{61440}-\frac {63 \log (4+x)}{16 x^4}-\frac {95 \log (4+x)}{48 x^3}-\frac {\log (4+x)}{128 x^2}+\frac {\log (4+x)}{256 x}-\frac {\log ^2(4+x)}{2048}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}-\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}-\frac {1}{8} \operatorname {Subst}\left (\int \frac {1}{(-4+x)^4 x} \, dx,x,4+x\right )+\frac {1}{8} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^4} \, dx,x,4+x\right )-\frac {1}{8} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^3 x} \, dx,x,4+x\right )-\frac {1}{5} \operatorname {Subst}\left (\int \frac {1}{(-4+x)^5 x} \, dx,x,4+x\right )+\frac {1}{4} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^5} \, dx,x,4+x\right )-\frac {1}{4} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^4 x} \, dx,x,4+x\right )\\ &=-\frac {1}{80 x^4}-\frac {1}{960 x^3}+\frac {15383}{7680 x^2}+\frac {15307}{15360 x}-\frac {113 \log (x)}{61440}+\frac {\log (4) \log (x)}{1024}+\frac {113 \log (4+x)}{61440}-\frac {4 \log (4+x)}{x^4}-\frac {97 \log (4+x)}{48 x^3}-\frac {\log (4+x)}{128 x^2}+\frac {\log (4+x)}{256 x}-\frac {\log ^2(4+x)}{2048}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}-\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}-\frac {1}{32} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^3} \, dx,x,4+x\right )+\frac {1}{32} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^2 x} \, dx,x,4+x\right )+\frac {1}{24} \operatorname {Subst}\left (\int \frac {1}{(-4+x)^3 x} \, dx,x,4+x\right )+\frac {1}{16} \operatorname {Subst}\left (\int \frac {1}{(-4+x)^4 x} \, dx,x,4+x\right )-\frac {1}{16} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^4} \, dx,x,4+x\right )+\frac {1}{16} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^3 x} \, dx,x,4+x\right )-\frac {1}{8} \operatorname {Subst}\left (\int \left (\frac {1}{4 (-4+x)^4}-\frac {1}{16 (-4+x)^3}+\frac {1}{64 (-4+x)^2}-\frac {1}{256 (-4+x)}+\frac {1}{256 x}\right ) \, dx,x,4+x\right )-\frac {1}{5} \operatorname {Subst}\left (\int \left (\frac {1}{4 (-4+x)^5}-\frac {1}{16 (-4+x)^4}+\frac {1}{64 (-4+x)^3}-\frac {1}{256 (-4+x)^2}+\frac {1}{1024 (-4+x)}-\frac {1}{1024 x}\right ) \, dx,x,4+x\right )\\ &=\frac {1}{192 x^3}+\frac {3073}{1536 x^2}+\frac {3065}{3072 x}-\frac {19 \log (x)}{12288}+\frac {\log (4) \log (x)}{1024}+\frac {19 \log (4+x)}{12288}-\frac {4 \log (4+x)}{x^4}-\frac {2 \log (4+x)}{x^3}+\frac {\log (4+x)}{128 x^2}+\frac {\log (4+x)}{256 x}-\frac {\log ^2(4+x)}{2048}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}-\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}+\frac {1}{128} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^2} \, dx,x,4+x\right )-\frac {1}{128} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x) x} \, dx,x,4+x\right )-\frac {1}{64} \operatorname {Subst}\left (\int \frac {1}{(-4+x)^2 x} \, dx,x,4+x\right )+\frac {1}{64} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^3} \, dx,x,4+x\right )-\frac {1}{64} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^2 x} \, dx,x,4+x\right )-\frac {1}{48} \operatorname {Subst}\left (\int \frac {1}{(-4+x)^3 x} \, dx,x,4+x\right )+\frac {1}{24} \operatorname {Subst}\left (\int \left (\frac {1}{4 (-4+x)^3}-\frac {1}{16 (-4+x)^2}+\frac {1}{64 (-4+x)}-\frac {1}{64 x}\right ) \, dx,x,4+x\right )+\frac {1}{16} \operatorname {Subst}\left (\int \left (\frac {1}{4 (-4+x)^4}-\frac {1}{16 (-4+x)^3}+\frac {1}{64 (-4+x)^2}-\frac {1}{256 (-4+x)}+\frac {1}{256 x}\right ) \, dx,x,4+x\right )\\ &=\frac {767}{384 x^2}+\frac {1535}{1536 x}-\frac {7 \log (x)}{6144}+\frac {\log (4) \log (x)}{1024}+\frac {7 \log (4+x)}{6144}-\frac {4 \log (4+x)}{x^4}-\frac {2 \log (4+x)}{x^3}+\frac {\log (4+x)}{256 x}-\frac {(4+x) \log (4+x)}{512 x}-\frac {\log ^2(4+x)}{2048}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}-\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}+\frac {1}{512} \operatorname {Subst}\left (\int \frac {1}{-4+x} \, dx,x,4+x\right )-\frac {1}{512} \operatorname {Subst}\left (\int \frac {\log (x)}{-4+x} \, dx,x,4+x\right )+\frac {1}{512} \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,4+x\right )-\frac {1}{256} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x)^2} \, dx,x,4+x\right )+\frac {1}{256} \operatorname {Subst}\left (\int \frac {\log (x)}{(-4+x) x} \, dx,x,4+x\right )+\frac {1}{128} \operatorname {Subst}\left (\int \frac {1}{(-4+x)^2 x} \, dx,x,4+x\right )-\frac {1}{64} \operatorname {Subst}\left (\int \left (\frac {1}{4 (-4+x)^2}-\frac {1}{16 (-4+x)}+\frac {1}{16 x}\right ) \, dx,x,4+x\right )-\frac {1}{48} \operatorname {Subst}\left (\int \left (\frac {1}{4 (-4+x)^3}-\frac {1}{16 (-4+x)^2}+\frac {1}{64 (-4+x)}-\frac {1}{64 x}\right ) \, dx,x,4+x\right )\\ &=\frac {2}{x^2}+\frac {513}{512 x}+\frac {3 \log (x)}{2048}-\frac {\log (4) \log (x)}{1024}+\frac {\log (4+x)}{2048}-\frac {4 \log (4+x)}{x^4}-\frac {2 \log (4+x)}{x^3}+\frac {\log (4+x)}{256 x}-\frac {(4+x) \log (4+x)}{1024 x}+\frac {\log ^2(4+x)}{2048}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}-\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}-\frac {\operatorname {Subst}\left (\int \frac {1}{-4+x} \, dx,x,4+x\right )}{1024}+\frac {\operatorname {Subst}\left (\int \frac {\log (x)}{-4+x} \, dx,x,4+x\right )}{1024}-\frac {\operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,4+x\right )}{1024}-\frac {1}{512} \operatorname {Subst}\left (\int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx,x,4+x\right )+\frac {1}{128} \operatorname {Subst}\left (\int \left (\frac {1}{4 (-4+x)^2}-\frac {1}{16 (-4+x)}+\frac {1}{16 x}\right ) \, dx,x,4+x\right )\\ &=\frac {2}{x^2}+\frac {1}{x}+\frac {\log (4+x)}{1024}-\frac {4 \log (4+x)}{x^4}-\frac {2 \log (4+x)}{x^3}+\frac {\log (4+x)}{256 x}-\frac {(4+x) \log (4+x)}{1024 x}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}+\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{1024}+\frac {\operatorname {Subst}\left (\int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx,x,4+x\right )}{1024}\\ &=\frac {2}{x^2}+\frac {1}{x}+\frac {\log (4+x)}{1024}-\frac {4 \log (4+x)}{x^4}-\frac {2 \log (4+x)}{x^3}+\frac {\log (4+x)}{256 x}-\frac {(4+x) \log (4+x)}{1024 x}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.29, size = 48, normalized size = 2.29 \begin {gather*} \frac {2}{x^2}+\frac {1}{x}-\frac {4 \log (4+x)}{x^4}-\frac {2 \log (4+x)}{x^3}+\frac {2 \log ^2(4+x)}{x^6}+\frac {\log ^2(4+x)}{x^5} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-4*x^3 - 18*x^4 - 8*x^5 - x^6 + (4*x + 66*x^2 + 40*x^3 + 6*x^4)*Log[4 + x] + (-48 - 32*x - 5*x^2)*L
og[4 + x]^2)/(4*x^7 + x^8),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 38, normalized size = 1.81 \begin {gather*} \frac {x^{5} + 2 \, x^{4} + {\left (x + 2\right )} \log \left (x + 4\right )^{2} - 2 \, {\left (x^{3} + 2 \, x^{2}\right )} \log \left (x + 4\right )}{x^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x^2-32*x-48)*log(4+x)^2+(6*x^4+40*x^3+66*x^2+4*x)*log(4+x)-x^6-8*x^5-18*x^4-4*x^3)/(x^8+4*x^7),
x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.18, size = 33, normalized size = 1.57 \begin {gather*} \frac {x + 2}{x^{2}} - \frac {2 \, {\left (x + 2\right )} \log \left (x + 4\right )}{x^{4}} + \frac {{\left (x + 2\right )} \log \left (x + 4\right )^{2}}{x^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x^2-32*x-48)*log(4+x)^2+(6*x^4+40*x^3+66*x^2+4*x)*log(4+x)-x^6-8*x^5-18*x^4-4*x^3)/(x^8+4*x^7),
x, algorithm="giac")

[Out]

(x + 2)/x^2 - 2*(x + 2)*log(x + 4)/x^4 + (x + 2)*log(x + 4)^2/x^6

________________________________________________________________________________________

maple [A]  time = 0.22, size = 34, normalized size = 1.62




method result size



risch \(\frac {\left (2+x \right ) \ln \left (4+x \right )^{2}}{x^{6}}-\frac {2 \left (2+x \right ) \ln \left (4+x \right )}{x^{4}}+\frac {2+x}{x^{2}}\) \(34\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-5*x^2-32*x-48)*ln(4+x)^2+(6*x^4+40*x^3+66*x^2+4*x)*ln(4+x)-x^6-8*x^5-18*x^4-4*x^3)/(x^8+4*x^7),x,method
=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 87, normalized size = 4.14 \begin {gather*} -\frac {9 \, {\left (x - 2\right )}}{8 \, x^{2}} + \frac {2}{x} + \frac {3 \, x^{2} - 6 \, x + 16}{48 \, x^{3}} + \frac {12 \, x^{5} - 24 \, x^{4} - 64 \, x^{3} + 192 \, {\left (x + 2\right )} \log \left (x + 4\right )^{2} - 3 \, {\left (x^{6} + 128 \, x^{3} + 256 \, x^{2}\right )} \log \left (x + 4\right )}{192 \, x^{6}} + \frac {1}{64} \, \log \left (x + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x^2-32*x-48)*log(4+x)^2+(6*x^4+40*x^3+66*x^2+4*x)*log(4+x)-x^6-8*x^5-18*x^4-4*x^3)/(x^8+4*x^7),
x, algorithm="maxima")

[Out]

-9/8*(x - 2)/x^2 + 2/x + 1/48*(3*x^2 - 6*x + 16)/x^3 + 1/192*(12*x^5 - 24*x^4 - 64*x^3 + 192*(x + 2)*log(x + 4
)^2 - 3*(x^6 + 128*x^3 + 256*x^2)*log(x + 4))/x^6 + 1/64*log(x + 4)

________________________________________________________________________________________

mupad [B]  time = 0.28, size = 47, normalized size = 2.24 \begin {gather*} \frac {x^5+2\,x^4-2\,x^3\,\ln \left (x+4\right )-4\,x^2\,\ln \left (x+4\right )+x\,{\ln \left (x+4\right )}^2+2\,{\ln \left (x+4\right )}^2}{x^6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x + 4)^2*(32*x + 5*x^2 + 48) - log(x + 4)*(4*x + 66*x^2 + 40*x^3 + 6*x^4) + 4*x^3 + 18*x^4 + 8*x^5 +
 x^6)/(4*x^7 + x^8),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-5*x**2-32*x-48)*ln(4+x)**2+(6*x**4+40*x**3+66*x**2+4*x)*ln(4+x)-x**6-8*x**5-18*x**4-4*x**3)/(x**8
+4*x**7),x)

[Out]

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

________________________________________________________________________________________