Optimal. Leaf size=27 \[ x (4+\log (2))+x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right ) \]
________________________________________________________________________________________
Rubi [A] time = 7.97, antiderivative size = 30, normalized size of antiderivative = 1.11, number of steps used = 20, number of rules used = 5, integrand size = 160, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.031, Rules used = {6742, 6688, 698, 2551, 43} \begin {gather*} x^2 \log \left (x+e^{\frac {4 x}{4-x}}-12\right )-12 x+x (16+\log (2)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 698
Rule 2551
Rule 6688
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {x^2 \left (208-24 x+x^2\right )}{(-12+x) (-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}+\frac {-x^2+48 \left (1+\frac {\log (2)}{4}\right )-4 x \left (1+\frac {\log (2)}{4}\right )+24 x \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right )-2 x^2 \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right )}{12-x}\right ) \, dx\\ &=-\int \frac {x^2 \left (208-24 x+x^2\right )}{(-12+x) (-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx+\int \frac {-x^2+48 \left (1+\frac {\log (2)}{4}\right )-4 x \left (1+\frac {\log (2)}{4}\right )+24 x \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right )-2 x^2 \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right )}{12-x} \, dx\\ &=-\int \left (-\frac {4}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x}+\frac {144}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}-\frac {256}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}-\frac {128}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}+\frac {x}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x}\right ) \, dx+\int \frac {-x^2+12 (4+\log (2))-x (4+\log (2))-2 (-12+x) x \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right )}{12-x} \, dx\\ &=4 \int \frac {1}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x} \, dx+128 \int \frac {1}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-144 \int \frac {1}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx+256 \int \frac {1}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-\int \frac {x}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x} \, dx+\int \left (\frac {-x^2+12 (4+\log (2))-x (4+\log (2))}{12-x}+2 x \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right )\right ) \, dx\\ &=2 \int x \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right ) \, dx+4 \int \frac {1}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx+128 \int \frac {1}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-144 \int \frac {1}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx+256 \int \frac {1}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-\int \frac {x}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx+\int \frac {-x^2+12 (4+\log (2))-x (4+\log (2))}{12-x} \, dx\\ &=x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right )+4 \int \frac {1}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx+128 \int \frac {1}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-144 \int \frac {1}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx+256 \int \frac {1}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-\int \frac {x}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx-\int \frac {\left (16+e^{\frac {4 x}{-4+x}} (-4+x)^2\right ) x^2}{\left (1+e^{\frac {4 x}{-4+x}} (-12+x)\right ) (4-x)^2} \, dx+\int \left (16-\frac {144}{12-x}+x+\log (2)\right ) \, dx\\ &=\frac {x^2}{2}+x (16+\log (2))+144 \log (12-x)+x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right )+4 \int \frac {1}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx+128 \int \frac {1}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-144 \int \frac {1}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx+256 \int \frac {1}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-\int \frac {x}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx-\int \left (\frac {x^2}{-12+x}-\frac {x^2 \left (208-24 x+x^2\right )}{(-12+x) (-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}\right ) \, dx\\ &=\frac {x^2}{2}+x (16+\log (2))+144 \log (12-x)+x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right )+4 \int \frac {1}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx+128 \int \frac {1}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-144 \int \frac {1}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx+256 \int \frac {1}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-\int \frac {x}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx-\int \frac {x^2}{-12+x} \, dx+\int \frac {x^2 \left (208-24 x+x^2\right )}{(-12+x) (-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx\\ &=\frac {x^2}{2}+x (16+\log (2))+144 \log (12-x)+x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right )+4 \int \frac {1}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx+128 \int \frac {1}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-144 \int \frac {1}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx+256 \int \frac {1}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )} \, dx-\int \frac {x}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx-\int \left (12+\frac {144}{-12+x}+x\right ) \, dx+\int \left (-\frac {4}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x}+\frac {144}{(-12+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}-\frac {256}{(-4+x)^2 \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}-\frac {128}{(-4+x) \left (1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x\right )}+\frac {x}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x}\right ) \, dx\\ &=-12 x+x (16+\log (2))+x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right )+4 \int \frac {1}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx-4 \int \frac {1}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x} \, dx-\int \frac {x}{1+e^{\frac {4 x}{-4+x}} (-12+x)} \, dx+\int \frac {x}{1-12 e^{\frac {4 x}{-4+x}}+e^{\frac {4 x}{-4+x}} x} \, dx\\ &=-12 x+x (16+\log (2))+x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.17, size = 22, normalized size = 0.81 \begin {gather*} x \left (4+\log (2)+x \log \left (-12+e^{-\frac {4 x}{-4+x}}+x\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 25, normalized size = 0.93 \begin {gather*} x^{2} \log \left (x + e^{\left (-\frac {4 \, x}{x - 4}\right )} - 12\right ) + x \log \relax (2) + 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.68, size = 25, normalized size = 0.93 \begin {gather*} x^{2} \log \left (x + e^{\left (-\frac {4 \, x}{x - 4}\right )} - 12\right ) + x \log \relax (2) + 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 26, normalized size = 0.96
method | result | size |
risch | \(\ln \left ({\mathrm e}^{-\frac {4 x}{x -4}}+x -12\right ) x^{2}+4 x +x \ln \relax (2)\) | \(26\) |
norman | \(\frac {\left (4+\ln \relax (2)\right ) x^{2}+\ln \left ({\mathrm e}^{-\frac {4 x}{x -4}}+x -12\right ) x^{3}-64-4 \ln \left ({\mathrm e}^{-\frac {4 x}{x -4}}+x -12\right ) x^{2}-16 \ln \relax (2)}{x -4}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.54, size = 62, normalized size = 2.30 \begin {gather*} -\frac {4 \, x^{3} - x^{2} {\left (\log \relax (2) + 4\right )} + 4 \, x {\left (\log \relax (2) - 12\right )} - {\left (x^{3} - 4 \, x^{2}\right )} \log \left ({\left (x e^{4} - 12 \, e^{4}\right )} e^{\left (\frac {16}{x - 4}\right )} + 1\right ) + 256}{x - 4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.26, size = 38, normalized size = 1.41 \begin {gather*} x\,\left (\ln \relax (2)+4\right )-\frac {\ln \left (x+{\mathrm {e}}^{-\frac {4\,x}{x-4}}-12\right )\,\left (4\,x^2-x^3\right )}{x-4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.65, size = 24, normalized size = 0.89 \begin {gather*} x^{2} \log {\left (x - 12 + e^{- \frac {4 x}{x - 4}} \right )} + x \left (\log {\relax (2 )} + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________