Optimal. Leaf size=25 \[ \log (3) \left (-3+e^x-\frac {4 e^2}{x}+x-\log (3-x)\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 31, normalized size of antiderivative = 1.24, number of steps used = 8, number of rules used = 5, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {12, 1593, 6688, 2194, 43} \begin {gather*} x \log (3)-\log (3) \log (3-x)+e^x \log (3)-\frac {4 e^2 \log (3)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 1593
Rule 2194
Rule 6688
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \frac {e^{2+x} \left (-3 x^2+x^3\right ) \log (3)+\left (e^4 (-12+4 x)+e^2 \left (-4 x^2+x^3\right )\right ) \log (3)}{-3 x^2+x^3} \, dx}{e^2}\\ &=\frac {\int \frac {e^{2+x} \left (-3 x^2+x^3\right ) \log (3)+\left (e^4 (-12+4 x)+e^2 \left (-4 x^2+x^3\right )\right ) \log (3)}{(-3+x) x^2} \, dx}{e^2}\\ &=\frac {\int e^2 \left (e^x+\frac {-4+x}{-3+x}+\frac {4 e^2}{x^2}\right ) \log (3) \, dx}{e^2}\\ &=\log (3) \int \left (e^x+\frac {-4+x}{-3+x}+\frac {4 e^2}{x^2}\right ) \, dx\\ &=-\frac {4 e^2 \log (3)}{x}+\log (3) \int e^x \, dx+\log (3) \int \frac {-4+x}{-3+x} \, dx\\ &=e^x \log (3)-\frac {4 e^2 \log (3)}{x}+\log (3) \int \left (1+\frac {1}{3-x}\right ) \, dx\\ &=e^x \log (3)-\frac {4 e^2 \log (3)}{x}+x \log (3)-\log (3) \log (3-x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 22, normalized size = 0.88 \begin {gather*} \log (3) \left (e^x-\frac {4 e^2}{x}+x-\log (-3+x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 42, normalized size = 1.68 \begin {gather*} -\frac {{\left (x e^{2} \log \relax (3) \log \left (x - 3\right ) - x e^{\left (x + 2\right )} \log \relax (3) - {\left (x^{2} e^{2} - 4 \, e^{4}\right )} \log \relax (3)\right )} e^{\left (-2\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 40, normalized size = 1.60 \begin {gather*} \frac {{\left (x^{2} e^{2} \log \relax (3) - x e^{2} \log \relax (3) \log \left (x - 3\right ) + x e^{\left (x + 2\right )} \log \relax (3) - 4 \, e^{4} \log \relax (3)\right )} e^{\left (-2\right )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 28, normalized size = 1.12
method | result | size |
risch | \(x \ln \relax (3)-\frac {4 \,{\mathrm e}^{2} \ln \relax (3)}{x}-\ln \relax (3) \ln \left (x -3\right )+\ln \relax (3) {\mathrm e}^{x}\) | \(28\) |
norman | \(\frac {x^{2} \ln \relax (3)+x \ln \relax (3) {\mathrm e}^{x}-4 \,{\mathrm e}^{-2} {\mathrm e}^{4} \ln \relax (3)}{x}-\ln \relax (3) \ln \left (x -3\right )\) | \(37\) |
default | \({\mathrm e}^{-2} \left (-{\mathrm e}^{2} \ln \relax (3) \ln \left (x -3\right )+x \,{\mathrm e}^{2} \ln \relax (3)+{\mathrm e}^{2} \ln \relax (3) {\mathrm e}^{x}-\frac {4 \,{\mathrm e}^{4} \ln \relax (3)}{x}\right )\) | \(39\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\frac {1}{3} \, {\left (4 \, {\left (\frac {3}{x} + \log \left (x - 3\right ) - \log \relax (x)\right )} e^{4} \log \relax (3) - 4 \, {\left (\log \left (x - 3\right ) - \log \relax (x)\right )} e^{4} \log \relax (3) - 3 \, {\left (x + 3 \, \log \left (x - 3\right )\right )} e^{2} \log \relax (3) - 9 \, e^{5} E_{1}\left (-x + 3\right ) \log \relax (3) + 12 \, e^{2} \log \relax (3) \log \left (x - 3\right ) - 3 \, {\left (\frac {x e^{\left (x + 2\right )}}{x - 3} + 3 \, \int \frac {e^{\left (x + 2\right )}}{x^{2} - 6 \, x + 9}\,{d x}\right )} \log \relax (3)\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.13, size = 27, normalized size = 1.08 \begin {gather*} x\,\ln \relax (3)-\ln \relax (3)\,\left (\ln \left (x-3\right )-{\mathrm {e}}^x\right )-\frac {4\,{\mathrm {e}}^2\,\ln \relax (3)}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.29, size = 29, normalized size = 1.16 \begin {gather*} x \log {\relax (3 )} + e^{x} \log {\relax (3 )} - \log {\relax (3 )} \log {\left (x - 3 \right )} - \frac {4 e^{2} \log {\relax (3 )}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________