Optimal. Leaf size=20 \[ 5+\log (4)-\log ^2\left (\frac {1}{4} \left (1+\frac {4}{x}\right )\right ) \]
________________________________________________________________________________________
Rubi [C] time = 0.20, antiderivative size = 45, normalized size of antiderivative = 2.25, number of steps used = 15, number of rules used = 12, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.546, Rules used = {12, 1593, 2469, 2466, 2454, 2392, 2391, 2462, 260, 2416, 2390, 2301} \begin {gather*} 2 \text {Li}_2\left (-\frac {4}{x}\right )+2 \text {Li}_2\left (-\frac {x}{4}\right )+\log ^2(x+4)-2 \log \left (\frac {1}{x}+\frac {1}{4}\right ) \log (x+4)-4 \log (4) \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 260
Rule 1593
Rule 2301
Rule 2390
Rule 2391
Rule 2392
Rule 2416
Rule 2454
Rule 2462
Rule 2466
Rule 2469
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=8 \int \frac {\log \left (\frac {4+x}{4 x}\right )}{4 x+x^2} \, dx\\ &=8 \int \frac {\log \left (\frac {4+x}{4 x}\right )}{x (4+x)} \, dx\\ &=8 \int \frac {\log \left (\frac {1}{4}+\frac {1}{x}\right )}{x (4+x)} \, dx\\ &=8 \int \left (\frac {\log \left (\frac {1}{4}+\frac {1}{x}\right )}{4 x}-\frac {\log \left (\frac {1}{4}+\frac {1}{x}\right )}{4 (4+x)}\right ) \, dx\\ &=2 \int \frac {\log \left (\frac {1}{4}+\frac {1}{x}\right )}{x} \, dx-2 \int \frac {\log \left (\frac {1}{4}+\frac {1}{x}\right )}{4+x} \, dx\\ &=-2 \log \left (\frac {1}{4}+\frac {1}{x}\right ) \log (4+x)-2 \int \frac {\log (4+x)}{\left (\frac {1}{4}+\frac {1}{x}\right ) x^2} \, dx-2 \operatorname {Subst}\left (\int \frac {\log \left (\frac {1}{4}+x\right )}{x} \, dx,x,\frac {1}{x}\right )\\ &=-2 \log (4) \log (x)-2 \log \left (\frac {1}{4}+\frac {1}{x}\right ) \log (4+x)-2 \int \left (\frac {\log (4+x)}{-4-x}+\frac {\log (4+x)}{x}\right ) \, dx-2 \operatorname {Subst}\left (\int \frac {\log (1+4 x)}{x} \, dx,x,\frac {1}{x}\right )\\ &=-2 \log (4) \log (x)-2 \log \left (\frac {1}{4}+\frac {1}{x}\right ) \log (4+x)+2 \text {Li}_2\left (-\frac {4}{x}\right )-2 \int \frac {\log (4+x)}{-4-x} \, dx-2 \int \frac {\log (4+x)}{x} \, dx\\ &=-4 \log (4) \log (x)-2 \log \left (\frac {1}{4}+\frac {1}{x}\right ) \log (4+x)+2 \text {Li}_2\left (-\frac {4}{x}\right )-2 \int \frac {\log \left (1+\frac {x}{4}\right )}{x} \, dx+2 \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,4+x\right )\\ &=-4 \log (4) \log (x)-2 \log \left (\frac {1}{4}+\frac {1}{x}\right ) \log (4+x)+\log ^2(4+x)+2 \text {Li}_2\left (-\frac {4}{x}\right )+2 \text {Li}_2\left (-\frac {x}{4}\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] time = 0.02, size = 85, normalized size = 4.25 \begin {gather*} 8 \left (-\frac {1}{4} \log (4) \log (x)+\frac {1}{8} \log ^2(4+x)-\frac {1}{4} \log \left (-\frac {4}{x}\right ) \log \left (\frac {4+x}{4 x}\right )-\frac {1}{4} \log (4+x) \log \left (\frac {4+x}{4 x}\right )+\frac {\text {Li}_2\left (-\frac {x}{4}\right )}{4}-\frac {1}{4} \text {Li}_2\left (\frac {4+x}{x}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 13, normalized size = 0.65 \begin {gather*} -\log \left (\frac {x + 4}{4 \, x}\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 13, normalized size = 0.65 \begin {gather*} -\log \left (\frac {x + 4}{4 \, x}\right )^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.38, size = 11, normalized size = 0.55
method | result | size |
derivativedivides | \(-\ln \left (\frac {1}{4}+\frac {1}{x}\right )^{2}\) | \(11\) |
default | \(-\ln \left (\frac {1}{4}+\frac {1}{x}\right )^{2}\) | \(11\) |
risch | \(-\ln \left (\frac {1}{4}+\frac {1}{x}\right )^{2}\) | \(11\) |
norman | \(-\ln \left (\frac {4+x}{4 x}\right )^{2}\) | \(14\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.36, size = 39, normalized size = 1.95 \begin {gather*} \log \left (x + 4\right )^{2} - 2 \, \log \left (x + 4\right ) \log \relax (x) + \log \relax (x)^{2} - 2 \, {\left (\log \left (x + 4\right ) - \log \relax (x)\right )} \log \left (\frac {x + 4}{4 \, x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.17, size = 13, normalized size = 0.65 \begin {gather*} -{\ln \left (\frac {x+4}{4\,x}\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.11, size = 10, normalized size = 0.50 \begin {gather*} - \log {\left (\frac {\frac {x}{4} + 1}{x} \right )}^{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________