Optimal. Leaf size=27 \[ x (4+\log (2))+x^2 \log \left (-12+e^{\frac {4 x}{4-x}}+x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 8.45, 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 = {6874, 6820,
712, 2631, 45} \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 45
Rule 712
Rule 2631
Rule 6820
Rule 6874
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.18, 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]
________________________________________________________________________________________
Maple [A]
time = 2.62, 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 \left (2\right )\) | \(26\) |
norman | \(\frac {\left (4+\ln \left (2\right )\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 \left (2\right )}{x -4}\) | \(56\) |
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. 62 vs.
\(2 (24) = 48\).
time = 0.55, size = 62, normalized size = 2.30 \begin {gather*} -\frac {4 \, x^{3} - x^{2} {\left (\log \left (2\right ) + 4\right )} + 4 \, x {\left (\log \left (2\right ) - 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]
________________________________________________________________________________________
Fricas [A]
time = 0.36, 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 \left (2\right ) + 4 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.23, size = 24, normalized size = 0.89 \begin {gather*} x^{2} \log {\left (x - 12 + e^{- \frac {4 x}{x - 4}} \right )} + x \left (\log {\left (2 \right )} + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.65, 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 \left (2\right ) + 4 \, x \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 \left (2\right )+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]
________________________________________________________________________________________