Optimal. Leaf size=31 \[ -x+\log (x)+\frac {\left (-5+e^{5-x}\right ) x^2 (4+\log (x))}{3 (-3+x)} \]
________________________________________________________________________________________
Rubi [B] time = 1.93, antiderivative size = 115, normalized size of antiderivative = 3.71, number of steps used = 39, number of rules used = 18, integrand size = 94, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1594, 27, 12, 6742, 44, 43, 2351, 2314, 31, 2316, 2315, 2295, 2199, 2194, 2177, 2178, 2176, 2554} \begin {gather*} \frac {4}{3} e^{5-x} x-\frac {23 x}{3}+4 e^{5-x}-\frac {12 e^{5-x}}{3-x}+\frac {60}{3-x}+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}-\frac {5}{3} x \log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}+\log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 27
Rule 31
Rule 43
Rule 44
Rule 1594
Rule 2176
Rule 2177
Rule 2178
Rule 2194
Rule 2199
Rule 2295
Rule 2314
Rule 2315
Rule 2316
Rule 2351
Rule 2554
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {27-45 x+156 x^2-28 x^3+e^{5-x} \left (-27 x^2+17 x^3-4 x^4\right )+\left (30 x^2-5 x^3+e^{5-x} \left (-6 x^2+4 x^3-x^4\right )\right ) \log (x)}{x \left (27-18 x+3 x^2\right )} \, dx\\ &=\int \frac {27-45 x+156 x^2-28 x^3+e^{5-x} \left (-27 x^2+17 x^3-4 x^4\right )+\left (30 x^2-5 x^3+e^{5-x} \left (-6 x^2+4 x^3-x^4\right )\right ) \log (x)}{3 (-3+x)^2 x} \, dx\\ &=\frac {1}{3} \int \frac {27-45 x+156 x^2-28 x^3+e^{5-x} \left (-27 x^2+17 x^3-4 x^4\right )+\left (30 x^2-5 x^3+e^{5-x} \left (-6 x^2+4 x^3-x^4\right )\right ) \log (x)}{(-3+x)^2 x} \, dx\\ &=\frac {1}{3} \int \left (-\frac {45}{(-3+x)^2}+\frac {27}{(-3+x)^2 x}+\frac {156 x}{(-3+x)^2}-\frac {28 x^2}{(-3+x)^2}+\frac {30 x \log (x)}{(-3+x)^2}-\frac {5 x^2 \log (x)}{(-3+x)^2}-\frac {e^{5-x} x \left (27-17 x+4 x^2+6 \log (x)-4 x \log (x)+x^2 \log (x)\right )}{(-3+x)^2}\right ) \, dx\\ &=-\frac {15}{3-x}-\frac {1}{3} \int \frac {e^{5-x} x \left (27-17 x+4 x^2+6 \log (x)-4 x \log (x)+x^2 \log (x)\right )}{(-3+x)^2} \, dx-\frac {5}{3} \int \frac {x^2 \log (x)}{(-3+x)^2} \, dx+9 \int \frac {1}{(-3+x)^2 x} \, dx-\frac {28}{3} \int \frac {x^2}{(-3+x)^2} \, dx+10 \int \frac {x \log (x)}{(-3+x)^2} \, dx+52 \int \frac {x}{(-3+x)^2} \, dx\\ &=-\frac {15}{3-x}-\frac {1}{3} \int \left (\frac {e^{5-x} x \left (27-17 x+4 x^2\right )}{(-3+x)^2}+\frac {e^{5-x} x \left (6-4 x+x^2\right ) \log (x)}{(-3+x)^2}\right ) \, dx-\frac {5}{3} \int \left (\log (x)+\frac {9 \log (x)}{(-3+x)^2}+\frac {6 \log (x)}{-3+x}\right ) \, dx+9 \int \left (\frac {1}{3 (-3+x)^2}-\frac {1}{9 (-3+x)}+\frac {1}{9 x}\right ) \, dx-\frac {28}{3} \int \left (1+\frac {9}{(-3+x)^2}+\frac {6}{-3+x}\right ) \, dx+10 \int \left (\frac {3 \log (x)}{(-3+x)^2}+\frac {\log (x)}{-3+x}\right ) \, dx+52 \int \left (\frac {3}{(-3+x)^2}+\frac {1}{-3+x}\right ) \, dx\\ &=\frac {60}{3-x}-\frac {28 x}{3}-5 \log (3-x)+\log (x)-\frac {1}{3} \int \frac {e^{5-x} x \left (27-17 x+4 x^2\right )}{(-3+x)^2} \, dx-\frac {1}{3} \int \frac {e^{5-x} x \left (6-4 x+x^2\right ) \log (x)}{(-3+x)^2} \, dx-\frac {5}{3} \int \log (x) \, dx-15 \int \frac {\log (x)}{(-3+x)^2} \, dx+30 \int \frac {\log (x)}{(-3+x)^2} \, dx\\ &=\frac {60}{3-x}-\frac {23 x}{3}-5 \log (3-x)+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}+\frac {1}{3} \int \frac {e^{5-x} x}{3-x} \, dx-\frac {1}{3} \int \left (7 e^{5-x}+\frac {36 e^{5-x}}{(-3+x)^2}+\frac {33 e^{5-x}}{-3+x}+4 e^{5-x} x\right ) \, dx-5 \int \frac {1}{-3+x} \, dx+10 \int \frac {1}{-3+x} \, dx\\ &=\frac {60}{3-x}-\frac {23 x}{3}+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}+\frac {1}{3} \int \left (-e^{5-x}-\frac {3 e^{5-x}}{-3+x}\right ) \, dx-\frac {4}{3} \int e^{5-x} x \, dx-\frac {7}{3} \int e^{5-x} \, dx-11 \int \frac {e^{5-x}}{-3+x} \, dx-12 \int \frac {e^{5-x}}{(-3+x)^2} \, dx\\ &=\frac {7 e^{5-x}}{3}+\frac {60}{3-x}-\frac {12 e^{5-x}}{3-x}-\frac {23 x}{3}+\frac {4}{3} e^{5-x} x-11 e^2 \text {Ei}(3-x)+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}-\frac {1}{3} \int e^{5-x} \, dx-\frac {4}{3} \int e^{5-x} \, dx+12 \int \frac {e^{5-x}}{-3+x} \, dx-\int \frac {e^{5-x}}{-3+x} \, dx\\ &=4 e^{5-x}+\frac {60}{3-x}-\frac {12 e^{5-x}}{3-x}-\frac {23 x}{3}+\frac {4}{3} e^{5-x} x+\log (x)+e^{5-x} \log (x)-\frac {3 e^{5-x} \log (x)}{3-x}-\frac {5}{3} x \log (x)+\frac {1}{3} e^{5-x} x \log (x)+\frac {5 x \log (x)}{3-x}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.66, size = 62, normalized size = 2.00 \begin {gather*} \frac {e^{-x} \left (4 e^5 x^2+e^x \left (-180+69 x-23 x^2\right )+\left (e^5 x^2+e^x \left (-9+3 x-5 x^2\right )\right ) \log (x)\right )}{3 (-3+x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.97, size = 51, normalized size = 1.65 \begin {gather*} \frac {4 \, x^{2} e^{\left (-x + 5\right )} - 23 \, x^{2} + {\left (x^{2} e^{\left (-x + 5\right )} - 5 \, x^{2} + 3 \, x - 9\right )} \log \relax (x) + 69 \, x - 180}{3 \, {\left (x - 3\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 56, normalized size = 1.81 \begin {gather*} \frac {x^{2} e^{\left (-x + 5\right )} \log \relax (x) + 4 \, x^{2} e^{\left (-x + 5\right )} - 5 \, x^{2} \log \relax (x) - 23 \, x^{2} + 3 \, x \log \relax (x) + 69 \, x - 9 \, \log \relax (x) - 180}{3 \, {\left (x - 3\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 48, normalized size = 1.55
method | result | size |
norman | \(\frac {-\frac {23 x^{2}}{3}+\frac {4 x^{2} {\mathrm e}^{5-x}}{3}-\frac {5 x^{2} \ln \relax (x )}{3}+9+\frac {\ln \relax (x ) {\mathrm e}^{5-x} x^{2}}{3}}{x -3}+\ln \relax (x )\) | \(48\) |
default | \(\frac {\ln \relax (x ) {\mathrm e}^{5-x} x^{2}+4 x^{2} {\mathrm e}^{5-x}}{3 x -9}-\frac {23 x}{3}+\ln \relax (x )-\frac {60}{x -3}-\frac {5 x \ln \relax (x )}{3}-\frac {5 \ln \relax (x ) x}{x -3}\) | \(60\) |
risch | \(\frac {\left (x^{2} {\mathrm e}^{5-x}-5 x^{2}+15 x -45\right ) \ln \relax (x )}{3 x -9}-\frac {-4 x^{2} {\mathrm e}^{5-x}+12 x \ln \relax (x )+23 x^{2}-36 \ln \relax (x )-69 x +180}{3 \left (x -3\right )}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 64, normalized size = 2.06 \begin {gather*} -\frac {28}{3} \, x + \frac {5 \, x^{2} + {\left (x^{2} e^{5} \log \relax (x) + 4 \, x^{2} e^{5}\right )} e^{\left (-x\right )} - 5 \, {\left (x^{2} - 3 \, x + 9\right )} \log \relax (x) - 15 \, x}{3 \, {\left (x - 3\right )}} - \frac {60}{x - 3} - 4 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.10, size = 64, normalized size = 2.06 \begin {gather*} \ln \relax (x)-\frac {23\,x}{3}-\frac {60}{x-3}+\frac {4\,x^2\,{\mathrm {e}}^{5-x}}{3\,\left (x-3\right )}-\frac {5\,x^2\,\ln \relax (x)}{3\,\left (x-3\right )}+\frac {x^2\,{\mathrm {e}}^{5-x}\,\ln \relax (x)}{3\,\left (x-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.45, size = 54, normalized size = 1.74 \begin {gather*} - \frac {23 x}{3} - 4 \log {\relax (x )} + \frac {\left (x^{2} \log {\relax (x )} + 4 x^{2}\right ) e^{5 - x}}{3 x - 9} + \frac {\left (- 5 x^{2} + 15 x - 45\right ) \log {\relax (x )}}{3 x - 9} - \frac {60}{x - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________