3.10.21 \(\int e^{-e^{x^4}-x^2} (e^{e^{x^4}} (16-16 x-29 x^2+16 x^3-2 x^4)+e^{-3+e^x} (-8-30 x+16 x^2-2 x^3+e^x (16-8 x+x^2)+e^{x^4} (-64 x^3+32 x^4-4 x^5))) \, dx\)

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]

Int[E^(-E^x^4 - x^2)*(E^E^x^4*(16 - 16*x - 29*x^2 + 16*x^3 - 2*x^4) + E^(-3 + E^x)*(-8 - 30*x + 16*x^2 - 2*x^3
 + E^x*(16 - 8*x + x^2) + E^x^4*(-64*x^3 + 32*x^4 - 4*x^5))),x]

[Out]

(16*x)/E^x^2 - (8*x^2)/E^x^2 + x^3/E^x^2 + (E^(-3 + E^x - E^x^4 - x^2)*(4 - x)*(4*E^x - 8*x - E^x*x + 2*x^2 -
16*E^x^4*x^3 + 4*E^x^4*x^4))/(E^x - 2*x - 4*E^x^4*x^3)

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 2209

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^n*
F^(a + b*(c + d*x)^n))/(b*f*n*(c + d*x)^n*Log[F]), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

Rule 2212

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^(m
 - n + 1)*F^(a + b*(c + d*x)^n))/(b*d*n*Log[F]), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[(2*(m + 1))/n] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 2226

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(u_), x_Symbol] :> Int[ExpandLinearProduct[F^(a + b*(c + d*
x)^n), u, c, d, x], x] /; FreeQ[{F, a, b, c, d, n}, x] && PolynomialQ[u, x]

Rule 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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]

Integrate[E^(-E^x^4 - x^2)*(E^E^x^4*(16 - 16*x - 29*x^2 + 16*x^3 - 2*x^4) + E^(-3 + E^x)*(-8 - 30*x + 16*x^2 -
 2*x^3 + E^x*(16 - 8*x + x^2) + E^x^4*(-64*x^3 + 32*x^4 - 4*x^5))),x]

[Out]

E^(-3 - E^x^4 - x^2)*(-4 + x)^2*(E^E^x + E^(3 + E^x^4)*x)

________________________________________________________________________________________

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]

integrate(((-2*x^4+16*x^3-29*x^2-16*x+16)*exp(exp(x^4))+((-4*x^5+32*x^4-64*x^3)*exp(x^4)+(x^2-8*x+16)*exp(x)-2
*x^3+16*x^2-30*x-8)*exp(exp(x)-3))/exp(x^2)/exp(exp(x^4)),x, algorithm="fricas")

[Out]

(x^3 - 8*x^2 + 16*x)*e^(-x^2) + (x^2 - 8*x + 16)*e^(-x^2 - e^(x^4) + e^x - 3)

________________________________________________________________________________________

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]

integrate(((-2*x^4+16*x^3-29*x^2-16*x+16)*exp(exp(x^4))+((-4*x^5+32*x^4-64*x^3)*exp(x^4)+(x^2-8*x+16)*exp(x)-2
*x^3+16*x^2-30*x-8)*exp(exp(x)-3))/exp(x^2)/exp(exp(x^4)),x, algorithm="giac")

[Out]

integrate(-((2*x^3 - 16*x^2 + 4*(x^5 - 8*x^4 + 16*x^3)*e^(x^4) - (x^2 - 8*x + 16)*e^x + 30*x + 8)*e^(e^x - 3)
+ (2*x^4 - 16*x^3 + 29*x^2 + 16*x - 16)*e^(e^(x^4)))*e^(-x^2 - e^(x^4)), x)

________________________________________________________________________________________

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]

int(((-2*x^4+16*x^3-29*x^2-16*x+16)*exp(exp(x^4))+((-4*x^5+32*x^4-64*x^3)*exp(x^4)+(x^2-8*x+16)*exp(x)-2*x^3+1
6*x^2-30*x-8)*exp(exp(x)-3))/exp(x^2)/exp(exp(x^4)),x,method=_RETURNVERBOSE)

[Out]

(x^3-8*x^2+16*x)*exp(-x^2)+(x^2-8*x+16)*exp(-x^2-exp(x^4)+exp(x)-3)

________________________________________________________________________________________

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]

integrate(((-2*x^4+16*x^3-29*x^2-16*x+16)*exp(exp(x^4))+((-4*x^5+32*x^4-64*x^3)*exp(x^4)+(x^2-8*x+16)*exp(x)-2
*x^3+16*x^2-30*x-8)*exp(exp(x)-3))/exp(x^2)/exp(exp(x^4)),x, algorithm="maxima")

[Out]

1/2*(2*x^3 + 3*x)*e^(-x^2) - 8*(x^2 + 1)*e^(-x^2) + 29/2*x*e^(-x^2) + (x^2 - 8*x + 16)*e^(-x^2 - e^(x^4) + e^x
 - 3) + 8*e^(-x^2)

________________________________________________________________________________________

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]

int(-exp(-exp(x^4))*exp(-x^2)*(exp(exp(x) - 3)*(30*x - exp(x)*(x^2 - 8*x + 16) + exp(x^4)*(64*x^3 - 32*x^4 + 4
*x^5) - 16*x^2 + 2*x^3 + 8) + exp(exp(x^4))*(16*x + 29*x^2 - 16*x^3 + 2*x^4 - 16)),x)

[Out]

exp(-exp(x^4))*exp(exp(x) - x^2 - 3)*(x - 4)^2 + x*exp(-x^2)*(x - 4)^2

________________________________________________________________________________________

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]

integrate(((-2*x**4+16*x**3-29*x**2-16*x+16)*exp(exp(x**4))+((-4*x**5+32*x**4-64*x**3)*exp(x**4)+(x**2-8*x+16)
*exp(x)-2*x**3+16*x**2-30*x-8)*exp(exp(x)-3))/exp(x**2)/exp(exp(x**4)),x)

[Out]

(x**3 - 8*x**2 + 16*x)*exp(-x**2) + (x**2*exp(-x**2)*exp(-exp(x**4)) - 8*x*exp(-x**2)*exp(-exp(x**4)) + 16*exp
(-x**2)*exp(-exp(x**4)))*exp(exp(x) - 3)

________________________________________________________________________________________