Optimal. Leaf size=33 \[ 3 x-e^{-x} \left (2 x+\frac {1}{4} x \left (2 x+x^2\right ) (2+\log (3 x))\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.44, antiderivative size = 66, normalized size of antiderivative = 2.00, number of steps used = 21, number of rules used = 6, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {12, 6742, 2194, 2176, 2196, 2554} \begin {gather*} -\frac {1}{2} e^{-x} x^3-\frac {1}{4} e^{-x} x^3 \log (3 x)-e^{-x} x^2-\frac {1}{2} e^{-x} x^2 \log (3 x)-2 e^{-x} x+3 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2194
Rule 2196
Rule 2554
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{4} \int e^{-x} \left (-8+12 e^x-2 x-3 x^2+2 x^3+\left (-4 x-x^2+x^3\right ) \log (3 x)\right ) \, dx\\ &=\frac {1}{4} \int \left (12-8 e^{-x}-2 e^{-x} x-3 e^{-x} x^2+2 e^{-x} x^3+e^{-x} x \left (-4-x+x^2\right ) \log (3 x)\right ) \, dx\\ &=3 x+\frac {1}{4} \int e^{-x} x \left (-4-x+x^2\right ) \log (3 x) \, dx-\frac {1}{2} \int e^{-x} x \, dx+\frac {1}{2} \int e^{-x} x^3 \, dx-\frac {3}{4} \int e^{-x} x^2 \, dx-2 \int e^{-x} \, dx\\ &=2 e^{-x}+3 x+\frac {e^{-x} x}{2}+\frac {3}{4} e^{-x} x^2-\frac {1}{2} e^{-x} x^3-\frac {1}{2} e^{-x} x^2 \log (3 x)-\frac {1}{4} e^{-x} x^3 \log (3 x)-\frac {1}{4} \int e^{-x} (-2-x) x \, dx-\frac {1}{2} \int e^{-x} \, dx-\frac {3}{2} \int e^{-x} x \, dx+\frac {3}{2} \int e^{-x} x^2 \, dx\\ &=\frac {5 e^{-x}}{2}+3 x+2 e^{-x} x-\frac {3}{4} e^{-x} x^2-\frac {1}{2} e^{-x} x^3-\frac {1}{2} e^{-x} x^2 \log (3 x)-\frac {1}{4} e^{-x} x^3 \log (3 x)-\frac {1}{4} \int \left (-2 e^{-x} x-e^{-x} x^2\right ) \, dx-\frac {3}{2} \int e^{-x} \, dx+3 \int e^{-x} x \, dx\\ &=4 e^{-x}+3 x-e^{-x} x-\frac {3}{4} e^{-x} x^2-\frac {1}{2} e^{-x} x^3-\frac {1}{2} e^{-x} x^2 \log (3 x)-\frac {1}{4} e^{-x} x^3 \log (3 x)+\frac {1}{4} \int e^{-x} x^2 \, dx+\frac {1}{2} \int e^{-x} x \, dx+3 \int e^{-x} \, dx\\ &=e^{-x}+3 x-\frac {3 e^{-x} x}{2}-e^{-x} x^2-\frac {1}{2} e^{-x} x^3-\frac {1}{2} e^{-x} x^2 \log (3 x)-\frac {1}{4} e^{-x} x^3 \log (3 x)+\frac {1}{2} \int e^{-x} \, dx+\frac {1}{2} \int e^{-x} x \, dx\\ &=\frac {e^{-x}}{2}+3 x-2 e^{-x} x-e^{-x} x^2-\frac {1}{2} e^{-x} x^3-\frac {1}{2} e^{-x} x^2 \log (3 x)-\frac {1}{4} e^{-x} x^3 \log (3 x)+\frac {1}{2} \int e^{-x} \, dx\\ &=3 x-2 e^{-x} x-e^{-x} x^2-\frac {1}{2} e^{-x} x^3-\frac {1}{2} e^{-x} x^2 \log (3 x)-\frac {1}{4} e^{-x} x^3 \log (3 x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.18, size = 35, normalized size = 1.06 \begin {gather*} -\frac {1}{4} e^{-x} x \left (2 \left (4-6 e^x+2 x+x^2\right )+x (2+x) \log (3 x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 39, normalized size = 1.18 \begin {gather*} -\frac {1}{4} \, {\left (2 \, x^{3} + 4 \, x^{2} - 12 \, x e^{x} + {\left (x^{3} + 2 \, x^{2}\right )} \log \left (3 \, x\right ) + 8 \, x\right )} e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.16, size = 73, normalized size = 2.21 \begin {gather*} -\frac {1}{4} \, x^{3} e^{\left (-x\right )} \log \relax (3) - \frac {1}{4} \, x^{3} e^{\left (-x\right )} \log \relax (x) - \frac {1}{2} \, x^{3} e^{\left (-x\right )} - \frac {1}{2} \, x^{2} e^{\left (-x\right )} \log \relax (3) - \frac {1}{2} \, x^{2} e^{\left (-x\right )} \log \relax (x) - x^{2} e^{\left (-x\right )} - 2 \, x e^{\left (-x\right )} + 3 \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.05, size = 37, normalized size = 1.12
method | result | size |
risch | \(-\frac {x^{2} \left (2+x \right ) {\mathrm e}^{-x} \ln \left (3 x \right )}{4}-\frac {x \left (x^{2}+2 x -6 \,{\mathrm e}^{x}+4\right ) {\mathrm e}^{-x}}{2}\) | \(37\) |
default | \(3 x +\frac {\left (-8 x -4 x^{2}-2 x^{3}-2 x^{2} \ln \left (3 x \right )-x^{3} \ln \left (3 x \right )\right ) {\mathrm e}^{-x}}{4}\) | \(43\) |
norman | \(\left (-2 x -x^{2}-\frac {x^{3}}{2}-\frac {x^{2} \ln \left (3 x \right )}{2}-\frac {x^{3} \ln \left (3 x \right )}{4}+3 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{-x}\) | \(43\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.73, size = 91, normalized size = 2.76 \begin {gather*} -\frac {1}{4} \, {\left (x^{3} \log \relax (3) + x^{2} {\left (2 \, \log \relax (3) + 1\right )} + {\left (x^{3} + 2 \, x^{2}\right )} \log \relax (x) + 4 \, x + 4\right )} e^{\left (-x\right )} - \frac {1}{2} \, {\left (x^{3} + 3 \, x^{2} + 6 \, x + 6\right )} e^{\left (-x\right )} + \frac {3}{4} \, {\left (x^{2} + 2 \, x + 2\right )} e^{\left (-x\right )} + \frac {1}{2} \, {\left (x + 1\right )} e^{\left (-x\right )} + 3 \, x + 2 \, e^{\left (-x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.31, size = 46, normalized size = 1.39 \begin {gather*} \frac {x\,{\mathrm {e}}^{-x}\,\left (12\,{\mathrm {e}}^x-8\right )}{4}-\frac {x^2\,{\mathrm {e}}^{-x}\,\left (2\,\ln \left (3\,x\right )+4\right )}{4}-\frac {x^3\,{\mathrm {e}}^{-x}\,\left (\ln \left (3\,x\right )+2\right )}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.37, size = 41, normalized size = 1.24 \begin {gather*} 3 x + \frac {\left (- x^{3} \log {\left (3 x \right )} - 2 x^{3} - 2 x^{2} \log {\left (3 x \right )} - 4 x^{2} - 8 x\right ) e^{- x}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________