Optimal. Leaf size=29 \[ -x+(3-x)^2 \left (-2+\frac {1}{2} \left (-2-e^x-x\right )+x\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 41, normalized size of antiderivative = 1.41, number of steps used = 10, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {12, 2196, 2194, 2176} \begin {gather*} \frac {x^3}{2}-\frac {e^x x^2}{2}-6 x^2+3 e^x x+\frac {43 x}{2}-\frac {9 e^x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \left (43-24 x+3 x^2+e^x \left (-3+4 x-x^2\right )\right ) \, dx\\ &=\frac {43 x}{2}-6 x^2+\frac {x^3}{2}+\frac {1}{2} \int e^x \left (-3+4 x-x^2\right ) \, dx\\ &=\frac {43 x}{2}-6 x^2+\frac {x^3}{2}+\frac {1}{2} \int \left (-3 e^x+4 e^x x-e^x x^2\right ) \, dx\\ &=\frac {43 x}{2}-6 x^2+\frac {x^3}{2}-\frac {1}{2} \int e^x x^2 \, dx-\frac {3 \int e^x \, dx}{2}+2 \int e^x x \, dx\\ &=-\frac {3 e^x}{2}+\frac {43 x}{2}+2 e^x x-6 x^2-\frac {e^x x^2}{2}+\frac {x^3}{2}-2 \int e^x \, dx+\int e^x x \, dx\\ &=-\frac {7 e^x}{2}+\frac {43 x}{2}+3 e^x x-6 x^2-\frac {e^x x^2}{2}+\frac {x^3}{2}-\int e^x \, dx\\ &=-\frac {9 e^x}{2}+\frac {43 x}{2}+3 e^x x-6 x^2-\frac {e^x x^2}{2}+\frac {x^3}{2}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 29, normalized size = 1.00 \begin {gather*} \frac {1}{2} \left (43 x-12 x^2+x^3-e^x \left (9-6 x+x^2\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.95, size = 26, normalized size = 0.90 \begin {gather*} \frac {1}{2} \, x^{3} - 6 \, x^{2} - \frac {1}{2} \, {\left (x^{2} - 6 \, x + 9\right )} e^{x} + \frac {43}{2} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 26, normalized size = 0.90 \begin {gather*} \frac {1}{2} \, x^{3} - 6 \, x^{2} - \frac {1}{2} \, {\left (x^{2} - 6 \, x + 9\right )} e^{x} + \frac {43}{2} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 29, normalized size = 1.00
method | result | size |
risch | \(\frac {\left (-x^{2}+6 x -9\right ) {\mathrm e}^{x}}{2}+\frac {x^{3}}{2}-6 x^{2}+\frac {43 x}{2}\) | \(29\) |
default | \(\frac {43 x}{2}-6 x^{2}+\frac {x^{3}}{2}+3 \,{\mathrm e}^{x} x -\frac {9 \,{\mathrm e}^{x}}{2}-\frac {{\mathrm e}^{x} x^{2}}{2}\) | \(31\) |
norman | \(\frac {43 x}{2}-6 x^{2}+\frac {x^{3}}{2}+3 \,{\mathrm e}^{x} x -\frac {9 \,{\mathrm e}^{x}}{2}-\frac {{\mathrm e}^{x} x^{2}}{2}\) | \(31\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 26, normalized size = 0.90 \begin {gather*} \frac {1}{2} \, x^{3} - 6 \, x^{2} - \frac {1}{2} \, {\left (x^{2} - 6 \, x + 9\right )} e^{x} + \frac {43}{2} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.36, size = 30, normalized size = 1.03 \begin {gather*} \frac {43\,x}{2}-\frac {9\,{\mathrm {e}}^x}{2}-\frac {x^2\,{\mathrm {e}}^x}{2}+3\,x\,{\mathrm {e}}^x-6\,x^2+\frac {x^3}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.10, size = 27, normalized size = 0.93 \begin {gather*} \frac {x^{3}}{2} - 6 x^{2} + \frac {43 x}{2} + \frac {\left (- x^{2} + 6 x - 9\right ) e^{x}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________