Optimal. Leaf size=29 \[ e^{-x^2} (-4+x)^2 \left (e^{-3+e^x-e^{x^4}}+x\right ) \]
________________________________________________________________________________________
Rubi [B] time = 3.56, antiderivative size = 118, normalized size of antiderivative = 4.07, number of steps used = 14, number of rules used = 6, integrand size = 102, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {6742, 2226, 2205, 2209, 2212, 2288} \begin {gather*} -8 e^{-x^2} x^2+16 e^{-x^2} x+e^{-x^2} x^3+\frac {e^{-e^{x^4}-x^2+e^x-3} (4-x) \left (4 e^{x^4} x^4+2 x^2-16 e^{x^4} x^3-e^x x-8 x+4 e^x\right )}{-4 e^{x^4} x^3-2 x+e^x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2205
Rule 2209
Rule 2212
Rule 2226
Rule 2288
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-e^{-x^2} \left (-16+16 x+29 x^2-16 x^3+2 x^4\right )-e^{-3+e^x-e^{x^4}-x^2} (-4+x) \left (-2+4 e^x-8 x-e^x x+2 x^2-16 e^{x^4} x^3+4 e^{x^4} x^4\right )\right ) \, dx\\ &=-\int e^{-x^2} \left (-16+16 x+29 x^2-16 x^3+2 x^4\right ) \, dx-\int e^{-3+e^x-e^{x^4}-x^2} (-4+x) \left (-2+4 e^x-8 x-e^x x+2 x^2-16 e^{x^4} x^3+4 e^{x^4} x^4\right ) \, dx\\ &=\frac {e^{-3+e^x-e^{x^4}-x^2} (4-x) \left (4 e^x-8 x-e^x x+2 x^2-16 e^{x^4} x^3+4 e^{x^4} x^4\right )}{e^x-2 x-4 e^{x^4} x^3}-\int \left (-16 e^{-x^2}+16 e^{-x^2} x+29 e^{-x^2} x^2-16 e^{-x^2} x^3+2 e^{-x^2} x^4\right ) \, dx\\ &=\frac {e^{-3+e^x-e^{x^4}-x^2} (4-x) \left (4 e^x-8 x-e^x x+2 x^2-16 e^{x^4} x^3+4 e^{x^4} x^4\right )}{e^x-2 x-4 e^{x^4} x^3}-2 \int e^{-x^2} x^4 \, dx+16 \int e^{-x^2} \, dx-16 \int e^{-x^2} x \, dx+16 \int e^{-x^2} x^3 \, dx-29 \int e^{-x^2} x^2 \, dx\\ &=8 e^{-x^2}+\frac {29}{2} e^{-x^2} x-8 e^{-x^2} x^2+e^{-x^2} x^3+\frac {e^{-3+e^x-e^{x^4}-x^2} (4-x) \left (4 e^x-8 x-e^x x+2 x^2-16 e^{x^4} x^3+4 e^{x^4} x^4\right )}{e^x-2 x-4 e^{x^4} x^3}+8 \sqrt {\pi } \text {erf}(x)-3 \int e^{-x^2} x^2 \, dx-\frac {29}{2} \int e^{-x^2} \, dx+16 \int e^{-x^2} x \, dx\\ &=16 e^{-x^2} x-8 e^{-x^2} x^2+e^{-x^2} x^3+\frac {e^{-3+e^x-e^{x^4}-x^2} (4-x) \left (4 e^x-8 x-e^x x+2 x^2-16 e^{x^4} x^3+4 e^{x^4} x^4\right )}{e^x-2 x-4 e^{x^4} x^3}+\frac {3}{4} \sqrt {\pi } \text {erf}(x)-\frac {3}{2} \int e^{-x^2} \, dx\\ &=16 e^{-x^2} x-8 e^{-x^2} x^2+e^{-x^2} x^3+\frac {e^{-3+e^x-e^{x^4}-x^2} (4-x) \left (4 e^x-8 x-e^x x+2 x^2-16 e^{x^4} x^3+4 e^{x^4} x^4\right )}{e^x-2 x-4 e^{x^4} x^3}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.12, size = 39, normalized size = 1.34 \begin {gather*} e^{-3-e^{x^4}-x^2} (-4+x)^2 \left (e^{e^x}+e^{3+e^{x^4}} x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 45, normalized size = 1.55 \begin {gather*} {\left (x^{3} - 8 \, x^{2} + 16 \, x\right )} e^{\left (-x^{2}\right )} + {\left (x^{2} - 8 \, x + 16\right )} e^{\left (-x^{2} - e^{\left (x^{4}\right )} + e^{x} - 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int -{\left ({\left (2 \, x^{3} - 16 \, x^{2} + 4 \, {\left (x^{5} - 8 \, x^{4} + 16 \, x^{3}\right )} e^{\left (x^{4}\right )} - {\left (x^{2} - 8 \, x + 16\right )} e^{x} + 30 \, x + 8\right )} e^{\left (e^{x} - 3\right )} + {\left (2 \, x^{4} - 16 \, x^{3} + 29 \, x^{2} + 16 \, x - 16\right )} e^{\left (e^{\left (x^{4}\right )}\right )}\right )} e^{\left (-x^{2} - e^{\left (x^{4}\right )}\right )}\,{d 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.59
method | result | size |
risch | \(\left (x^{3}-8 x^{2}+16 x \right ) {\mathrm e}^{-x^{2}}+\left (x^{2}-8 x +16\right ) {\mathrm e}^{-x^{2}-{\mathrm e}^{x^{4}}+{\mathrm e}^{x}-3}\) | \(46\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.64, size = 73, normalized size = 2.52 \begin {gather*} \frac {1}{2} \, {\left (2 \, x^{3} + 3 \, x\right )} e^{\left (-x^{2}\right )} - 8 \, {\left (x^{2} + 1\right )} e^{\left (-x^{2}\right )} + \frac {29}{2} \, x e^{\left (-x^{2}\right )} + {\left (x^{2} - 8 \, x + 16\right )} e^{\left (-x^{2} - e^{\left (x^{4}\right )} + e^{x} - 3\right )} + 8 \, e^{\left (-x^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.52, size = 37, normalized size = 1.28 \begin {gather*} {\mathrm {e}}^{-{\mathrm {e}}^{x^4}}\,{\mathrm {e}}^{{\mathrm {e}}^x-x^2-3}\,{\left (x-4\right )}^2+x\,{\mathrm {e}}^{-x^2}\,{\left (x-4\right )}^2 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 22.39, size = 66, normalized size = 2.28 \begin {gather*} \left (x^{3} - 8 x^{2} + 16 x\right ) e^{- x^{2}} + \left (x^{2} e^{- x^{2}} e^{- e^{x^{4}}} - 8 x e^{- x^{2}} e^{- e^{x^{4}}} + 16 e^{- x^{2}} e^{- e^{x^{4}}}\right ) e^{e^{x} - 3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________