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 ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, 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, 6874,
2225, 2207, 2227, 2634} \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 2207
Rule 2225
Rule 2227
Rule 2634
Rule 6874
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.11, 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]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 43, normalized size = 1.30
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] Leaf count of result is larger than twice the leaf count of optimal. 91 vs.
\(2 (29) = 58\).
time = 0.51, size = 91, normalized size = 2.76 \begin {gather*} -\frac {1}{4} \, {\left (x^{3} \log \left (3\right ) + x^{2} {\left (2 \, \log \left (3\right ) + 1\right )} + {\left (x^{3} + 2 \, x^{2}\right )} \log \left (x\right ) + 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]
________________________________________________________________________________________
Fricas [A]
time = 0.34, 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]
________________________________________________________________________________________
Sympy [A]
time = 0.11, 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]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 55, normalized size = 1.67 \begin {gather*} -\frac {1}{4} \, x^{3} e^{\left (-x\right )} \log \left (3 \, x\right ) - \frac {1}{2} \, x^{3} e^{\left (-x\right )} - \frac {1}{2} \, x^{2} e^{\left (-x\right )} \log \left (3 \, x\right ) - 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]
________________________________________________________________________________________
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]
________________________________________________________________________________________