Optimal. Leaf size=36 \[ x+\frac {1}{4} x \left (\frac {x}{4}+\left (1-e^{-4+x}-x\right ) \left (1-e^2+3 x\right )\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.08, antiderivative size = 77, normalized size of antiderivative = 2.14, number of steps used = 12, number of rules used = 4, integrand size = 48, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {12, 2196, 2194, 2176} \begin {gather*} -\frac {3 x^3}{4}-\frac {3}{4} e^{x-4} x^2+\frac {9 x^2}{16}-\frac {1}{4} e^{x-4} x+\frac {5 x}{4}-\frac {e^{x-2}}{4}+\frac {1}{16} e^2 (1-2 x)^2+\frac {1}{4} e^{x-2} (x+1) \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}{8} \int \left (10+9 x-18 x^2+e^2 (-2+4 x)+e^{-4+x} \left (-2-14 x-6 x^2+e^2 (2+2 x)\right )\right ) \, dx\\ &=\frac {1}{16} e^2 (1-2 x)^2+\frac {5 x}{4}+\frac {9 x^2}{16}-\frac {3 x^3}{4}+\frac {1}{8} \int e^{-4+x} \left (-2-14 x-6 x^2+e^2 (2+2 x)\right ) \, dx\\ &=\frac {1}{16} e^2 (1-2 x)^2+\frac {5 x}{4}+\frac {9 x^2}{16}-\frac {3 x^3}{4}+\frac {1}{8} \int \left (-2 e^{-4+x}-14 e^{-4+x} x-6 e^{-4+x} x^2+2 e^{-2+x} (1+x)\right ) \, dx\\ &=\frac {1}{16} e^2 (1-2 x)^2+\frac {5 x}{4}+\frac {9 x^2}{16}-\frac {3 x^3}{4}-\frac {1}{4} \int e^{-4+x} \, dx+\frac {1}{4} \int e^{-2+x} (1+x) \, dx-\frac {3}{4} \int e^{-4+x} x^2 \, dx-\frac {7}{4} \int e^{-4+x} x \, dx\\ &=-\frac {1}{4} e^{-4+x}+\frac {1}{16} e^2 (1-2 x)^2+\frac {5 x}{4}-\frac {7}{4} e^{-4+x} x+\frac {9 x^2}{16}-\frac {3}{4} e^{-4+x} x^2-\frac {3 x^3}{4}+\frac {1}{4} e^{-2+x} (1+x)-\frac {1}{4} \int e^{-2+x} \, dx+\frac {3}{2} \int e^{-4+x} x \, dx+\frac {7}{4} \int e^{-4+x} \, dx\\ &=\frac {3 e^{-4+x}}{2}-\frac {e^{-2+x}}{4}+\frac {1}{16} e^2 (1-2 x)^2+\frac {5 x}{4}-\frac {1}{4} e^{-4+x} x+\frac {9 x^2}{16}-\frac {3}{4} e^{-4+x} x^2-\frac {3 x^3}{4}+\frac {1}{4} e^{-2+x} (1+x)-\frac {3}{2} \int e^{-4+x} \, dx\\ &=-\frac {1}{4} e^{-2+x}+\frac {1}{16} e^2 (1-2 x)^2+\frac {5 x}{4}-\frac {1}{4} e^{-4+x} x+\frac {9 x^2}{16}-\frac {3}{4} e^{-4+x} x^2-\frac {3 x^3}{4}+\frac {1}{4} e^{-2+x} (1+x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 58, normalized size = 1.61 \begin {gather*} \frac {1}{8} \left (10 x-2 e^2 x+\frac {9 x^2}{2}+2 e^2 x^2-6 x^3+2 e^x \left (\frac {\left (-1+e^2\right ) x}{e^4}-\frac {3 x^2}{e^4}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 43, normalized size = 1.19 \begin {gather*} -\frac {3}{4} \, x^{3} + \frac {9}{16} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - x\right )} e^{2} - \frac {1}{4} \, {\left (3 \, x^{2} - x e^{2} + x\right )} e^{\left (x - 4\right )} + \frac {5}{4} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 45, normalized size = 1.25 \begin {gather*} -\frac {3}{4} \, x^{3} + \frac {9}{16} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - x\right )} e^{2} + \frac {1}{4} \, x e^{\left (x - 2\right )} - \frac {1}{4} \, {\left (3 \, x^{2} + x\right )} e^{\left (x - 4\right )} + \frac {5}{4} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 46, normalized size = 1.28
method | result | size |
norman | \(\left (\frac {5}{4}-\frac {{\mathrm e}^{2}}{4}\right ) x +\left (\frac {{\mathrm e}^{2}}{4}+\frac {9}{16}\right ) x^{2}+\left (\frac {{\mathrm e}^{2}}{4}-\frac {1}{4}\right ) x \,{\mathrm e}^{x -4}-\frac {3 x^{3}}{4}-\frac {3 x^{2} {\mathrm e}^{x -4}}{4}\) | \(46\) |
risch | \(\frac {\left (2 \,{\mathrm e}^{2} x -6 x^{2}-2 x \right ) {\mathrm e}^{x -4}}{8}+\frac {x^{2} {\mathrm e}^{2}}{4}-\frac {{\mathrm e}^{2} x}{4}-\frac {3 x^{3}}{4}+\frac {9 x^{2}}{16}+\frac {5 x}{4}\) | \(47\) |
default | \(\frac {5 x}{4}+\frac {9 x^{2}}{16}-\frac {3 x^{3}}{4}+\frac {{\mathrm e}^{2} \left (2 x^{2}-2 x \right )}{8}-\frac {25 \,{\mathrm e}^{x -4} \left (x -4\right )}{4}-13 \,{\mathrm e}^{x -4}-\frac {3 \,{\mathrm e}^{x -4} \left (x -4\right )^{2}}{4}+\frac {5 \,{\mathrm e}^{x -4} {\mathrm e}^{2}}{4}+\frac {{\mathrm e}^{2} \left ({\mathrm e}^{x -4} \left (x -4\right )-{\mathrm e}^{x -4}\right )}{4}\) | \(81\) |
derivativedivides | \(\frac {23 x}{4}-23+\frac {9 \left (x -4\right )^{2}}{16}-\frac {3 x^{3}}{4}+\frac {{\mathrm e}^{2} \left (2 \left (x -4\right )^{2}+14 x -56\right )}{8}-\frac {25 \,{\mathrm e}^{x -4} \left (x -4\right )}{4}-13 \,{\mathrm e}^{x -4}-\frac {3 \,{\mathrm e}^{x -4} \left (x -4\right )^{2}}{4}+\frac {5 \,{\mathrm e}^{x -4} {\mathrm e}^{2}}{4}+\frac {{\mathrm e}^{2} \left ({\mathrm e}^{x -4} \left (x -4\right )-{\mathrm e}^{x -4}\right )}{4}\) | \(87\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 44, normalized size = 1.22 \begin {gather*} -\frac {3}{4} \, x^{3} + \frac {9}{16} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - x\right )} e^{2} - \frac {1}{4} \, {\left (3 \, x^{2} - x {\left (e^{2} - 1\right )}\right )} e^{\left (x - 4\right )} + \frac {5}{4} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.07, size = 47, normalized size = 1.31 \begin {gather*} x^2\,\left (\frac {{\mathrm {e}}^2}{4}+\frac {9}{16}\right )-\frac {3\,x^2\,{\mathrm {e}}^{x-4}}{4}-\frac {3\,x^3}{4}-x\,\left (\frac {{\mathrm {e}}^2}{4}-\frac {5}{4}\right )+\frac {x\,{\mathrm {e}}^{x-4}\,\left (2\,{\mathrm {e}}^2-2\right )}{8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 46, normalized size = 1.28 \begin {gather*} - \frac {3 x^{3}}{4} + x^{2} \left (\frac {9}{16} + \frac {e^{2}}{4}\right ) + x \left (\frac {5}{4} - \frac {e^{2}}{4}\right ) + \frac {\left (- 3 x^{2} - x + x e^{2}\right ) e^{x - 4}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________