Optimal. Leaf size=26 \[ e^{4/x}+x+\frac {x^4 \log ^2\left (x^2\right )}{4-x} \]
________________________________________________________________________________________
Rubi [B] time = 0.66, antiderivative size = 56, normalized size of antiderivative = 2.15, number of steps used = 23, number of rules used = 14, integrand size = 83, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.169, Rules used = {1594, 27, 6688, 2209, 43, 2351, 2295, 2317, 2391, 2304, 2357, 2296, 2318, 2305} \begin {gather*} -4 x^2 \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-16 x \log ^2\left (x^2\right )+x^3 \left (-\log ^2\left (x^2\right )\right )+x+e^{4/x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 27
Rule 43
Rule 1594
Rule 2209
Rule 2295
Rule 2296
Rule 2304
Rule 2305
Rule 2317
Rule 2318
Rule 2351
Rule 2357
Rule 2391
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {16 x^2-8 x^3+x^4+e^{4/x} \left (-64+32 x-4 x^2\right )+\left (16 x^5-4 x^6\right ) \log \left (x^2\right )+\left (16 x^5-3 x^6\right ) \log ^2\left (x^2\right )}{x^2 \left (16-8 x+x^2\right )} \, dx\\ &=\int \frac {16 x^2-8 x^3+x^4+e^{4/x} \left (-64+32 x-4 x^2\right )+\left (16 x^5-4 x^6\right ) \log \left (x^2\right )+\left (16 x^5-3 x^6\right ) \log ^2\left (x^2\right )}{(-4+x)^2 x^2} \, dx\\ &=\int \left (1-\frac {4 e^{4/x}}{x^2}-\frac {4 x^3 \log \left (x^2\right )}{-4+x}+\frac {(16-3 x) x^3 \log ^2\left (x^2\right )}{(-4+x)^2}\right ) \, dx\\ &=x-4 \int \frac {e^{4/x}}{x^2} \, dx-4 \int \frac {x^3 \log \left (x^2\right )}{-4+x} \, dx+\int \frac {(16-3 x) x^3 \log ^2\left (x^2\right )}{(-4+x)^2} \, dx\\ &=e^{4/x}+x-4 \int \left (16 \log \left (x^2\right )+\frac {64 \log \left (x^2\right )}{-4+x}+4 x \log \left (x^2\right )+x^2 \log \left (x^2\right )\right ) \, dx+\int \left (-16 \log ^2\left (x^2\right )+\frac {256 \log ^2\left (x^2\right )}{(-4+x)^2}-8 x \log ^2\left (x^2\right )-3 x^2 \log ^2\left (x^2\right )\right ) \, dx\\ &=e^{4/x}+x-3 \int x^2 \log ^2\left (x^2\right ) \, dx-4 \int x^2 \log \left (x^2\right ) \, dx-8 \int x \log ^2\left (x^2\right ) \, dx-16 \int x \log \left (x^2\right ) \, dx-16 \int \log ^2\left (x^2\right ) \, dx-64 \int \log \left (x^2\right ) \, dx-256 \int \frac {\log \left (x^2\right )}{-4+x} \, dx+256 \int \frac {\log ^2\left (x^2\right )}{(-4+x)^2} \, dx\\ &=e^{4/x}+129 x+8 x^2+\frac {8 x^3}{9}-64 x \log \left (x^2\right )-8 x^2 \log \left (x^2\right )-\frac {4}{3} x^3 \log \left (x^2\right )-256 \log \left (1-\frac {x}{4}\right ) \log \left (x^2\right )-16 x \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-4 x^2 \log ^2\left (x^2\right )-x^3 \log ^2\left (x^2\right )+4 \int x^2 \log \left (x^2\right ) \, dx+16 \int x \log \left (x^2\right ) \, dx+64 \int \log \left (x^2\right ) \, dx+256 \int \frac {\log \left (x^2\right )}{-4+x} \, dx+512 \int \frac {\log \left (1-\frac {x}{4}\right )}{x} \, dx\\ &=e^{4/x}+x-16 x \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-4 x^2 \log ^2\left (x^2\right )-x^3 \log ^2\left (x^2\right )-512 \text {Li}_2\left (\frac {x}{4}\right )-512 \int \frac {\log \left (1-\frac {x}{4}\right )}{x} \, dx\\ &=e^{4/x}+x-16 x \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-4 x^2 \log ^2\left (x^2\right )-x^3 \log ^2\left (x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 25, normalized size = 0.96 \begin {gather*} e^{4/x}+x-\frac {x^4 \log ^2\left (x^2\right )}{-4+x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.99, size = 37, normalized size = 1.42 \begin {gather*} -\frac {x^{4} \log \left (x^{2}\right )^{2} - x^{2} - {\left (x - 4\right )} e^{\frac {4}{x}} + 4 \, x}{x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 36, normalized size = 1.38 \begin {gather*} -{\left (x^{3} + 4 \, x^{2} + 16 \, x + \frac {256}{x - 4} + 64\right )} \log \left (x^{2}\right )^{2} + x + e^{\frac {4}{x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.32, size = 599, normalized size = 23.04
method | result | size |
risch | \(-\frac {4 x^{4} \ln \relax (x )^{2}}{x -4}+\frac {2 i \pi \,\mathrm {csgn}\left (i x^{2}\right ) \left (x^{4} \mathrm {csgn}\left (i x \right )^{2}-2 x^{4} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )+x^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}-64 x \mathrm {csgn}\left (i x \right )^{2}+128 x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )-64 x \mathrm {csgn}\left (i x^{2}\right )^{2}+256 \mathrm {csgn}\left (i x \right )^{2}-512 \,\mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (i x \right )+256 \mathrm {csgn}\left (i x^{2}\right )^{2}\right ) \ln \relax (x )}{x -4}+\frac {-16 x -16 \,{\mathrm e}^{\frac {4}{x}}+4 x^{2}+512 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right ) x +6 \pi ^{2} x^{4} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}-4 \pi ^{2} x^{4} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}-2048 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x^{2}\right )^{3}-64 \pi ^{2} x \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}+256 \pi ^{2} x \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}-384 \pi ^{2} x \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}+256 \pi ^{2} x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}+\pi ^{2} x^{4} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}-4 \pi ^{2} x^{4} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 x \,{\mathrm e}^{\frac {4}{x}}+4096 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-1024 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2} x +256 \pi ^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}+256 \pi ^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}-1024 \pi ^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}+1536 \pi ^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}-1024 \pi ^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}+\pi ^{2} x^{4} \mathrm {csgn}\left (i x^{2}\right )^{6}-64 \pi ^{2} x \mathrm {csgn}\left (i x^{2}\right )^{6}+512 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x^{2}\right )^{3} x -2048 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{4 x -16}\) | \(599\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 30, normalized size = 1.15 \begin {gather*} x - \frac {4 \, x^{4} \log \relax (x)^{2} - {\left (x - 4\right )} e^{\frac {4}{x}}}{x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.65, size = 24, normalized size = 0.92 \begin {gather*} x+{\mathrm {e}}^{4/x}-\frac {x^4\,{\ln \left (x^2\right )}^2}{x-4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.41, size = 19, normalized size = 0.73 \begin {gather*} - \frac {x^{4} \log {\left (x^{2} \right )}^{2}}{x - 4} + x + e^{\frac {4}{x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________