Optimal. Leaf size=29 \[ \left (-4+\frac {5 (1+x)}{x}\right )^4-(3+\log ((2-x) (4+x)))^2 \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.50, antiderivative size = 135, normalized size of antiderivative = 4.66, number of
steps used = 38, number of rules used = 15, integrand size = 70, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used
= {1608, 6860, 36, 31, 84, 78, 2608, 2604, 2465, 2441, 2440, 2438, 2437, 12, 2338}
\begin {gather*} 2 \text {PolyLog}\left (2,\frac {2-x}{6}\right )+2 \text {PolyLog}\left (2,\frac {x+4}{6}\right )+\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}-2 \log \left (-x^2-2 x+8\right ) \log (x-2)-2 \log (x+4) \log \left (-x^2-2 x+8\right )+\frac {20}{x}+\log ^2(x-2)+\log ^2(x+4)+2 \log \left (\frac {x+4}{6}\right ) \log (x-2)-6 \log (2-x)+2 \log \left (\frac {2-x}{6}\right ) \log (x+4)-6 \log (x+4) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 36
Rule 78
Rule 84
Rule 1608
Rule 2338
Rule 2437
Rule 2438
Rule 2440
Rule 2441
Rule 2465
Rule 2604
Rule 2608
Rule 6860
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {20000+7000 x-3100 x^2-1940 x^3-340 x^4-32 x^5-12 x^6+\left (-4 x^5-4 x^6\right ) \log \left (8-2 x-x^2\right )}{x^5 \left (-8+2 x+x^2\right )} \, dx\\ &=\int \left (-\frac {32}{(-2+x) (4+x)}+\frac {20000}{(-2+x) x^5 (4+x)}+\frac {7000}{(-2+x) x^4 (4+x)}-\frac {3100}{(-2+x) x^3 (4+x)}-\frac {1940}{(-2+x) x^2 (4+x)}-\frac {340}{(-2+x) x (4+x)}-\frac {12 x}{(-2+x) (4+x)}-\frac {4 (1+x) \log \left (8-2 x-x^2\right )}{(-2+x) (4+x)}\right ) \, dx\\ &=-\left (4 \int \frac {(1+x) \log \left (8-2 x-x^2\right )}{(-2+x) (4+x)} \, dx\right )-12 \int \frac {x}{(-2+x) (4+x)} \, dx-32 \int \frac {1}{(-2+x) (4+x)} \, dx-340 \int \frac {1}{(-2+x) x (4+x)} \, dx-1940 \int \frac {1}{(-2+x) x^2 (4+x)} \, dx-3100 \int \frac {1}{(-2+x) x^3 (4+x)} \, dx+7000 \int \frac {1}{(-2+x) x^4 (4+x)} \, dx+20000 \int \frac {1}{(-2+x) x^5 (4+x)} \, dx\\ &=-\left (4 \int \left (\frac {\log \left (8-2 x-x^2\right )}{2 (-2+x)}+\frac {\log \left (8-2 x-x^2\right )}{2 (4+x)}\right ) \, dx\right )-\frac {16}{3} \int \frac {1}{-2+x} \, dx+\frac {16}{3} \int \frac {1}{4+x} \, dx-12 \int \left (\frac {1}{3 (-2+x)}+\frac {2}{3 (4+x)}\right ) \, dx-340 \int \left (\frac {1}{12 (-2+x)}-\frac {1}{8 x}+\frac {1}{24 (4+x)}\right ) \, dx-1940 \int \left (\frac {1}{24 (-2+x)}-\frac {1}{8 x^2}-\frac {1}{32 x}-\frac {1}{96 (4+x)}\right ) \, dx-3100 \int \left (\frac {1}{48 (-2+x)}-\frac {1}{8 x^3}-\frac {1}{32 x^2}-\frac {3}{128 x}+\frac {1}{384 (4+x)}\right ) \, dx+7000 \int \left (\frac {1}{96 (-2+x)}-\frac {1}{8 x^4}-\frac {1}{32 x^3}-\frac {3}{128 x^2}-\frac {5}{512 x}-\frac {1}{1536 (4+x)}\right ) \, dx+20000 \int \left (\frac {1}{192 (-2+x)}-\frac {1}{8 x^5}-\frac {1}{32 x^4}-\frac {3}{128 x^3}-\frac {5}{512 x^2}-\frac {11}{2048 x}+\frac {1}{6144 (4+x)}\right ) \, dx\\ &=\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}-6 \log (2-x)-6 \log (4+x)-2 \int \frac {\log \left (8-2 x-x^2\right )}{-2+x} \, dx-2 \int \frac {\log \left (8-2 x-x^2\right )}{4+x} \, dx\\ &=\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}-6 \log (2-x)-6 \log (4+x)-2 \log (-2+x) \log \left (8-2 x-x^2\right )-2 \log (4+x) \log \left (8-2 x-x^2\right )+2 \int \frac {(-2-2 x) \log (-2+x)}{8-2 x-x^2} \, dx+2 \int \frac {(-2-2 x) \log (4+x)}{8-2 x-x^2} \, dx\\ &=\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}-6 \log (2-x)-6 \log (4+x)-2 \log (-2+x) \log \left (8-2 x-x^2\right )-2 \log (4+x) \log \left (8-2 x-x^2\right )+2 \int \left (-\frac {2 \log (-2+x)}{-8-2 x}-\frac {2 \log (-2+x)}{4-2 x}\right ) \, dx+2 \int \left (-\frac {2 \log (4+x)}{-8-2 x}-\frac {2 \log (4+x)}{4-2 x}\right ) \, dx\\ &=\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}-6 \log (2-x)-6 \log (4+x)-2 \log (-2+x) \log \left (8-2 x-x^2\right )-2 \log (4+x) \log \left (8-2 x-x^2\right )-4 \int \frac {\log (-2+x)}{-8-2 x} \, dx-4 \int \frac {\log (-2+x)}{4-2 x} \, dx-4 \int \frac {\log (4+x)}{-8-2 x} \, dx-4 \int \frac {\log (4+x)}{4-2 x} \, dx\\ &=\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}-6 \log (2-x)+2 \log (-2+x) \log \left (\frac {4+x}{6}\right )-6 \log (4+x)+2 \log \left (\frac {2-x}{6}\right ) \log (4+x)-2 \log (-2+x) \log \left (8-2 x-x^2\right )-2 \log (4+x) \log \left (8-2 x-x^2\right )-2 \int \frac {\log \left (\frac {1}{12} (4-2 x)\right )}{4+x} \, dx-2 \int \frac {\log \left (\frac {1}{12} (8+2 x)\right )}{-2+x} \, dx-4 \text {Subst}\left (\int -\frac {\log (x)}{2 x} \, dx,x,-2+x\right )-4 \text {Subst}\left (\int -\frac {\log (x)}{2 x} \, dx,x,4+x\right )\\ &=\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}-6 \log (2-x)+2 \log (-2+x) \log \left (\frac {4+x}{6}\right )-6 \log (4+x)+2 \log \left (\frac {2-x}{6}\right ) \log (4+x)-2 \log (-2+x) \log \left (8-2 x-x^2\right )-2 \log (4+x) \log \left (8-2 x-x^2\right )-2 \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{6}\right )}{x} \, dx,x,4+x\right )-2 \text {Subst}\left (\int \frac {\log \left (1+\frac {x}{6}\right )}{x} \, dx,x,-2+x\right )+2 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,-2+x\right )+2 \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,4+x\right )\\ &=\frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}-6 \log (2-x)+\log ^2(-2+x)+2 \log (-2+x) \log \left (\frac {4+x}{6}\right )-6 \log (4+x)+2 \log \left (\frac {2-x}{6}\right ) \log (4+x)+\log ^2(4+x)-2 \log (-2+x) \log \left (8-2 x-x^2\right )-2 \log (4+x) \log \left (8-2 x-x^2\right )+2 \text {Li}_2\left (\frac {2-x}{6}\right )+2 \text {Li}_2\left (\frac {4+x}{6}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(91\) vs. \(2(29)=58\).
time = 0.08, size = 91, normalized size = 3.14 \begin {gather*} \frac {625}{x^4}+\frac {500}{x^3}+\frac {150}{x^2}+\frac {20}{x}+2 \log (6) \log (4-2 x)+\log ^2(-2+x)-6 \log (4+x)+\log ^2(4+x)-2 \log (4+x) \log \left (8-2 x-x^2\right )-2 \log (-2+x) \left (3-\log (4+x)+\log \left (-6 \left (-8+2 x+x^2\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(112\) vs.
\(2(29)=58\).
time = 0.10, size = 113, normalized size = 3.90
method | result | size |
risch | \(-\ln \left (-x^{2}-2 x +8\right )^{2}-\frac {6 \ln \left (x^{2}+2 x -8\right ) x^{4}-20 x^{3}-150 x^{2}-500 x -625}{x^{4}}\) | \(51\) |
norman | \(\frac {625-6 x^{4} \ln \left (-x^{2}-2 x +8\right )+500 x +150 x^{2}+20 x^{3}-x^{4} \ln \left (-x^{2}-2 x +8\right )^{2}}{x^{4}}\) | \(54\) |
default | \(-2 \ln \left (4+x \right ) \ln \left (-x^{2}-2 x +8\right )+2 \left (\ln \left (4+x \right )-\ln \left (\frac {x}{6}+\frac {2}{3}\right )\right ) \ln \left (-\frac {x}{6}+\frac {1}{3}\right )+\ln \left (4+x \right )^{2}-2 \ln \left (x -2\right ) \ln \left (-x^{2}-2 x +8\right )+2 \ln \left (x -2\right ) \ln \left (\frac {x}{6}+\frac {2}{3}\right )+\ln \left (x -2\right )^{2}+\frac {625}{x^{4}}+\frac {500}{x^{3}}+\frac {150}{x^{2}}+\frac {20}{x}-6 \ln \left (4+x \right )-6 \ln \left (x -2\right )\) | \(113\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 91 vs.
\(2 (28) = 56\).
time = 0.30, size = 91, normalized size = 3.14 \begin {gather*} -\log \left (x + 4\right )^{2} - 2 \, \log \left (x + 4\right ) \log \left (-x + 2\right ) - \log \left (-x + 2\right )^{2} - \frac {775 \, {\left (x + 2\right )}}{8 \, x^{2}} - \frac {485}{2 \, x} + \frac {875 \, {\left (9 \, x^{2} + 6 \, x + 16\right )}}{48 \, x^{3}} + \frac {625 \, {\left (15 \, x^{3} + 18 \, x^{2} + 16 \, x + 48\right )}}{48 \, x^{4}} - 6 \, \log \left (x + 4\right ) - 6 \, \log \left (x - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 53, normalized size = 1.83 \begin {gather*} -\frac {x^{4} \log \left (-x^{2} - 2 \, x + 8\right )^{2} + 6 \, x^{4} \log \left (-x^{2} - 2 \, x + 8\right ) - 20 \, x^{3} - 150 \, x^{2} - 500 \, x - 625}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 44 vs.
\(2 (20) = 40\).
time = 0.10, size = 44, normalized size = 1.52 \begin {gather*} - \log {\left (- x^{2} - 2 x + 8 \right )}^{2} - 6 \log {\left (x^{2} + 2 x - 8 \right )} - \frac {- 20 x^{3} - 150 x^{2} - 500 x - 625}{x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 47, normalized size = 1.62 \begin {gather*} -\log \left (-x^{2} - 2 \, x + 8\right )^{2} + \frac {5 \, {\left (4 \, x^{3} + 30 \, x^{2} + 100 \, x + 125\right )}}{x^{4}} - 6 \, \log \left (x^{2} + 2 \, x - 8\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.28, size = 46, normalized size = 1.59 \begin {gather*} \frac {20\,x^3+150\,x^2+500\,x+625}{x^4}-{\ln \left (-x^2-2\,x+8\right )}^2-6\,\ln \left (x^2+2\,x-8\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________