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]
[Out]
Rule 14
Rule 29
Rule 30
Rule 31
Rule 36
Rule 43
Rule 72
Rule 77
Rule 1593
Rule 1620
Rule 2295
Rule 2296
Rule 2301
Rule 2302
Rule 2304
Rule 2305
Rule 2314
Rule 2315
Rule 2316
Rule 2317
Rule 2344
Rule 2351
Rule 2353
Rule 2370
Rule 2371
Rule 2374
Rule 2375
Rule 2376
Rule 2378
Rule 2383
Rule 2389
Rule 2391
Rule 2392
Rule 2395
Rule 2411
Rule 2414
Rule 6589
Rule 6688
Rule 6742
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________