Optimal. Leaf size=16 \[ 1+\left (e^{-1+x}+x-x^2\right )^2 \]
________________________________________________________________________________________
Rubi [B] time = 0.06, antiderivative size = 37, normalized size of antiderivative = 2.31, number of steps used = 10, number of rules used = 3, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {2194, 2196, 2176} \begin {gather*} x^4-2 x^3-2 e^{x-1} x^2+x^2+2 e^{x-1} x+e^{2 x-2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2176
Rule 2194
Rule 2196
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=x^2-2 x^3+x^4+2 \int e^{-2+2 x} \, dx+\int e^{-1+x} \left (2-2 x-2 x^2\right ) \, dx\\ &=e^{-2+2 x}+x^2-2 x^3+x^4+\int \left (2 e^{-1+x}-2 e^{-1+x} x-2 e^{-1+x} x^2\right ) \, dx\\ &=e^{-2+2 x}+x^2-2 x^3+x^4+2 \int e^{-1+x} \, dx-2 \int e^{-1+x} x \, dx-2 \int e^{-1+x} x^2 \, dx\\ &=2 e^{-1+x}+e^{-2+2 x}-2 e^{-1+x} x+x^2-2 e^{-1+x} x^2-2 x^3+x^4+2 \int e^{-1+x} \, dx+4 \int e^{-1+x} x \, dx\\ &=4 e^{-1+x}+e^{-2+2 x}+2 e^{-1+x} x+x^2-2 e^{-1+x} x^2-2 x^3+x^4-4 \int e^{-1+x} \, dx\\ &=e^{-2+2 x}+2 e^{-1+x} x+x^2-2 e^{-1+x} x^2-2 x^3+x^4\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 17, normalized size = 1.06 \begin {gather*} \frac {\left (e^x-e (-1+x) x\right )^2}{e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.62, size = 31, normalized size = 1.94 \begin {gather*} x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{\left (x - 1\right )} + e^{\left (2 \, x - 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 31, normalized size = 1.94 \begin {gather*} x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{\left (x - 1\right )} + e^{\left (2 \, x - 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.09, size = 33, normalized size = 2.06
method | result | size |
risch | \({\mathrm e}^{2 x -2}+\left (-2 x^{2}+2 x \right ) {\mathrm e}^{x -1}+x^{4}-2 x^{3}+x^{2}\) | \(33\) |
norman | \(x^{2}+x^{4}+{\mathrm e}^{2 x -2}-2 x^{3}+2 x \,{\mathrm e}^{x -1}-2 x^{2} {\mathrm e}^{x -1}\) | \(35\) |
default | \(-2 \,{\mathrm e}^{x -1} \left (x -1\right )-2 \,{\mathrm e}^{x -1} \left (x -1\right )^{2}+x^{2}-2 x^{3}+x^{4}+{\mathrm e}^{2 x -2}\) | \(39\) |
derivativedivides | \(2 x -2-2 \,{\mathrm e}^{x -1} \left (x -1\right )-2 \,{\mathrm e}^{x -1} \left (x -1\right )^{2}+\left (x -1\right )^{2}-2 x^{3}+x^{4}+{\mathrm e}^{2 x -2}\) | \(45\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 31, normalized size = 1.94 \begin {gather*} x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{\left (x - 1\right )} + e^{\left (2 \, x - 2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.19, size = 13, normalized size = 0.81 \begin {gather*} {\left (x+{\mathrm {e}}^{x-1}-x^2\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.10, size = 31, normalized size = 1.94 \begin {gather*} x^{4} - 2 x^{3} + x^{2} + \left (- 2 x^{2} + 2 x\right ) e^{x - 1} + e^{2 x - 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________