Optimal. Leaf size=35 \[ 3-3 (x-\log (3))-x \left (\frac {x+\frac {2}{4+x}}{x}-\log ^2(2 x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 19, normalized size of antiderivative = 0.54, number of steps
used = 8, number of rules used = 5, integrand size = 51, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {27, 6820, 697,
2332, 2333} \begin {gather*} -4 x-\frac {2}{x+4}+x \log ^2(2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 697
Rule 2332
Rule 2333
Rule 6820
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-62-32 x-4 x^2+\left (32+16 x+2 x^2\right ) \log (2 x)+\left (16+8 x+x^2\right ) \log ^2(2 x)}{(4+x)^2} \, dx\\ &=\int \left (-\frac {2 \left (31+16 x+2 x^2\right )}{(4+x)^2}+2 \log (2 x)+\log ^2(2 x)\right ) \, dx\\ &=-\left (2 \int \frac {31+16 x+2 x^2}{(4+x)^2} \, dx\right )+2 \int \log (2 x) \, dx+\int \log ^2(2 x) \, dx\\ &=-2 x+2 x \log (2 x)+x \log ^2(2 x)-2 \int \left (2-\frac {1}{(4+x)^2}\right ) \, dx-2 \int \log (2 x) \, dx\\ &=-4 x-\frac {2}{4+x}+x \log ^2(2 x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 21, normalized size = 0.60 \begin {gather*} -\frac {2}{4+x}-4 (4+x)+x \log ^2(2 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.13, size = 22, normalized size = 0.63
method | result | size |
derivativedivides | \(x \ln \left (2 x \right )^{2}-4 x -\frac {4}{2 x +8}\) | \(22\) |
default | \(x \ln \left (2 x \right )^{2}-4 x -\frac {4}{2 x +8}\) | \(22\) |
risch | \(x \ln \left (2 x \right )^{2}-\frac {2 \left (2 x^{2}+8 x +1\right )}{4+x}\) | \(27\) |
norman | \(\frac {x^{2} \ln \left (2 x \right )^{2}-4 x^{2}+4 x \ln \left (2 x \right )^{2}+62}{4+x}\) | \(33\) |
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. 82 vs.
\(2 (32) = 64\).
time = 0.51, size = 82, normalized size = 2.34 \begin {gather*} -4 \, x + \frac {x^{2} \log \left (2\right )^{2} + 4 \, x \log \left (2\right )^{2} + {\left (x^{2} + 4 \, x\right )} \log \left (x\right )^{2} + 2 \, {\left (x^{2} \log \left (2\right ) + 4 \, x {\left (\log \left (2\right ) - 1\right )}\right )} \log \left (x\right ) + 32 \, \log \left (2\right )}{x + 4} - \frac {32 \, \log \left (2 \, x\right )}{x + 4} - \frac {2}{x + 4} + 8 \, \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 30, normalized size = 0.86 \begin {gather*} \frac {{\left (x^{2} + 4 \, x\right )} \log \left (2 \, x\right )^{2} - 4 \, x^{2} - 16 \, x - 2}{x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 15, normalized size = 0.43 \begin {gather*} x \log {\left (2 x \right )}^{2} - 4 x - \frac {2}{x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 19, normalized size = 0.54 \begin {gather*} x \log \left (2 \, x\right )^{2} - 4 \, x - \frac {2}{x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.48, size = 18, normalized size = 0.51 \begin {gather*} x\,\left ({\ln \left (2\,x\right )}^2-4\right )-\frac {2}{x+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________