Optimal. Leaf size=22 \[ -e^x+x+\log \left (e^{-x^2} (-3+x) x^3\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.26, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1593, 6742, 2194, 1620} \begin {gather*} -x^2+x-e^x+\log (3-x)+3 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1593
Rule 1620
Rule 2194
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-9+x+7 x^2-2 x^3+e^x \left (3 x-x^2\right )}{(-3+x) x} \, dx\\ &=\int \left (-e^x+\frac {-9+x+7 x^2-2 x^3}{(-3+x) x}\right ) \, dx\\ &=-\int e^x \, dx+\int \frac {-9+x+7 x^2-2 x^3}{(-3+x) x} \, dx\\ &=-e^x+\int \left (1+\frac {1}{-3+x}+\frac {3}{x}-2 x\right ) \, dx\\ &=-e^x+x-x^2+\log (3-x)+3 \log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.07, size = 22, normalized size = 1.00 \begin {gather*} -e^x+x-x^2+\log (3-x)+3 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 19, normalized size = 0.86 \begin {gather*} -x^{2} + x - e^{x} + \log \left (x - 3\right ) + 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 19, normalized size = 0.86 \begin {gather*} -x^{2} + x - e^{x} + \log \left (x - 3\right ) + 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.30, size = 20, normalized size = 0.91
method | result | size |
default | \(\ln \left (x -3\right )+3 \ln \relax (x )+x -x^{2}-{\mathrm e}^{x}\) | \(20\) |
norman | \(\ln \left (x -3\right )+3 \ln \relax (x )+x -x^{2}-{\mathrm e}^{x}\) | \(20\) |
risch | \(\ln \left (x -3\right )+3 \ln \relax (x )+x -x^{2}-{\mathrm e}^{x}\) | \(20\) |
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*} -x^{2} - 3 \, e^{3} E_{1}\left (-x + 3\right ) + x - \frac {x e^{x}}{x - 3} - 3 \, \int \frac {e^{x}}{x^{2} - 6 \, x + 9}\,{d x} + \log \left (x - 3\right ) + 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 19, normalized size = 0.86 \begin {gather*} x+\ln \left (x-3\right )-{\mathrm {e}}^x+3\,\ln \relax (x)-x^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.15, size = 17, normalized size = 0.77 \begin {gather*} - x^{2} + x - e^{x} + 3 \log {\relax (x )} + \log {\left (x - 3 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________