Optimal. Leaf size=27 \[ \frac {e^2 x \left (x-\log \left (3-\frac {-4+x}{x}\right )\right )}{-4-x} \]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 50, normalized size of antiderivative = 1.85, number of steps used = 16, number of rules used = 9, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.164, Rules used = {6741, 12, 6742, 44, 77, 88, 2463, 514, 72} \begin {gather*} -e^2 x-\frac {16 e^2}{x+4}-\frac {4 e^2 \log \left (\frac {4}{x}+2\right )}{x+4}-e^2 \log (x)+e^2 \log (x+2) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 44
Rule 72
Rule 77
Rule 88
Rule 514
Rule 2463
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^2 \left (-8-18 x-10 x^2-x^3+8 \log \left (2+\frac {4}{x}\right )+4 x \log \left (2+\frac {4}{x}\right )\right )}{32+32 x+10 x^2+x^3} \, dx\\ &=e^2 \int \frac {-8-18 x-10 x^2-x^3+8 \log \left (2+\frac {4}{x}\right )+4 x \log \left (2+\frac {4}{x}\right )}{32+32 x+10 x^2+x^3} \, dx\\ &=e^2 \int \left (-\frac {8}{(2+x) (4+x)^2}-\frac {18 x}{(2+x) (4+x)^2}-\frac {10 x^2}{(2+x) (4+x)^2}-\frac {x^3}{(2+x) (4+x)^2}+\frac {4 \log \left (2+\frac {4}{x}\right )}{(4+x)^2}\right ) \, dx\\ &=-\left (e^2 \int \frac {x^3}{(2+x) (4+x)^2} \, dx\right )+\left (4 e^2\right ) \int \frac {\log \left (2+\frac {4}{x}\right )}{(4+x)^2} \, dx-\left (8 e^2\right ) \int \frac {1}{(2+x) (4+x)^2} \, dx-\left (10 e^2\right ) \int \frac {x^2}{(2+x) (4+x)^2} \, dx-\left (18 e^2\right ) \int \frac {x}{(2+x) (4+x)^2} \, dx\\ &=-\frac {4 e^2 \log \left (2+\frac {4}{x}\right )}{4+x}-e^2 \int \left (1-\frac {2}{2+x}+\frac {32}{(4+x)^2}-\frac {8}{4+x}\right ) \, dx-\left (8 e^2\right ) \int \left (\frac {1}{4 (2+x)}-\frac {1}{2 (4+x)^2}-\frac {1}{4 (4+x)}\right ) \, dx-\left (10 e^2\right ) \int \left (\frac {1}{2+x}-\frac {8}{(4+x)^2}\right ) \, dx-\left (16 e^2\right ) \int \frac {1}{\left (2+\frac {4}{x}\right ) x^2 (4+x)} \, dx-\left (18 e^2\right ) \int \left (-\frac {1}{2 (2+x)}+\frac {2}{(4+x)^2}+\frac {1}{2 (4+x)}\right ) \, dx\\ &=-e^2 x-\frac {16 e^2}{4+x}-\frac {4 e^2 \log \left (2+\frac {4}{x}\right )}{4+x}-e^2 \log (2+x)+e^2 \log (4+x)-\left (16 e^2\right ) \int \frac {1}{x (4+x) (4+2 x)} \, dx\\ &=-e^2 x-\frac {16 e^2}{4+x}-\frac {4 e^2 \log \left (2+\frac {4}{x}\right )}{4+x}-e^2 \log (2+x)+e^2 \log (4+x)-\left (16 e^2\right ) \int \left (\frac {1}{16 x}-\frac {1}{8 (2+x)}+\frac {1}{16 (4+x)}\right ) \, dx\\ &=-e^2 x-\frac {16 e^2}{4+x}-\frac {4 e^2 \log \left (2+\frac {4}{x}\right )}{4+x}-e^2 \log (x)+e^2 \log (2+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 32, normalized size = 1.19 \begin {gather*} -e^2 \left (x+\frac {4 \left (4+\log \left (2+\frac {4}{x}\right )\right )}{4+x}+\log (x)-\log (2+x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 32, normalized size = 1.19 \begin {gather*} \frac {x e^{2} \log \left (\frac {2 \, {\left (x + 2\right )}}{x}\right ) - {\left (x^{2} + 4 \, x + 16\right )} e^{2}}{x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.41, size = 59, normalized size = 2.19 \begin {gather*} \frac {\frac {{\left (x + 2\right )} e^{2} \log \left (\frac {2 \, {\left (x + 2\right )}}{x}\right )}{x} - e^{2} \log \left (\frac {2 \, {\left (x + 2\right )}}{x}\right ) - 2 \, e^{2}}{\frac {2 \, {\left (x + 2\right )}^{2}}{x^{2}} - \frac {3 \, {\left (x + 2\right )}}{x} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 29, normalized size = 1.07
method | result | size |
norman | \(\frac {{\mathrm e}^{2} x \ln \left (\frac {2 x +4}{x}\right )-x^{2} {\mathrm e}^{2}}{4+x}\) | \(29\) |
derivativedivides | \(\frac {{\mathrm e}^{2} \ln \left (2+\frac {4}{x}\right ) \left (2+\frac {4}{x}\right )}{\frac {4}{x}+1}-{\mathrm e}^{2} x +\frac {4 \,{\mathrm e}^{2}}{\frac {4}{x}+1}-{\mathrm e}^{2} \ln \left (2+\frac {4}{x}\right )\) | \(59\) |
default | \(\frac {{\mathrm e}^{2} \ln \left (2+\frac {4}{x}\right ) \left (2+\frac {4}{x}\right )}{\frac {4}{x}+1}-{\mathrm e}^{2} x +\frac {4 \,{\mathrm e}^{2}}{\frac {4}{x}+1}-{\mathrm e}^{2} \ln \left (2+\frac {4}{x}\right )\) | \(59\) |
risch | \(-\frac {4 \,{\mathrm e}^{2} \ln \left (\frac {2 x +4}{x}\right )}{4+x}-\frac {{\mathrm e}^{2} \left (\ln \left (-x \right ) x -\ln \left (-x -2\right ) x +x^{2}+4 \ln \left (-x \right )-4 \ln \left (-x -2\right )+4 x +16\right )}{4+x}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.68, size = 80, normalized size = 2.96 \begin {gather*} -2 \, {\left (\frac {2}{x + 4} - \log \left (x + 4\right ) + \log \left (x + 2\right )\right )} e^{2} - 2 \, e^{2} \log \left (x + 4\right ) - \frac {x^{2} e^{2} + x e^{2} \log \relax (x) + 4 \, x e^{2} + 4 \, {\left (\log \relax (2) + 3\right )} e^{2} - {\left (3 \, x e^{2} + 8 \, e^{2}\right )} \log \left (x + 2\right )}{x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.31, size = 23, normalized size = 0.85 \begin {gather*} -\frac {x\,{\mathrm {e}}^2\,\left (x-\ln \left (\frac {2\,\left (x+2\right )}{x}\right )\right )}{x+4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.33, size = 44, normalized size = 1.63 \begin {gather*} - x e^{2} - e^{2} \log {\relax (x )} + e^{2} \log {\left (x + 2 \right )} - \frac {4 e^{2} \log {\left (\frac {2 x + 4}{x} \right )}}{x + 4} - \frac {16 e^{2}}{x + 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________