Optimal. Leaf size=28 \[ \frac {\log (4)+\frac {2 (16+x-\log (4-x))}{e^2 x^2}}{-2+x} \]
________________________________________________________________________________________
Rubi [B] time = 0.85, antiderivative size = 89, normalized size of antiderivative = 3.18, number of steps used = 25, number of rules used = 11, integrand size = 74, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {12, 6741, 6742, 44, 88, 72, 2418, 2395, 36, 31, 29} \begin {gather*} -\frac {16}{e^2 x^2}+\frac {\log (4-x)}{e^2 x^2}-\frac {9}{e^2 (2-x)}-\frac {9}{e^2 x}+\frac {\log (4-x)}{2 e^2 (2-x)}+\frac {\log (4-x)}{2 e^2 x}-\frac {\log (4)}{2-x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 29
Rule 31
Rule 36
Rule 44
Rule 72
Rule 88
Rule 2395
Rule 2418
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \frac {-512+500 x-78 x^2-4 x^3+e^2 \left (4 x^3-x^4\right ) \log (4)+\left (32-32 x+6 x^2\right ) \log (4-x)}{-16 x^3+20 x^4-8 x^5+x^6} \, dx}{e^2}\\ &=\frac {\int \frac {512-500 x+78 x^2+4 x^3-e^2 \left (4 x^3-x^4\right ) \log (4)-\left (32-32 x+6 x^2\right ) \log (4-x)}{(2-x)^2 (4-x) x^3} \, dx}{e^2}\\ &=\frac {\int \left (-\frac {4}{(-4+x) (-2+x)^2}-\frac {512}{(-4+x) (-2+x)^2 x^3}+\frac {500}{(-4+x) (-2+x)^2 x^2}-\frac {78}{(-4+x) (-2+x)^2 x}-\frac {e^2 \log (4)}{(-2+x)^2}+\frac {2 (-4+3 x) \log (4-x)}{(-2+x)^2 x^3}\right ) \, dx}{e^2}\\ &=-\frac {\log (4)}{2-x}+\frac {2 \int \frac {(-4+3 x) \log (4-x)}{(-2+x)^2 x^3} \, dx}{e^2}-\frac {4 \int \frac {1}{(-4+x) (-2+x)^2} \, dx}{e^2}-\frac {78 \int \frac {1}{(-4+x) (-2+x)^2 x} \, dx}{e^2}+\frac {500 \int \frac {1}{(-4+x) (-2+x)^2 x^2} \, dx}{e^2}-\frac {512 \int \frac {1}{(-4+x) (-2+x)^2 x^3} \, dx}{e^2}\\ &=-\frac {\log (4)}{2-x}+\frac {2 \int \left (\frac {\log (4-x)}{4 (-2+x)^2}-\frac {\log (4-x)}{x^3}-\frac {\log (4-x)}{4 x^2}\right ) \, dx}{e^2}-\frac {4 \int \left (\frac {1}{4 (-4+x)}-\frac {1}{2 (-2+x)^2}-\frac {1}{4 (-2+x)}\right ) \, dx}{e^2}-\frac {78 \int \left (\frac {1}{16 (-4+x)}-\frac {1}{4 (-2+x)^2}-\frac {1}{16 x}\right ) \, dx}{e^2}+\frac {500 \int \left (\frac {1}{64 (-4+x)}-\frac {1}{8 (-2+x)^2}+\frac {1}{16 (-2+x)}-\frac {1}{16 x^2}-\frac {5}{64 x}\right ) \, dx}{e^2}-\frac {512 \int \left (\frac {1}{256 (-4+x)}-\frac {1}{16 (-2+x)^2}+\frac {1}{16 (-2+x)}-\frac {1}{16 x^3}-\frac {5}{64 x^2}-\frac {17}{256 x}\right ) \, dx}{e^2}\\ &=-\frac {9}{e^2 (2-x)}-\frac {16}{e^2 x^2}-\frac {35}{4 e^2 x}-\frac {\log (4)}{2-x}+\frac {\log (2-x)}{4 e^2}-\frac {\log (4-x)}{16 e^2}-\frac {3 \log (x)}{16 e^2}+\frac {\int \frac {\log (4-x)}{(-2+x)^2} \, dx}{2 e^2}-\frac {\int \frac {\log (4-x)}{x^2} \, dx}{2 e^2}-\frac {2 \int \frac {\log (4-x)}{x^3} \, dx}{e^2}\\ &=-\frac {9}{e^2 (2-x)}-\frac {16}{e^2 x^2}-\frac {35}{4 e^2 x}-\frac {\log (4)}{2-x}+\frac {\log (2-x)}{4 e^2}-\frac {\log (4-x)}{16 e^2}+\frac {\log (4-x)}{2 e^2 (2-x)}+\frac {\log (4-x)}{e^2 x^2}+\frac {\log (4-x)}{2 e^2 x}-\frac {3 \log (x)}{16 e^2}-\frac {\int \frac {1}{(4-x) (-2+x)} \, dx}{2 e^2}+\frac {\int \frac {1}{(4-x) x} \, dx}{2 e^2}+\frac {\int \frac {1}{(4-x) x^2} \, dx}{e^2}\\ &=-\frac {9}{e^2 (2-x)}-\frac {16}{e^2 x^2}-\frac {35}{4 e^2 x}-\frac {\log (4)}{2-x}+\frac {\log (2-x)}{4 e^2}-\frac {\log (4-x)}{16 e^2}+\frac {\log (4-x)}{2 e^2 (2-x)}+\frac {\log (4-x)}{e^2 x^2}+\frac {\log (4-x)}{2 e^2 x}-\frac {3 \log (x)}{16 e^2}+\frac {\int \frac {1}{4-x} \, dx}{8 e^2}+\frac {\int \frac {1}{x} \, dx}{8 e^2}-\frac {\int \frac {1}{4-x} \, dx}{4 e^2}-\frac {\int \frac {1}{-2+x} \, dx}{4 e^2}+\frac {\int \left (-\frac {1}{16 (-4+x)}+\frac {1}{4 x^2}+\frac {1}{16 x}\right ) \, dx}{e^2}\\ &=-\frac {9}{e^2 (2-x)}-\frac {16}{e^2 x^2}-\frac {9}{e^2 x}-\frac {\log (4)}{2-x}+\frac {\log (4-x)}{2 e^2 (2-x)}+\frac {\log (4-x)}{e^2 x^2}+\frac {\log (4-x)}{2 e^2 x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] time = 0.16, size = 87, normalized size = 3.11 \begin {gather*} \frac {128+8 x+2 (-2+x) x^2 \tanh ^{-1}(3-x)+4 e^2 x^2 \log (4)+(-2+x) x^2 \log (2-x)-8 \log (4-x)+2 x^2 \log (4-x)-x^3 \log (4-x)}{4 e^2 (-2+x) x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 34, normalized size = 1.21 \begin {gather*} \frac {2 \, {\left (x^{2} e^{2} \log \relax (2) + x - \log \left (-x + 4\right ) + 16\right )} e^{\left (-2\right )}}{x^{3} - 2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 34, normalized size = 1.21 \begin {gather*} \frac {2 \, {\left (x^{2} e^{2} \log \relax (2) + x - \log \left (-x + 4\right ) + 16\right )} e^{\left (-2\right )}}{x^{3} - 2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.13, size = 43, normalized size = 1.54
method | result | size |
norman | \(\frac {2 x^{2} \ln \relax (2)+32 \,{\mathrm e}^{-2}+2 x \,{\mathrm e}^{-2}-2 \,{\mathrm e}^{-2} \ln \left (-x +4\right )}{\left (x -2\right ) x^{2}}\) | \(43\) |
risch | \(-\frac {2 \,{\mathrm e}^{-2} \ln \left (-x +4\right )}{x^{2} \left (x -2\right )}+\frac {2 \,{\mathrm e}^{-2} \left (x^{2} {\mathrm e}^{2} \ln \relax (2)+x +16\right )}{\left (x -2\right ) x^{2}}\) | \(43\) |
default | \({\mathrm e}^{-2} \left (-\frac {2 \,{\mathrm e}^{2} \ln \relax (2)}{2-x}-\frac {9}{x}-\frac {\ln \left (-x +4\right ) \left (-x +4\right ) \left (-x -4\right )}{16 x^{2}}+\frac {\ln \left (-x +4\right ) \left (-x +4\right )}{8 x}+\frac {\left (-x +4\right ) \ln \left (-x +4\right )}{-4 x +8}-\frac {9}{2-x}-\frac {\ln \left (-x +4\right )}{16}-\frac {16}{x^{2}}\right )\) | \(104\) |
derivativedivides | \(-{\mathrm e}^{-2} \left (\frac {2 \,{\mathrm e}^{2} \ln \relax (2)}{2-x}+\frac {9}{x}+\frac {\ln \left (-x +4\right ) \left (-x +4\right ) \left (-x -4\right )}{16 x^{2}}-\frac {\ln \left (-x +4\right ) \left (-x +4\right )}{8 x}-\frac {\ln \left (-x +4\right ) \left (-x +4\right )}{4 \left (2-x \right )}+\frac {9}{2-x}+\frac {\ln \left (-x +4\right )}{16}+\frac {16}{x^{2}}\right )\) | \(105\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.51, size = 78, normalized size = 2.79 \begin {gather*} 2 \, {\left (\frac {{\left (e^{2} \log \relax (2) + 36\right )} x^{2} + {\left (x^{3} - 2 \, x^{2} - 1\right )} \log \left (-x + 4\right ) - 31 \, x}{x^{3} - 2 \, x^{2}} - \frac {4 \, {\left (9 \, x^{2} - 8 \, x - 4\right )}}{x^{3} - 2 \, x^{2}} - \log \left (x - 4\right )\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.42, size = 49, normalized size = 1.75 \begin {gather*} -\frac {\frac {{\mathrm {e}}^{-2}\,\left (4\,\ln \left (4-x\right )-64\right )}{2}-2\,x\,{\mathrm {e}}^{-2}+x^2\,\left ({\mathrm {e}}^{-2}-{\mathrm {e}}^{-2}\,\left (2\,{\mathrm {e}}^2\,\ln \relax (2)+1\right )\right )}{x^2\,\left (x-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.81, size = 56, normalized size = 2.00 \begin {gather*} - \frac {- 2 x^{2} e^{2} \log {\relax (2 )} - 2 x - 32}{x^{3} e^{2} - 2 x^{2} e^{2}} - \frac {2 \log {\left (4 - x \right )}}{x^{3} e^{2} - 2 x^{2} e^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________