\(\int \frac {-45 x^3+5 x^4+x^5+(65 x^2-10 x^3-x^4) \log (-4+x)+(-20 x+5 x^2) \log ^2(-4+x)}{e^8 (-4000-1400 x+120 x^2+88 x^3+8 x^4)} \, dx\) [5681]

   Optimal result
   Rubi [C] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 77, antiderivative size = 31 \[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=\frac {x^2 \left (\frac {x}{2}-\frac {1}{2} \log (-4+x)\right )^2}{4 e^8 (5+x)^2} \]

[Out]

1/4*x^2/exp(4)^2*(1/2*x-1/2*ln(x-4))^2/(5+x)^2

Rubi [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.40 (sec) , antiderivative size = 257, normalized size of antiderivative = 8.29, number of steps used = 38, number of rules used = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {12, 6874, 90, 2465, 2436, 2332, 2437, 2338, 2442, 46, 36, 31, 2441, 2440, 2438, 2463, 2445, 2458, 2389, 2379, 2351, 2444} \[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=-\frac {25 \operatorname {PolyLog}\left (2,\frac {9}{4-x}\right )}{648 e^8}-\frac {25 \operatorname {PolyLog}\left (2,\frac {4-x}{9}\right )}{648 e^8}+\frac {x^2}{16 e^8}-\frac {5 x}{8 e^8}-\frac {125}{4 e^8 (x+5)}+\frac {625}{16 e^8 (x+5)^2}-\frac {5 (4-x) \log ^2(x-4)}{72 e^8 (x+5)}+\frac {25 \log ^2(x-4)}{16 e^8 (x+5)^2}+\frac {\log ^2(x-4)}{81 e^8}+\frac {461 \log (4-x)}{648 e^8}+\frac {(4-x) \log (x-4)}{8 e^8}+\frac {25 \log \left (1-\frac {9}{4-x}\right ) \log (x-4)}{648 e^8}-\frac {25 (4-x) \log (x-4)}{648 e^8 (x+5)}-\frac {325 \log (x-4)}{36 e^8 (x+5)}+\frac {125 \log (x-4)}{8 e^8 (x+5)^2}-\frac {25 \log (x-4) \log \left (\frac {x+5}{9}\right )}{648 e^8} \]

[In]

Int[(-45*x^3 + 5*x^4 + x^5 + (65*x^2 - 10*x^3 - x^4)*Log[-4 + x] + (-20*x + 5*x^2)*Log[-4 + x]^2)/(E^8*(-4000
- 1400*x + 120*x^2 + 88*x^3 + 8*x^4)),x]

[Out]

(-5*x)/(8*E^8) + x^2/(16*E^8) + 625/(16*E^8*(5 + x)^2) - 125/(4*E^8*(5 + x)) + (461*Log[4 - x])/(648*E^8) + ((
4 - x)*Log[-4 + x])/(8*E^8) + (125*Log[-4 + x])/(8*E^8*(5 + x)^2) - (325*Log[-4 + x])/(36*E^8*(5 + x)) - (25*(
4 - x)*Log[-4 + x])/(648*E^8*(5 + x)) + (25*Log[1 - 9/(4 - x)]*Log[-4 + x])/(648*E^8) + Log[-4 + x]^2/(81*E^8)
 + (25*Log[-4 + x]^2)/(16*E^8*(5 + x)^2) - (5*(4 - x)*Log[-4 + x]^2)/(72*E^8*(5 + x)) - (25*Log[-4 + x]*Log[(5
 + x)/9])/(648*E^8) - (25*PolyLog[2, 9/(4 - x)])/(648*E^8) - (25*PolyLog[2, (4 - x)/9])/(648*E^8)

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

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] && Lt
Q[m + n + 2, 0])

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2332

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

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 2351

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 2379

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

Rule 2389

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 2436

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

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 2441

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 2442

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 2444

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 2445

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 2458

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

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 6874

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

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{-4000-1400 x+120 x^2+88 x^3+8 x^4} \, dx}{e^8} \\ & = \frac {\int \left (-\frac {45 x^3}{8 (-4+x) (5+x)^3}+\frac {5 x^4}{8 (-4+x) (5+x)^3}+\frac {x^5}{8 (-4+x) (5+x)^3}-\frac {x^2 \left (-65+10 x+x^2\right ) \log (-4+x)}{8 (-4+x) (5+x)^3}+\frac {5 x \log ^2(-4+x)}{8 (5+x)^3}\right ) \, dx}{e^8} \\ & = \frac {\int \frac {x^5}{(-4+x) (5+x)^3} \, dx}{8 e^8}-\frac {\int \frac {x^2 \left (-65+10 x+x^2\right ) \log (-4+x)}{(-4+x) (5+x)^3} \, dx}{8 e^8}+\frac {5 \int \frac {x^4}{(-4+x) (5+x)^3} \, dx}{8 e^8}+\frac {5 \int \frac {x \log ^2(-4+x)}{(5+x)^3} \, dx}{8 e^8}-\frac {45 \int \frac {x^3}{(-4+x) (5+x)^3} \, dx}{8 e^8} \\ & = \frac {\int \left (-11+\frac {1024}{729 (-4+x)}+x+\frac {3125}{9 (5+x)^3}-\frac {25000}{81 (5+x)^2}+\frac {76250}{729 (5+x)}\right ) \, dx}{8 e^8}-\frac {\int \left (\log (-4+x)-\frac {16 \log (-4+x)}{81 (-4+x)}+\frac {250 \log (-4+x)}{(5+x)^3}-\frac {650 \log (-4+x)}{9 (5+x)^2}-\frac {65 \log (-4+x)}{81 (5+x)}\right ) \, dx}{8 e^8}+\frac {5 \int \left (1+\frac {256}{729 (-4+x)}-\frac {625}{9 (5+x)^3}+\frac {3875}{81 (5+x)^2}-\frac {8275}{729 (5+x)}\right ) \, dx}{8 e^8}+\frac {5 \int \left (-\frac {5 \log ^2(-4+x)}{(5+x)^3}+\frac {\log ^2(-4+x)}{(5+x)^2}\right ) \, dx}{8 e^8}-\frac {45 \int \left (\frac {64}{729 (-4+x)}+\frac {125}{9 (5+x)^3}-\frac {550}{81 (5+x)^2}+\frac {665}{729 (5+x)}\right ) \, dx}{8 e^8} \\ & = -\frac {3 x}{4 e^8}+\frac {x^2}{16 e^8}+\frac {625}{16 e^8 (5+x)^2}-\frac {2125}{72 e^8 (5+x)}-\frac {8 \log (4-x)}{81 e^8}+\frac {275 \log (5+x)}{324 e^8}+\frac {2 \int \frac {\log (-4+x)}{-4+x} \, dx}{81 e^8}+\frac {65 \int \frac {\log (-4+x)}{5+x} \, dx}{648 e^8}-\frac {\int \log (-4+x) \, dx}{8 e^8}+\frac {5 \int \frac {\log ^2(-4+x)}{(5+x)^2} \, dx}{8 e^8}-\frac {25 \int \frac {\log ^2(-4+x)}{(5+x)^3} \, dx}{8 e^8}+\frac {325 \int \frac {\log (-4+x)}{(5+x)^2} \, dx}{36 e^8}-\frac {125 \int \frac {\log (-4+x)}{(5+x)^3} \, dx}{4 e^8} \\ & = -\frac {3 x}{4 e^8}+\frac {x^2}{16 e^8}+\frac {625}{16 e^8 (5+x)^2}-\frac {2125}{72 e^8 (5+x)}-\frac {8 \log (4-x)}{81 e^8}+\frac {125 \log (-4+x)}{8 e^8 (5+x)^2}-\frac {325 \log (-4+x)}{36 e^8 (5+x)}+\frac {25 \log ^2(-4+x)}{16 e^8 (5+x)^2}-\frac {5 (4-x) \log ^2(-4+x)}{72 e^8 (5+x)}+\frac {65 \log (-4+x) \log \left (\frac {5+x}{9}\right )}{648 e^8}+\frac {275 \log (5+x)}{324 e^8}+\frac {2 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,-4+x\right )}{81 e^8}-\frac {65 \int \frac {\log \left (\frac {5+x}{9}\right )}{-4+x} \, dx}{648 e^8}-\frac {\text {Subst}(\int \log (x) \, dx,x,-4+x)}{8 e^8}-\frac {5 \int \frac {\log (-4+x)}{5+x} \, dx}{36 e^8}-\frac {25 \int \frac {\log (-4+x)}{(-4+x) (5+x)^2} \, dx}{8 e^8}+\frac {325 \int \frac {1}{(-4+x) (5+x)} \, dx}{36 e^8}-\frac {125 \int \frac {1}{(-4+x) (5+x)^2} \, dx}{8 e^8} \\ & = -\frac {5 x}{8 e^8}+\frac {x^2}{16 e^8}+\frac {625}{16 e^8 (5+x)^2}-\frac {2125}{72 e^8 (5+x)}-\frac {8 \log (4-x)}{81 e^8}+\frac {(4-x) \log (-4+x)}{8 e^8}+\frac {125 \log (-4+x)}{8 e^8 (5+x)^2}-\frac {325 \log (-4+x)}{36 e^8 (5+x)}+\frac {\log ^2(-4+x)}{81 e^8}+\frac {25 \log ^2(-4+x)}{16 e^8 (5+x)^2}-\frac {5 (4-x) \log ^2(-4+x)}{72 e^8 (5+x)}-\frac {25 \log (-4+x) \log \left (\frac {5+x}{9}\right )}{648 e^8}+\frac {275 \log (5+x)}{324 e^8}-\frac {65 \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{9}\right )}{x} \, dx,x,-4+x\right )}{648 e^8}+\frac {5 \int \frac {\log \left (\frac {5+x}{9}\right )}{-4+x} \, dx}{36 e^8}+\frac {325 \int \frac {1}{-4+x} \, dx}{324 e^8}-\frac {325 \int \frac {1}{5+x} \, dx}{324 e^8}-\frac {25 \text {Subst}\left (\int \frac {\log (x)}{x (9+x)^2} \, dx,x,-4+x\right )}{8 e^8}-\frac {125 \int \left (\frac {1}{81 (-4+x)}-\frac {1}{9 (5+x)^2}-\frac {1}{81 (5+x)}\right ) \, dx}{8 e^8} \\ & = -\frac {5 x}{8 e^8}+\frac {x^2}{16 e^8}+\frac {625}{16 e^8 (5+x)^2}-\frac {125}{4 e^8 (5+x)}+\frac {461 \log (4-x)}{648 e^8}+\frac {(4-x) \log (-4+x)}{8 e^8}+\frac {125 \log (-4+x)}{8 e^8 (5+x)^2}-\frac {325 \log (-4+x)}{36 e^8 (5+x)}+\frac {\log ^2(-4+x)}{81 e^8}+\frac {25 \log ^2(-4+x)}{16 e^8 (5+x)^2}-\frac {5 (4-x) \log ^2(-4+x)}{72 e^8 (5+x)}-\frac {25 \log (-4+x) \log \left (\frac {5+x}{9}\right )}{648 e^8}+\frac {25 \log (5+x)}{648 e^8}+\frac {65 \text {Li}_2\left (\frac {4-x}{9}\right )}{648 e^8}+\frac {5 \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{9}\right )}{x} \, dx,x,-4+x\right )}{36 e^8}+\frac {25 \text {Subst}\left (\int \frac {\log (x)}{(9+x)^2} \, dx,x,-4+x\right )}{72 e^8}-\frac {25 \text {Subst}\left (\int \frac {\log (x)}{x (9+x)} \, dx,x,-4+x\right )}{72 e^8} \\ & = -\frac {5 x}{8 e^8}+\frac {x^2}{16 e^8}+\frac {625}{16 e^8 (5+x)^2}-\frac {125}{4 e^8 (5+x)}+\frac {461 \log (4-x)}{648 e^8}+\frac {(4-x) \log (-4+x)}{8 e^8}+\frac {125 \log (-4+x)}{8 e^8 (5+x)^2}-\frac {325 \log (-4+x)}{36 e^8 (5+x)}-\frac {25 (4-x) \log (-4+x)}{648 e^8 (5+x)}+\frac {25 \log \left (1-\frac {9}{4-x}\right ) \log (-4+x)}{648 e^8}+\frac {\log ^2(-4+x)}{81 e^8}+\frac {25 \log ^2(-4+x)}{16 e^8 (5+x)^2}-\frac {5 (4-x) \log ^2(-4+x)}{72 e^8 (5+x)}-\frac {25 \log (-4+x) \log \left (\frac {5+x}{9}\right )}{648 e^8}+\frac {25 \log (5+x)}{648 e^8}-\frac {25 \text {Li}_2\left (\frac {4-x}{9}\right )}{648 e^8}-\frac {25 \text {Subst}\left (\int \frac {1}{9+x} \, dx,x,-4+x\right )}{648 e^8}-\frac {25 \text {Subst}\left (\int \frac {\log \left (1+\frac {9}{x}\right )}{x} \, dx,x,-4+x\right )}{648 e^8} \\ & = -\frac {5 x}{8 e^8}+\frac {x^2}{16 e^8}+\frac {625}{16 e^8 (5+x)^2}-\frac {125}{4 e^8 (5+x)}+\frac {461 \log (4-x)}{648 e^8}+\frac {(4-x) \log (-4+x)}{8 e^8}+\frac {125 \log (-4+x)}{8 e^8 (5+x)^2}-\frac {325 \log (-4+x)}{36 e^8 (5+x)}-\frac {25 (4-x) \log (-4+x)}{648 e^8 (5+x)}+\frac {25 \log \left (1-\frac {9}{4-x}\right ) \log (-4+x)}{648 e^8}+\frac {\log ^2(-4+x)}{81 e^8}+\frac {25 \log ^2(-4+x)}{16 e^8 (5+x)^2}-\frac {5 (4-x) \log ^2(-4+x)}{72 e^8 (5+x)}-\frac {25 \log (-4+x) \log \left (\frac {5+x}{9}\right )}{648 e^8}-\frac {25 \text {Li}_2\left (\frac {9}{4-x}\right )}{648 e^8}-\frac {25 \text {Li}_2\left (\frac {4-x}{9}\right )}{648 e^8} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(128\) vs. \(2(31)=62\).

Time = 0.16 (sec) , antiderivative size = 128, normalized size of antiderivative = 4.13 \[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=\frac {-5625-2250 x-225 x^2+3 x^4+50 (5+x)^2 \log (4-x)-2 \left (625+250 x+25 x^2+3 x^3\right ) \log (-4+x)+3 x^2 \log ^2(-4+x)+1250 \log \left (\frac {5+x}{9}\right )+500 x \log \left (\frac {5+x}{9}\right )+50 x^2 \log \left (\frac {5+x}{9}\right )-1250 \log (5+x)-500 x \log (5+x)-50 x^2 \log (5+x)}{48 e^8 (5+x)^2} \]

[In]

Integrate[(-45*x^3 + 5*x^4 + x^5 + (65*x^2 - 10*x^3 - x^4)*Log[-4 + x] + (-20*x + 5*x^2)*Log[-4 + x]^2)/(E^8*(
-4000 - 1400*x + 120*x^2 + 88*x^3 + 8*x^4)),x]

[Out]

(-5625 - 2250*x - 225*x^2 + 3*x^4 + 50*(5 + x)^2*Log[4 - x] - 2*(625 + 250*x + 25*x^2 + 3*x^3)*Log[-4 + x] + 3
*x^2*Log[-4 + x]^2 + 1250*Log[(5 + x)/9] + 500*x*Log[(5 + x)/9] + 50*x^2*Log[(5 + x)/9] - 1250*Log[5 + x] - 50
0*x*Log[5 + x] - 50*x^2*Log[5 + x])/(48*E^8*(5 + x)^2)

Maple [A] (verified)

Time = 0.32 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.58

method result size
norman \(\frac {\left (\frac {{\mathrm e}^{-4} x^{4}}{16}+\frac {x^{2} {\mathrm e}^{-4} \ln \left (x -4\right )^{2}}{16}-\frac {{\mathrm e}^{-4} x^{3} \ln \left (x -4\right )}{8}\right ) {\mathrm e}^{-4}}{\left (5+x \right )^{2}}\) \(49\)
parallelrisch \(\frac {{\mathrm e}^{-8} \left (x^{4}-2 x^{3} \ln \left (x -4\right )+\ln \left (x -4\right )^{2} x^{2}-400-16 x^{2}-160 x \right )}{16 x^{2}+160 x +400}\) \(49\)
risch \(\frac {{\mathrm e}^{-8} x^{2} \ln \left (x -4\right )^{2}}{16 x^{2}+160 x +400}-\frac {{\mathrm e}^{-8} \left (x^{3}+10 x^{2}+100 x +250\right ) \ln \left (x -4\right )}{8 \left (x^{2}+10 x +25\right )}+\frac {{\mathrm e}^{-8} \left (x^{4}+20 x^{2} \ln \left (x -4\right )+200 x \ln \left (x -4\right )-75 x^{2}+500 \ln \left (x -4\right )-750 x -1875\right )}{16 x^{2}+160 x +400}\) \(105\)

[In]

int(((5*x^2-20*x)*ln(x-4)^2+(-x^4-10*x^3+65*x^2)*ln(x-4)+x^5+5*x^4-45*x^3)/(8*x^4+88*x^3+120*x^2-1400*x-4000)/
exp(4)^2,x,method=_RETURNVERBOSE)

[Out]

(1/16/exp(4)*x^4+1/16*x^2/exp(4)*ln(x-4)^2-1/8/exp(4)*x^3*ln(x-4))/(5+x)^2/exp(4)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (22) = 44\).

Time = 0.26 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.48 \[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=\frac {{\left (x^{4} - 2 \, x^{3} \log \left (x - 4\right ) + x^{2} \log \left (x - 4\right )^{2} - 75 \, x^{2} - 750 \, x - 1875\right )} e^{\left (-8\right )}}{16 \, {\left (x^{2} + 10 \, x + 25\right )}} \]

[In]

integrate(((5*x^2-20*x)*log(x-4)^2+(-x^4-10*x^3+65*x^2)*log(x-4)+x^5+5*x^4-45*x^3)/(8*x^4+88*x^3+120*x^2-1400*
x-4000)/exp(4)^2,x, algorithm="fricas")

[Out]

1/16*(x^4 - 2*x^3*log(x - 4) + x^2*log(x - 4)^2 - 75*x^2 - 750*x - 1875)*e^(-8)/(x^2 + 10*x + 25)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 126 vs. \(2 (24) = 48\).

Time = 0.41 (sec) , antiderivative size = 126, normalized size of antiderivative = 4.06 \[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=\frac {x^{2}}{16 e^{8}} + \frac {x^{2} \log {\left (x - 4 \right )}^{2}}{16 x^{2} e^{8} + 160 x e^{8} + 400 e^{8}} - \frac {5 x}{8 e^{8}} + \frac {- 500 x - 1875}{16 x^{2} e^{8} + 160 x e^{8} + 400 e^{8}} + \frac {5 \log {\left (x - 4 \right )}}{4 e^{8}} + \frac {\left (- x^{3} - 10 x^{2} - 100 x - 250\right ) \log {\left (x - 4 \right )}}{8 x^{2} e^{8} + 80 x e^{8} + 200 e^{8}} \]

[In]

integrate(((5*x**2-20*x)*ln(x-4)**2+(-x**4-10*x**3+65*x**2)*ln(x-4)+x**5+5*x**4-45*x**3)/(8*x**4+88*x**3+120*x
**2-1400*x-4000)/exp(4)**2,x)

[Out]

x**2*exp(-8)/16 + x**2*log(x - 4)**2/(16*x**2*exp(8) + 160*x*exp(8) + 400*exp(8)) - 5*x*exp(-8)/8 + (-500*x -
1875)/(16*x**2*exp(8) + 160*x*exp(8) + 400*exp(8)) + 5*exp(-8)*log(x - 4)/4 + (-x**3 - 10*x**2 - 100*x - 250)*
log(x - 4)/(8*x**2*exp(8) + 80*x*exp(8) + 200*exp(8))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (22) = 44\).

Time = 0.27 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.48 \[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=\frac {{\left (x^{4} - 2 \, x^{3} \log \left (x - 4\right ) + x^{2} \log \left (x - 4\right )^{2} - 75 \, x^{2} - 750 \, x - 1875\right )} e^{\left (-8\right )}}{16 \, {\left (x^{2} + 10 \, x + 25\right )}} \]

[In]

integrate(((5*x^2-20*x)*log(x-4)^2+(-x^4-10*x^3+65*x^2)*log(x-4)+x^5+5*x^4-45*x^3)/(8*x^4+88*x^3+120*x^2-1400*
x-4000)/exp(4)^2,x, algorithm="maxima")

[Out]

1/16*(x^4 - 2*x^3*log(x - 4) + x^2*log(x - 4)^2 - 75*x^2 - 750*x - 1875)*e^(-8)/(x^2 + 10*x + 25)

Giac [F]

\[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=\int { \frac {{\left (x^{5} + 5 \, x^{4} - 45 \, x^{3} + 5 \, {\left (x^{2} - 4 \, x\right )} \log \left (x - 4\right )^{2} - {\left (x^{4} + 10 \, x^{3} - 65 \, x^{2}\right )} \log \left (x - 4\right )\right )} e^{\left (-8\right )}}{8 \, {\left (x^{4} + 11 \, x^{3} + 15 \, x^{2} - 175 \, x - 500\right )}} \,d x } \]

[In]

integrate(((5*x^2-20*x)*log(x-4)^2+(-x^4-10*x^3+65*x^2)*log(x-4)+x^5+5*x^4-45*x^3)/(8*x^4+88*x^3+120*x^2-1400*
x-4000)/exp(4)^2,x, algorithm="giac")

[Out]

integrate(1/8*(x^5 + 5*x^4 - 45*x^3 + 5*(x^2 - 4*x)*log(x - 4)^2 - (x^4 + 10*x^3 - 65*x^2)*log(x - 4))*e^(-8)/
(x^4 + 11*x^3 + 15*x^2 - 175*x - 500), x)

Mupad [B] (verification not implemented)

Time = 0.49 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.71 \[ \int \frac {-45 x^3+5 x^4+x^5+\left (65 x^2-10 x^3-x^4\right ) \log (-4+x)+\left (-20 x+5 x^2\right ) \log ^2(-4+x)}{e^8 \left (-4000-1400 x+120 x^2+88 x^3+8 x^4\right )} \, dx=\frac {x^2\,{\mathrm {e}}^{-8}\,{\left (x-\ln \left (x-4\right )\right )}^2}{16\,{\left (x+5\right )}^2} \]

[In]

int(-(exp(-8)*(log(x - 4)*(10*x^3 - 65*x^2 + x^4) + log(x - 4)^2*(20*x - 5*x^2) + 45*x^3 - 5*x^4 - x^5))/(120*
x^2 - 1400*x + 88*x^3 + 8*x^4 - 4000),x)

[Out]

(x^2*exp(-8)*(x - log(x - 4))^2)/(16*(x + 5)^2)