Optimal. Leaf size=23 \[ \frac {(6-x) \left (-\frac {4}{x}+x\right ) (\log (4)+\log (4+x))}{x^2} \]
________________________________________________________________________________________
Rubi [B] time = 0.49, antiderivative size = 74, normalized size of antiderivative = 3.22, number of steps used = 17, number of rules used = 9, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {1593, 6742, 1620, 2418, 2395, 44, 36, 29, 31} \begin {gather*} -\frac {24 \log (x+4)}{x^3}-\frac {24 \log (4)}{x^3}-\frac {3}{x^2}+\frac {4 \log (x+4)}{x^2}+\frac {3+\log (256)}{x^2}+\frac {5}{2 x}+\frac {6 \log (x+4)}{x}-\log (x+4)-\frac {5-12 \log (4)}{2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 44
Rule 1593
Rule 1620
Rule 2395
Rule 2418
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-24 x+4 x^2+6 x^3-x^4+\left (288+40 x-32 x^2-6 x^3\right ) \log (4)+\left (288+40 x-32 x^2-6 x^3\right ) \log (4+x)}{x^4 (4+x)} \, dx\\ &=\int \left (\frac {-x^4+4 x^2 (1-8 \log (4))-8 x (3-5 \log (4))+6 x^3 (1-\log (4))+288 \log (4)}{x^4 (4+x)}-\frac {2 \left (-36+4 x+3 x^2\right ) \log (4+x)}{x^4}\right ) \, dx\\ &=-\left (2 \int \frac {\left (-36+4 x+3 x^2\right ) \log (4+x)}{x^4} \, dx\right )+\int \frac {-x^4+4 x^2 (1-8 \log (4))-8 x (3-5 \log (4))+6 x^3 (1-\log (4))+288 \log (4)}{x^4 (4+x)} \, dx\\ &=-\left (2 \int \left (-\frac {36 \log (4+x)}{x^4}+\frac {4 \log (4+x)}{x^3}+\frac {3 \log (4+x)}{x^2}\right ) \, dx\right )+\int \left (\frac {7}{8 x}-\frac {15}{8 (4+x)}+\frac {5-12 \log (4)}{2 x^2}+\frac {72 \log (4)}{x^4}-\frac {2 (3+\log (256))}{x^3}\right ) \, dx\\ &=-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}+\frac {7 \log (x)}{8}-\frac {15}{8} \log (4+x)-6 \int \frac {\log (4+x)}{x^2} \, dx-8 \int \frac {\log (4+x)}{x^3} \, dx+72 \int \frac {\log (4+x)}{x^4} \, dx\\ &=-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}+\frac {7 \log (x)}{8}-\frac {15}{8} \log (4+x)-\frac {24 \log (4+x)}{x^3}+\frac {4 \log (4+x)}{x^2}+\frac {6 \log (4+x)}{x}-4 \int \frac {1}{x^2 (4+x)} \, dx-6 \int \frac {1}{x (4+x)} \, dx+24 \int \frac {1}{x^3 (4+x)} \, dx\\ &=-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}+\frac {7 \log (x)}{8}-\frac {15}{8} \log (4+x)-\frac {24 \log (4+x)}{x^3}+\frac {4 \log (4+x)}{x^2}+\frac {6 \log (4+x)}{x}-\frac {3}{2} \int \frac {1}{x} \, dx+\frac {3}{2} \int \frac {1}{4+x} \, dx-4 \int \left (\frac {1}{4 x^2}-\frac {1}{16 x}+\frac {1}{16 (4+x)}\right ) \, dx+24 \int \left (\frac {1}{4 x^3}-\frac {1}{16 x^2}+\frac {1}{64 x}-\frac {1}{64 (4+x)}\right ) \, dx\\ &=-\frac {3}{x^2}+\frac {5}{2 x}-\frac {5-12 \log (4)}{2 x}-\frac {24 \log (4)}{x^3}+\frac {3+\log (256)}{x^2}-\log (4+x)-\frac {24 \log (4+x)}{x^3}+\frac {4 \log (4+x)}{x^2}+\frac {6 \log (4+x)}{x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.14, size = 49, normalized size = 2.13 \begin {gather*} \frac {6 \log (4)}{x}+\frac {\log (256)}{x^2}-\log (4+x)+\frac {4 \log (4+x)}{x^2}+\frac {6 \log (4+x)}{x}-\frac {24 \log (16+4 x)}{x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.14, size = 38, normalized size = 1.65 \begin {gather*} \frac {4 \, {\left (3 \, x^{2} + 2 \, x - 12\right )} \log \relax (2) - {\left (x^{3} - 6 \, x^{2} - 4 \, x + 24\right )} \log \left (x + 4\right )}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 48, normalized size = 2.09 \begin {gather*} \frac {2 \, {\left (3 \, x^{2} + 2 \, x - 12\right )} \log \left (x + 4\right )}{x^{3}} + \frac {4 \, {\left (3 \, x^{2} \log \relax (2) + 2 \, x \log \relax (2) - 12 \, \log \relax (2)\right )}}{x^{3}} - \log \left (x + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 51, normalized size = 2.22
method | result | size |
risch | \(\frac {2 \left (3 x^{2}+2 x -12\right ) \ln \left (4+x \right )}{x^{3}}+\frac {-x^{3} \ln \left (4+x \right )+12 x^{2} \ln \relax (2)+8 x \ln \relax (2)-48 \ln \relax (2)}{x^{3}}\) | \(51\) |
norman | \(\frac {-x^{3} \ln \left (4+x \right )+8 x \ln \relax (2)+12 x^{2} \ln \relax (2)+6 x^{2} \ln \left (4+x \right )+4 \ln \left (4+x \right ) x -48 \ln \relax (2)-24 \ln \left (4+x \right )}{x^{3}}\) | \(53\) |
derivativedivides | \(-\frac {48 \ln \relax (2)}{x^{3}}+\frac {12 \ln \relax (2)}{x}+\frac {8 \ln \relax (2)}{x^{2}}-\frac {3 \ln \left (4+x \right ) \left (4+x \right ) \left (\left (4+x \right )^{2}-12 x \right )}{8 x^{3}}+\frac {3 \ln \left (4+x \right ) \left (4+x \right )}{2 x}-\frac {\ln \left (4+x \right ) \left (4+x \right ) \left (x -4\right )}{4 x^{2}}-\frac {15 \ln \left (4+x \right )}{8}\) | \(77\) |
default | \(-\frac {48 \ln \relax (2)}{x^{3}}+\frac {12 \ln \relax (2)}{x}+\frac {8 \ln \relax (2)}{x^{2}}-\frac {3 \ln \left (4+x \right ) \left (4+x \right ) \left (\left (4+x \right )^{2}-12 x \right )}{8 x^{3}}+\frac {3 \ln \left (4+x \right ) \left (4+x \right )}{2 x}-\frac {\ln \left (4+x \right ) \left (4+x \right ) \left (x -4\right )}{4 x^{2}}-\frac {15 \ln \left (4+x \right )}{8}\) | \(77\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.40, size = 136, normalized size = 5.91 \begin {gather*} \frac {5}{4} \, {\left (\frac {4 \, {\left (x - 2\right )}}{x^{2}} - \log \left (x + 4\right ) + \log \relax (x)\right )} \log \relax (2) + 4 \, {\left (\frac {4}{x} - \log \left (x + 4\right ) + \log \relax (x)\right )} \log \relax (2) - \frac {3}{4} \, {\left (\frac {4 \, {\left (3 \, x^{2} - 6 \, x + 16\right )}}{x^{3}} - 3 \, \log \left (x + 4\right ) + 3 \, \log \relax (x)\right )} \log \relax (2) + 3 \, {\left (\log \left (x + 4\right ) - \log \relax (x)\right )} \log \relax (2) - \frac {3 \, {\left (x - 2\right )}}{2 \, x^{2}} - \frac {1}{x} + \frac {20 \, x^{2} + {\left (7 \, x^{3} + 48 \, x^{2} + 32 \, x - 192\right )} \log \left (x + 4\right ) - 24 \, x}{8 \, x^{3}} - \frac {15}{8} \, \log \left (x + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.38, size = 53, normalized size = 2.30 \begin {gather*} -\ln \left (x+4\right )-\frac {24\,\ln \left (x+4\right )+48\,\ln \relax (2)-x^2\,\left (6\,\ln \left (x+4\right )+12\,\ln \relax (2)\right )-x\,\left (4\,\ln \left (x+4\right )+8\,\ln \relax (2)\right )}{x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.54, size = 46, normalized size = 2.00 \begin {gather*} - \log {\left (x + 4 \right )} + \frac {\left (6 x^{2} + 4 x - 24\right ) \log {\left (x + 4 \right )}}{x^{3}} - \frac {- 12 x^{2} \log {\relax (2 )} - 8 x \log {\relax (2 )} + 48 \log {\relax (2 )}}{x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________