Optimal. Leaf size=33 \[ -3-\frac {\log ^2(5-x)}{3+4 x}+\log (x)+\frac {\log ^2(x)}{(5-x)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.35, antiderivative size = 51, normalized size of antiderivative = 1.55, number of steps
used = 25, number of rules used = 14, integrand size = 148, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used
= {6820, 2465, 2437, 12, 2338, 2441, 2440, 2438, 2444, 2389, 2379, 2351, 31, 2356}
\begin {gather*} -\frac {4 (5-x) \log ^2(5-x)}{23 (4 x+3)}-\frac {1}{23} \log ^2(5-x)+\frac {\log ^2(x)}{(5-x)^2}+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 31
Rule 2338
Rule 2351
Rule 2356
Rule 2379
Rule 2389
Rule 2437
Rule 2438
Rule 2440
Rule 2441
Rule 2444
Rule 2465
Rule 6820
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {1}{x}+\frac {2 \log (5-x)}{15+17 x-4 x^2}+\frac {4 \log ^2(5-x)}{(3+4 x)^2}+\frac {2 \log (x)}{(-5+x)^2 x}-\frac {2 \log ^2(x)}{(-5+x)^3}\right ) \, dx\\ &=\log (x)+2 \int \frac {\log (5-x)}{15+17 x-4 x^2} \, dx+2 \int \frac {\log (x)}{(-5+x)^2 x} \, dx-2 \int \frac {\log ^2(x)}{(-5+x)^3} \, dx+4 \int \frac {\log ^2(5-x)}{(3+4 x)^2} \, dx\\ &=-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {\log ^2(x)}{(5-x)^2}-\frac {8}{23} \int \frac {\log (5-x)}{3+4 x} \, dx+\frac {2}{5} \int \frac {\log (x)}{(-5+x)^2} \, dx-\frac {2}{5} \int \frac {\log (x)}{(-5+x) x} \, dx+2 \int \left (\frac {8 \log (5-x)}{23 (40-8 x)}+\frac {8 \log (5-x)}{23 (6+8 x)}\right ) \, dx-2 \int \frac {\log (x)}{(-5+x)^2 x} \, dx\\ &=-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {2 x \log (x)}{25 (5-x)}+\frac {\log ^2(x)}{(5-x)^2}-\frac {2}{23} \log (5-x) \log \left (\frac {1}{23} (3+4 x)\right )+\frac {2}{25} \int \frac {1}{-5+x} \, dx-\frac {2}{25} \int \frac {\log (x)}{-5+x} \, dx+\frac {2}{25} \int \frac {\log (x)}{x} \, dx-\frac {2}{23} \int \frac {\log \left (\frac {1}{23} (3+4 x)\right )}{5-x} \, dx-\frac {2}{5} \int \frac {\log (x)}{(-5+x)^2} \, dx+\frac {2}{5} \int \frac {\log (x)}{(-5+x) x} \, dx+\frac {16}{23} \int \frac {\log (5-x)}{40-8 x} \, dx+\frac {16}{23} \int \frac {\log (5-x)}{6+8 x} \, dx\\ &=\frac {2}{25} \log (5-x)-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}-\frac {2}{25} \log (5) \log (-5+x)+\log (x)+\frac {\log ^2(x)}{25}+\frac {\log ^2(x)}{(5-x)^2}-\frac {2}{25} \int \frac {1}{-5+x} \, dx-\frac {2}{25} \int \frac {\log \left (\frac {x}{5}\right )}{-5+x} \, dx+\frac {2}{25} \int \frac {\log (x)}{-5+x} \, dx-\frac {2}{25} \int \frac {\log (x)}{x} \, dx+\frac {2}{23} \int \frac {\log \left (\frac {1}{46} (6+8 x)\right )}{5-x} \, dx+\frac {2}{23} \text {Subst}\left (\int \frac {\log \left (1-\frac {4 x}{23}\right )}{x} \, dx,x,5-x\right )-\frac {16}{23} \text {Subst}\left (\int \frac {\log (x)}{8 x} \, dx,x,5-x\right )\\ &=-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {\log ^2(x)}{(5-x)^2}-\frac {2}{23} \text {Li}_2\left (\frac {4 (5-x)}{23}\right )+\frac {2}{25} \text {Li}_2\left (1-\frac {x}{5}\right )+\frac {2}{25} \int \frac {\log \left (\frac {x}{5}\right )}{-5+x} \, dx-\frac {2}{23} \text {Subst}\left (\int \frac {\log \left (1-\frac {4 x}{23}\right )}{x} \, dx,x,5-x\right )-\frac {2}{23} \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,5-x\right )\\ &=-\frac {1}{23} \log ^2(5-x)-\frac {4 (5-x) \log ^2(5-x)}{23 (3+4 x)}+\log (x)+\frac {\log ^2(x)}{(5-x)^2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 58, normalized size = 1.76 \begin {gather*} -\frac {\log ^2(5-x)}{3+4 x}+\log (x)+\frac {\log ^2(x)}{(-5+x)^2}-\frac {2}{23} \log \left (\frac {23}{4}\right ) \log (3+4 x)+\frac {2}{23} \log \left (\frac {23}{4}\right ) \log (6+8 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 50, normalized size = 1.52
method | result | size |
risch | \(-\frac {\ln \left (5-x \right )^{2}}{3+4 x}+\frac {x^{2} \ln \left (x \right )-10 x \ln \left (x \right )+\ln \left (x \right )^{2}+25 \ln \left (x \right )}{x^{2}-10 x +25}\) | \(50\) |
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. 148 vs.
\(2 (31) = 62\).
time = 0.47, size = 148, normalized size = 4.48 \begin {gather*} \frac {279841 \, {\left (4 \, x + 3\right )} \log \left (x\right )^{2} - 279841 \, {\left (x^{2} - 10 \, x + 25\right )} \log \left (-x + 5\right )^{2} + 2275620 \, x^{2} + 135441 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )} \log \left (-x + 5\right ) - 14114985 \, x - 1828500}{279841 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )}} + \frac {15 \, {\left (1688 \, x^{2} - 24194 \, x + 86705\right )}}{24334 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )}} - \frac {2325 \, {\left (96 \, x^{2} - 684 \, x + 491\right )}}{24334 \, {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )}} - \frac {135441}{279841} \, \log \left (x - 5\right ) + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs.
\(2 (31) = 62\).
time = 0.37, size = 65, normalized size = 1.97 \begin {gather*} \frac {{\left (4 \, x + 3\right )} \log \left (x\right )^{2} - {\left (x^{2} - 10 \, x + 25\right )} \log \left (-x + 5\right )^{2} + {\left (4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75\right )} \log \left (x\right )}{4 \, x^{3} - 37 \, x^{2} + 70 \, x + 75} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.20, size = 27, normalized size = 0.82 \begin {gather*} \log {\left (x \right )} + \frac {\log {\left (x \right )}^{2}}{x^{2} - 10 x + 25} - \frac {\log {\left (5 - x \right )}^{2}}{4 x + 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 35, normalized size = 1.06 \begin {gather*} \frac {\log \left (x\right )^{2}}{x^{2} - 10 \, x + 25} - \frac {\log \left (-x + 5\right )^{2}}{4 \, x + 3} + \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.32, size = 35, normalized size = 1.06 \begin {gather*} \ln \left (x\right )+\frac {{\ln \left (x\right )}^2}{x^2-10\,x+25}-\frac {{\ln \left (5-x\right )}^2}{4\,\left (x+\frac {3}{4}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________