3.69.52 \(\int e^{-18-2 e^6-2 e^3 (2-2 x)+6 x-2 x^2} (1-e^{18+2 e^6+2 e^3 (2-2 x)-6 x+2 x^2}+6 x+4 e^3 x-4 x^2) \, dx\)

Optimal. Leaf size=26 \[ 5-x+e^{-16-2 \left (1+e^3-x\right )^2+2 x} x \]

________________________________________________________________________________________

Rubi [A]  time = 1.62, antiderivative size = 36, normalized size of antiderivative = 1.38, number of steps used = 15, number of rules used = 7, integrand size = 73, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.096, Rules used = {6, 6741, 6742, 2234, 2205, 2240, 2241} \begin {gather*} x \exp \left (-2 x^2+2 \left (3+2 e^3\right ) x-2 \left (9+2 e^3+e^6\right )\right )-x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^(-18 - 2*E^6 - 2*E^3*(2 - 2*x) + 6*x - 2*x^2)*(1 - E^(18 + 2*E^6 + 2*E^3*(2 - 2*x) - 6*x + 2*x^2) + 6*x
+ 4*E^3*x - 4*x^2),x]

[Out]

-x + E^(-2*(9 + 2*E^3 + E^6) + 2*(3 + 2*E^3)*x - 2*x^2)*x

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

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 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2240

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*F^(a + b*x + c*x^2))/(
2*c*Log[F]), x] - Dist[(b*e - 2*c*d)/(2*c), Int[F^(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e}, x] &&
 NeQ[b*e - 2*c*d, 0]

Rule 2241

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

Rule 6741

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

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 e^{-18-2 e^6-2 e^3 (2-2 x)+6 x-2 x^2} \left (1-e^{18+2 e^6+2 e^3 (2-2 x)-6 x+2 x^2}+\left (6+4 e^3\right ) x-4 x^2\right ) \, dx\\ &=\int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) \left (1-e^{18+2 e^6+2 e^3 (2-2 x)-6 x+2 x^2}+\left (6+4 e^3\right ) x-4 x^2\right ) \, dx\\ &=\int \left (-1+\exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right )+2 \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) \left (3+2 e^3\right ) x-4 \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x^2\right ) \, dx\\ &=-x-4 \int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x^2 \, dx+\left (2 \left (3+2 e^3\right )\right ) \int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x \, dx+\int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) \, dx\\ &=-\frac {1}{2} \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) \left (3+2 e^3\right )-x+\exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x+e^{-\frac {27}{2}+2 e^3} \int e^{-\frac {1}{8} \left (2 \left (3+2 e^3\right )-4 x\right )^2} \, dx-\left (2 \left (3+2 e^3\right )\right ) \int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x \, dx+\left (3+2 e^3\right )^2 \int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) \, dx-\int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) \, dx\\ &=-x+\exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x-\frac {1}{2} e^{-\frac {27}{2}+2 e^3} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {3+2 e^3-2 x}{\sqrt {2}}\right )-e^{-\frac {27}{2}+2 e^3} \int e^{-\frac {1}{8} \left (2 \left (3+2 e^3\right )-4 x\right )^2} \, dx-\left (3+2 e^3\right )^2 \int \exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) \, dx+\left (e^{-\frac {27}{2}+2 e^3} \left (3+2 e^3\right )^2\right ) \int e^{-\frac {1}{8} \left (2 \left (3+2 e^3\right )-4 x\right )^2} \, dx\\ &=-x+\exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x-\frac {1}{2} e^{-\frac {27}{2}+2 e^3} \left (3+2 e^3\right )^2 \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {3+2 e^3-2 x}{\sqrt {2}}\right )-\left (e^{-\frac {27}{2}+2 e^3} \left (3+2 e^3\right )^2\right ) \int e^{-\frac {1}{8} \left (2 \left (3+2 e^3\right )-4 x\right )^2} \, dx\\ &=-x+\exp \left (-2 \left (9+2 e^3+e^6\right )+2 \left (3+2 e^3\right ) x-2 x^2\right ) x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.32, size = 27, normalized size = 1.04 \begin {gather*} \left (-1+e^{-2 \left (9+e^6-2 e^3 (-1+x)-3 x+x^2\right )}\right ) x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^(-18 - 2*E^6 - 2*E^3*(2 - 2*x) + 6*x - 2*x^2)*(1 - E^(18 + 2*E^6 + 2*E^3*(2 - 2*x) - 6*x + 2*x^2)
+ 6*x + 4*E^3*x - 4*x^2),x]

[Out]

(-1 + E^(-2*(9 + E^6 - 2*E^3*(-1 + x) - 3*x + x^2)))*x

________________________________________________________________________________________

fricas [B]  time = 0.58, size = 52, normalized size = 2.00 \begin {gather*} -{\left (x e^{\left (2 \, x^{2} - 4 \, {\left (x - 1\right )} e^{3} - 6 \, x + 2 \, e^{6} + 18\right )} - x\right )} e^{\left (-2 \, x^{2} + 4 \, {\left (x - 1\right )} e^{3} + 6 \, x - 2 \, e^{6} - 18\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-exp(exp(3)^2+(-2*x+2)*exp(3)+x^2-3*x+9)^2+4*x*exp(3)-4*x^2+6*x+1)/exp(exp(3)^2+(-2*x+2)*exp(3)+x^2
-3*x+9)^2,x, algorithm="fricas")

[Out]

-(x*e^(2*x^2 - 4*(x - 1)*e^3 - 6*x + 2*e^6 + 18) - x)*e^(-2*x^2 + 4*(x - 1)*e^3 + 6*x - 2*e^6 - 18)

________________________________________________________________________________________

giac [C]  time = 0.29, size = 134, normalized size = 5.15 \begin {gather*} \frac {1}{2} \, \sqrt {2} \sqrt {\pi } {\left (2 \, e^{3} + 3\right )} \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x - 2 \, e^{3} - 3\right )}\right ) e^{\left (2 \, e^{3} - \frac {21}{2}\right )} - \frac {1}{2} \, \sqrt {2} \sqrt {\pi } {\left (2 \, e^{6} + 3 \, e^{3}\right )} \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} {\left (2 \, x - 2 \, e^{3} - 3\right )}\right ) e^{\left (2 \, e^{3} - \frac {27}{2}\right )} + {\left (x + e^{3}\right )} e^{\left (-2 \, x^{2} + 4 \, x e^{3} + 6 \, x - 2 \, e^{6} - 4 \, e^{3} - 18\right )} - x - e^{\left (-2 \, x^{2} + 4 \, x e^{3} + 6 \, x - 2 \, e^{6} - 4 \, e^{3} - 15\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-exp(exp(3)^2+(-2*x+2)*exp(3)+x^2-3*x+9)^2+4*x*exp(3)-4*x^2+6*x+1)/exp(exp(3)^2+(-2*x+2)*exp(3)+x^2
-3*x+9)^2,x, algorithm="giac")

[Out]

1/2*sqrt(2)*sqrt(pi)*(2*e^3 + 3)*erf(1/2*sqrt(2)*(2*x - 2*e^3 - 3))*e^(2*e^3 - 21/2) - 1/2*sqrt(2)*sqrt(pi)*(2
*e^6 + 3*e^3)*erf(1/2*sqrt(2)*(2*x - 2*e^3 - 3))*e^(2*e^3 - 27/2) + (x + e^3)*e^(-2*x^2 + 4*x*e^3 + 6*x - 2*e^
6 - 4*e^3 - 18) - x - e^(-2*x^2 + 4*x*e^3 + 6*x - 2*e^6 - 4*e^3 - 15)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 31, normalized size = 1.19




method result size



risch \(-x +x \,{\mathrm e}^{4 x \,{\mathrm e}^{3}-2 x^{2}-4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}+6 x -18}\) \(31\)
default \(-x -\frac {3 \,{\mathrm e}^{-2 x^{2}+\left (4 \,{\mathrm e}^{3}+6\right ) x -4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}-18}}{2}+\frac {3 \left (4 \,{\mathrm e}^{3}+6\right ) \sqrt {\pi }\, {\mathrm e}^{-4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}-18+\frac {\left (4 \,{\mathrm e}^{3}+6\right )^{2}}{8}} \sqrt {2}\, \erf \left (\sqrt {2}\, x -\frac {\left (4 \,{\mathrm e}^{3}+6\right ) \sqrt {2}}{4}\right )}{8}+x \,{\mathrm e}^{-2 x^{2}+\left (4 \,{\mathrm e}^{3}+6\right ) x -4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}-18}-\left (4 \,{\mathrm e}^{3}+6\right ) \left (-\frac {{\mathrm e}^{-2 x^{2}+\left (4 \,{\mathrm e}^{3}+6\right ) x -4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}-18}}{4}+\frac {\left (4 \,{\mathrm e}^{3}+6\right ) \sqrt {\pi }\, {\mathrm e}^{-4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}-18+\frac {\left (4 \,{\mathrm e}^{3}+6\right )^{2}}{8}} \sqrt {2}\, \erf \left (\sqrt {2}\, x -\frac {\left (4 \,{\mathrm e}^{3}+6\right ) \sqrt {2}}{4}\right )}{16}\right )-{\mathrm e}^{-2 x^{2}+\left (4 \,{\mathrm e}^{3}+6\right ) x -4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}-15}+\frac {\left (4 \,{\mathrm e}^{3}+6\right ) \sqrt {\pi }\, {\mathrm e}^{-4 \,{\mathrm e}^{3}-2 \,{\mathrm e}^{6}-15+\frac {\left (4 \,{\mathrm e}^{3}+6\right )^{2}}{8}} \sqrt {2}\, \erf \left (\sqrt {2}\, x -\frac {\left (4 \,{\mathrm e}^{3}+6\right ) \sqrt {2}}{4}\right )}{4}\) \(277\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-exp(exp(3)^2+(-2*x+2)*exp(3)+x^2-3*x+9)^2+4*x*exp(3)-4*x^2+6*x+1)/exp(exp(3)^2+(-2*x+2)*exp(3)+x^2-3*x+9
)^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.58, size = 397, normalized size = 15.27 \begin {gather*} \frac {1}{4} \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} x - \frac {1}{2} \, \sqrt {2} {\left (2 \, e^{3} + 3\right )}\right ) e^{\left (\frac {1}{2} \, {\left (2 \, e^{3} + 3\right )}^{2} - 2 \, e^{6} - 4 \, e^{3} - 18\right )} - \frac {1}{2} i \, \sqrt {2} {\left (\frac {i \, \sqrt {\pi } {\left (2 \, x - 2 \, e^{3} - 3\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {{\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}}\right ) - 1\right )} {\left (2 \, e^{3} + 3\right )}}{\sqrt {{\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}}} - i \, \sqrt {2} e^{\left (-\frac {1}{2} \, {\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}\right )}\right )} e^{\left (\frac {1}{2} \, {\left (2 \, e^{3} + 3\right )}^{2} - 2 \, e^{6} - 4 \, e^{3} - 15\right )} + \frac {1}{4} i \, \sqrt {2} {\left (\frac {i \, \sqrt {\pi } {\left (2 \, x - 2 \, e^{3} - 3\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {{\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}}\right ) - 1\right )} {\left (2 \, e^{3} + 3\right )}^{2}}{\sqrt {{\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}}} - 2 i \, \sqrt {2} {\left (2 \, e^{3} + 3\right )} e^{\left (-\frac {1}{2} \, {\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}\right )} - \frac {2 i \, {\left (2 \, x - 2 \, e^{3} - 3\right )}^{3} \Gamma \left (\frac {3}{2}, \frac {1}{2} \, {\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}\right )}{{\left ({\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}\right )}^{\frac {3}{2}}}\right )} e^{\left (\frac {1}{2} \, {\left (2 \, e^{3} + 3\right )}^{2} - 2 \, e^{6} - 4 \, e^{3} - 18\right )} - \frac {3}{4} i \, \sqrt {2} {\left (\frac {i \, \sqrt {\pi } {\left (2 \, x - 2 \, e^{3} - 3\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {{\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}}\right ) - 1\right )} {\left (2 \, e^{3} + 3\right )}}{\sqrt {{\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}}} - i \, \sqrt {2} e^{\left (-\frac {1}{2} \, {\left (2 \, x - 2 \, e^{3} - 3\right )}^{2}\right )}\right )} e^{\left (\frac {1}{2} \, {\left (2 \, e^{3} + 3\right )}^{2} - 2 \, e^{6} - 4 \, e^{3} - 18\right )} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-exp(exp(3)^2+(-2*x+2)*exp(3)+x^2-3*x+9)^2+4*x*exp(3)-4*x^2+6*x+1)/exp(exp(3)^2+(-2*x+2)*exp(3)+x^2
-3*x+9)^2,x, algorithm="maxima")

[Out]

1/4*sqrt(2)*sqrt(pi)*erf(sqrt(2)*x - 1/2*sqrt(2)*(2*e^3 + 3))*e^(1/2*(2*e^3 + 3)^2 - 2*e^6 - 4*e^3 - 18) - 1/2
*I*sqrt(2)*(I*sqrt(pi)*(2*x - 2*e^3 - 3)*(erf(sqrt(1/2)*sqrt((2*x - 2*e^3 - 3)^2)) - 1)*(2*e^3 + 3)/sqrt((2*x
- 2*e^3 - 3)^2) - I*sqrt(2)*e^(-1/2*(2*x - 2*e^3 - 3)^2))*e^(1/2*(2*e^3 + 3)^2 - 2*e^6 - 4*e^3 - 15) + 1/4*I*s
qrt(2)*(I*sqrt(pi)*(2*x - 2*e^3 - 3)*(erf(sqrt(1/2)*sqrt((2*x - 2*e^3 - 3)^2)) - 1)*(2*e^3 + 3)^2/sqrt((2*x -
2*e^3 - 3)^2) - 2*I*sqrt(2)*(2*e^3 + 3)*e^(-1/2*(2*x - 2*e^3 - 3)^2) - 2*I*(2*x - 2*e^3 - 3)^3*gamma(3/2, 1/2*
(2*x - 2*e^3 - 3)^2)/((2*x - 2*e^3 - 3)^2)^(3/2))*e^(1/2*(2*e^3 + 3)^2 - 2*e^6 - 4*e^3 - 18) - 3/4*I*sqrt(2)*(
I*sqrt(pi)*(2*x - 2*e^3 - 3)*(erf(sqrt(1/2)*sqrt((2*x - 2*e^3 - 3)^2)) - 1)*(2*e^3 + 3)/sqrt((2*x - 2*e^3 - 3)
^2) - I*sqrt(2)*e^(-1/2*(2*x - 2*e^3 - 3)^2))*e^(1/2*(2*e^3 + 3)^2 - 2*e^6 - 4*e^3 - 18) - x

________________________________________________________________________________________

mupad [B]  time = 0.21, size = 34, normalized size = 1.31 \begin {gather*} x\,{\mathrm {e}}^{-4\,{\mathrm {e}}^3}\,{\mathrm {e}}^{-2\,{\mathrm {e}}^6}\,{\mathrm {e}}^{6\,x}\,{\mathrm {e}}^{-18}\,{\mathrm {e}}^{-2\,x^2}\,{\mathrm {e}}^{4\,x\,{\mathrm {e}}^3}-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(6*x - 2*exp(6) - 2*x^2 + 2*exp(3)*(2*x - 2) - 18)*(6*x - exp(2*exp(6) - 6*x + 2*x^2 - 2*exp(3)*(2*x -
2) + 18) + 4*x*exp(3) - 4*x^2 + 1),x)

[Out]

x*exp(-4*exp(3))*exp(-2*exp(6))*exp(6*x)*exp(-18)*exp(-2*x^2)*exp(4*x*exp(3)) - x

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 29, normalized size = 1.12 \begin {gather*} x e^{- 2 x^{2} + 6 x - 2 \left (2 - 2 x\right ) e^{3} - 2 e^{6} - 18} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-exp(exp(3)**2+(-2*x+2)*exp(3)+x**2-3*x+9)**2+4*x*exp(3)-4*x**2+6*x+1)/exp(exp(3)**2+(-2*x+2)*exp(3
)+x**2-3*x+9)**2,x)

[Out]

x*exp(-2*x**2 + 6*x - 2*(2 - 2*x)*exp(3) - 2*exp(6) - 18) - x

________________________________________________________________________________________