Optimal. Leaf size=32 \[ \left (-3+e^{-x} \left (3+\frac {1}{4} \left (-x+x^2+\log (3)\right )\right )\right ) \left (-e^3+\log (x)\right ) \]
________________________________________________________________________________________
Rubi [B] time = 2.14, antiderivative size = 157, normalized size of antiderivative = 4.91, number of steps used = 21, number of rules used = 8, integrand size = 73, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.110, Rules used = {12, 6742, 2199, 2176, 2194, 2178, 2196, 2554} \begin {gather*} -\frac {1}{4} e^{3-x} x^2+\frac {1}{4} e^{-x} x^2 \log (x)-\frac {1}{2} e^{3-x} x+\frac {e^{-x} x}{4}-\frac {1}{4} \left (1-3 e^3\right ) e^{-x} x-\frac {e^{3-x}}{2}-\frac {1}{4} \left (1-3 e^3\right ) e^{-x}-\frac {1}{4} e^{-x} x \log (x)-\frac {1}{4} e^{-x} \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)-3 \log (x)+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2178
Rule 2194
Rule 2196
Rule 2199
Rule 2554
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{4} \int \frac {e^{-x} \left (12-12 e^x-x+x^2+e^3 \left (13 x-3 x^2+x^3\right )+\left (1+e^3 x\right ) \log (3)+\left (-13 x+3 x^2-x^3-x \log (3)\right ) \log (x)\right )}{x} \, dx\\ &=\frac {1}{4} \int \left (-\frac {12}{x}+\frac {e^{-x} \left (\left (1-3 e^3\right ) x^2+e^3 x^3+12 \left (1+\frac {\log (3)}{12}\right )-x \left (1-e^3 (13+\log (3))\right )+3 x^2 \log (x)-x^3 \log (x)-13 x \left (1+\frac {\log (3)}{13}\right ) \log (x)\right )}{x}\right ) \, dx\\ &=-3 \log (x)+\frac {1}{4} \int \frac {e^{-x} \left (\left (1-3 e^3\right ) x^2+e^3 x^3+12 \left (1+\frac {\log (3)}{12}\right )-x \left (1-e^3 (13+\log (3))\right )+3 x^2 \log (x)-x^3 \log (x)-13 x \left (1+\frac {\log (3)}{13}\right ) \log (x)\right )}{x} \, dx\\ &=-3 \log (x)+\frac {1}{4} \int \left (\frac {e^{-x} \left (12+\left (1-3 e^3\right ) x^2+e^3 x^3+\log (3)-x \left (1-e^3 (13+\log (3))\right )\right )}{x}-e^{-x} \left (13-3 x+x^2+\log (3)\right ) \log (x)\right ) \, dx\\ &=-3 \log (x)+\frac {1}{4} \int \frac {e^{-x} \left (12+\left (1-3 e^3\right ) x^2+e^3 x^3+\log (3)-x \left (1-e^3 (13+\log (3))\right )\right )}{x} \, dx-\frac {1}{4} \int e^{-x} \left (13-3 x+x^2+\log (3)\right ) \log (x) \, dx\\ &=-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)+\frac {1}{4} \int \frac {e^{-x} \left (-12+x-x^2-\log (3)\right )}{x} \, dx+\frac {1}{4} \int \left (e^{-x} \left (1-3 e^3\right ) x+e^{3-x} x^2+\frac {e^{-x} (12+\log (3))}{x}+e^{-x} \left (-1+e^3 (13+\log (3))\right )\right ) \, dx\\ &=-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)+\frac {1}{4} \int e^{3-x} x^2 \, dx+\frac {1}{4} \int \left (e^{-x}-e^{-x} x+\frac {e^{-x} (-12-\log (3))}{x}\right ) \, dx+\frac {1}{4} \left (1-3 e^3\right ) \int e^{-x} x \, dx+\frac {1}{4} (12+\log (3)) \int \frac {e^{-x}}{x} \, dx+\frac {1}{4} \left (-1+e^3 (13+\log (3))\right ) \int e^{-x} \, dx\\ &=-\frac {1}{4} e^{-x} \left (1-3 e^3\right ) x-\frac {1}{4} e^{3-x} x^2+\frac {1}{4} \text {Ei}(-x) (12+\log (3))+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right )-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)+\frac {1}{4} \int e^{-x} \, dx-\frac {1}{4} \int e^{-x} x \, dx+\frac {1}{2} \int e^{3-x} x \, dx+\frac {1}{4} \left (1-3 e^3\right ) \int e^{-x} \, dx+\frac {1}{4} (-12-\log (3)) \int \frac {e^{-x}}{x} \, dx\\ &=-\frac {e^{-x}}{4}-\frac {1}{4} e^{-x} \left (1-3 e^3\right )-\frac {1}{2} e^{3-x} x+\frac {e^{-x} x}{4}-\frac {1}{4} e^{-x} \left (1-3 e^3\right ) x-\frac {1}{4} e^{3-x} x^2+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right )-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)-\frac {1}{4} \int e^{-x} \, dx+\frac {1}{2} \int e^{3-x} \, dx\\ &=-\frac {e^{3-x}}{2}-\frac {1}{4} e^{-x} \left (1-3 e^3\right )-\frac {1}{2} e^{3-x} x+\frac {e^{-x} x}{4}-\frac {1}{4} e^{-x} \left (1-3 e^3\right ) x-\frac {1}{4} e^{3-x} x^2+\frac {1}{4} e^{-x} \left (1-e^3 (13+\log (3))\right )-3 \log (x)-\frac {1}{4} e^{-x} \log (x)-\frac {1}{4} e^{-x} x \log (x)+\frac {1}{4} e^{-x} x^2 \log (x)+\frac {1}{4} e^{-x} (13+\log (3)) \log (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 1.84, size = 43, normalized size = 1.34 \begin {gather*} \frac {1}{4} e^{-x} \left (-e^3 \left (12-x+x^2+\log (3)\right )+\left (12-12 e^x-x+x^2+\log (3)\right ) \log (x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 41, normalized size = 1.28 \begin {gather*} -\frac {1}{4} \, {\left ({\left (x^{2} - x + 12\right )} e^{3} + e^{3} \log \relax (3) - {\left (x^{2} - x - 12 \, e^{x} + \log \relax (3) + 12\right )} \log \relax (x)\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.19, size = 81, normalized size = 2.53 \begin {gather*} \frac {1}{4} \, x^{2} e^{\left (-x\right )} \log \relax (x) - \frac {1}{4} \, x^{2} e^{\left (-x + 3\right )} - \frac {1}{4} \, x e^{\left (-x\right )} \log \relax (x) + \frac {1}{4} \, e^{\left (-x\right )} \log \relax (3) \log \relax (x) + \frac {1}{4} \, x e^{\left (-x + 3\right )} - \frac {1}{4} \, e^{\left (-x + 3\right )} \log \relax (3) + 3 \, e^{\left (-x\right )} \log \relax (x) - 3 \, e^{\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.10, size = 52, normalized size = 1.62
method | result | size |
default | \(\frac {\left (x \,{\mathrm e}^{3}+x^{2} \ln \relax (x )+\left (\ln \relax (3)+12\right ) \ln \relax (x )-x \ln \relax (x )-x^{2} {\mathrm e}^{3}-12 \,{\mathrm e}^{3}-{\mathrm e}^{3} \ln \relax (3)\right ) {\mathrm e}^{-x}}{4}-3 \ln \relax (x )\) | \(52\) |
risch | \(\frac {\left (x^{2}+\ln \relax (3)-x +12\right ) {\mathrm e}^{-x} \ln \relax (x )}{4}-\frac {\left (x^{2} {\mathrm e}^{3}+12 \,{\mathrm e}^{x} \ln \relax (x )+{\mathrm e}^{3} \ln \relax (3)-x \,{\mathrm e}^{3}+12 \,{\mathrm e}^{3}\right ) {\mathrm e}^{-x}}{4}\) | \(53\) |
norman | \(\left (\left (\frac {\ln \relax (3)}{4}+3\right ) \ln \relax (x )-3 \,{\mathrm e}^{x} \ln \relax (x )+\frac {x \,{\mathrm e}^{3}}{4}-\frac {x \ln \relax (x )}{4}-\frac {x^{2} {\mathrm e}^{3}}{4}+\frac {x^{2} \ln \relax (x )}{4}-3 \,{\mathrm e}^{3}-\frac {{\mathrm e}^{3} \ln \relax (3)}{4}\right ) {\mathrm e}^{-x}\) | \(56\) |
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}{4} \, {\left (x^{2} - x - 1\right )} e^{\left (-x\right )} \log \relax (x) + \frac {1}{4} \, e^{\left (-x\right )} \log \relax (3) \log \relax (x) - \frac {1}{4} \, {\left (x^{2} e^{3} + 2 \, x e^{3} + 2 \, e^{3}\right )} e^{\left (-x\right )} + \frac {3}{4} \, {\left (x e^{3} + e^{3}\right )} e^{\left (-x\right )} - \frac {1}{4} \, {\left (x + 1\right )} e^{\left (-x\right )} - \frac {1}{4} \, e^{\left (-x + 3\right )} \log \relax (3) + \frac {13}{4} \, e^{\left (-x\right )} \log \relax (x) - \frac {1}{4} \, {\rm Ei}\left (-x\right ) + \frac {1}{4} \, e^{\left (-x\right )} - \frac {13}{4} \, e^{\left (-x + 3\right )} - \frac {1}{4} \, \int \frac {{\left (x^{2} - x - 1\right )} e^{\left (-x\right )}}{x}\,{d x} - 3 \, \log \relax (x) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.13, size = 59, normalized size = 1.84 \begin {gather*} \frac {x\,{\mathrm {e}}^{-x}\,\left ({\mathrm {e}}^3-\ln \relax (x)\right )}{4}-\frac {{\mathrm {e}}^{-x}\,\left (12\,{\mathrm {e}}^x\,\ln \relax (x)-\ln \relax (x)\,\left (\ln \relax (3)+12\right )+{\mathrm {e}}^3\,\left (\ln \relax (3)+12\right )\right )}{4}-\frac {x^2\,{\mathrm {e}}^{-x}\,\left ({\mathrm {e}}^3-\ln \relax (x)\right )}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.60, size = 56, normalized size = 1.75 \begin {gather*} \frac {\left (x^{2} \log {\relax (x )} - x^{2} e^{3} - x \log {\relax (x )} + x e^{3} + \log {\relax (3 )} \log {\relax (x )} + 12 \log {\relax (x )} - 12 e^{3} - e^{3} \log {\relax (3 )}\right ) e^{- x}}{4} - 3 \log {\relax (x )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________