3.17.17 \(\int \frac {1}{2} (20+e^{\frac {1}{2} (-x+2 e^2 x-4 x^2)} (1-2 e^2+8 x)) \, dx\) [1617]

Optimal. Leaf size=30 \[ -e^{-x+x \left (e^2-\left (2-\frac {1}{2 x}\right ) x\right )}+10 x \]

[Out]

10*x-exp(x*(exp(2)-x*(2-1/2/x))-x)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 26, normalized size of antiderivative = 0.87, number of steps used = 4, number of rules used = 3, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {12, 2276, 2268} \begin {gather*} 10 x-e^{-2 x^2-\frac {1}{2} \left (1-2 e^2\right ) x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(20 + E^((-x + 2*E^2*x - 4*x^2)/2)*(1 - 2*E^2 + 8*x))/2,x]

[Out]

-E^(-1/2*((1 - 2*E^2)*x) - 2*x^2) + 10*x

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2268

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] /; FreeQ[{F, a, b, c, d, e}, x] && EqQ[b*e - 2*c*d, 0]

Rule 2276

Int[(F_)^(v_)*(u_)^(m_.), x_Symbol] :> Int[ExpandToSum[u, x]^m*F^ExpandToSum[v, x], x] /; FreeQ[{F, m}, x] &&
LinearQ[u, x] && QuadraticQ[v, x] &&  !(LinearMatchQ[u, x] && QuadraticMatchQ[v, x])

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{2} \int \left (20+e^{\frac {1}{2} \left (-x+2 e^2 x-4 x^2\right )} \left (1-2 e^2+8 x\right )\right ) \, dx\\ &=10 x+\frac {1}{2} \int e^{\frac {1}{2} \left (-x+2 e^2 x-4 x^2\right )} \left (1-2 e^2+8 x\right ) \, dx\\ &=10 x+\frac {1}{2} \int e^{\frac {1}{2} \left (-1+2 e^2\right ) x-2 x^2} \left (1-2 e^2+8 x\right ) \, dx\\ &=-e^{-\frac {1}{2} \left (1-2 e^2\right ) x-2 x^2}+10 x\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 23, normalized size = 0.77 \begin {gather*} -e^{-\frac {1}{2} x \left (1-2 e^2+4 x\right )}+10 x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(20 + E^((-x + 2*E^2*x - 4*x^2)/2)*(1 - 2*E^2 + 8*x))/2,x]

[Out]

-E^(-1/2*(x*(1 - 2*E^2 + 4*x))) + 10*x

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.08, size = 125, normalized size = 4.17

method result size
risch \(10 x -{\mathrm e}^{\frac {x \left (2 \,{\mathrm e}^{2}-4 x -1\right )}{2}}\) \(20\)
norman \(10 x -{\mathrm e}^{{\mathrm e}^{2} x -2 x^{2}-\frac {x}{2}}\) \(21\)
default \(10 x +\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {\left ({\mathrm e}^{2}-\frac {1}{2}\right )^{2}}{8}} \sqrt {2}\, \erf \left (\sqrt {2}\, x -\frac {\left ({\mathrm e}^{2}-\frac {1}{2}\right ) \sqrt {2}}{4}\right )}{8}-{\mathrm e}^{-2 x^{2}+\left ({\mathrm e}^{2}-\frac {1}{2}\right ) x}+\frac {\left ({\mathrm e}^{2}-\frac {1}{2}\right ) \sqrt {\pi }\, {\mathrm e}^{\frac {\left ({\mathrm e}^{2}-\frac {1}{2}\right )^{2}}{8}} \sqrt {2}\, \erf \left (\sqrt {2}\, x -\frac {\left ({\mathrm e}^{2}-\frac {1}{2}\right ) \sqrt {2}}{4}\right )}{4}-\frac {\sqrt {\pi }\, {\mathrm e}^{2+\frac {\left ({\mathrm e}^{2}-\frac {1}{2}\right )^{2}}{8}} \sqrt {2}\, \erf \left (\sqrt {2}\, x -\frac {\left ({\mathrm e}^{2}-\frac {1}{2}\right ) \sqrt {2}}{4}\right )}{4}\) \(125\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*(-2*exp(2)+8*x+1)*exp(exp(2)*x-2*x^2-1/2*x)+10,x,method=_RETURNVERBOSE)

[Out]

10*x+1/8*Pi^(1/2)*exp(1/8*(exp(2)-1/2)^2)*2^(1/2)*erf(2^(1/2)*x-1/4*(exp(2)-1/2)*2^(1/2))-exp(-2*x^2+(exp(2)-1
/2)*x)+1/4*(exp(2)-1/2)*Pi^(1/2)*exp(1/8*(exp(2)-1/2)^2)*2^(1/2)*erf(2^(1/2)*x-1/4*(exp(2)-1/2)*2^(1/2))-1/4*P
i^(1/2)*exp(2+1/8*(exp(2)-1/2)^2)*2^(1/2)*erf(2^(1/2)*x-1/4*(exp(2)-1/2)*2^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.25, size = 20, normalized size = 0.67 \begin {gather*} 10 \, x - e^{\left (-2 \, x^{2} + x e^{2} - \frac {1}{2} \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(-2*exp(2)+8*x+1)*exp(exp(2)*x-2*x^2-1/2*x)+10,x, algorithm="maxima")

[Out]

10*x - e^(-2*x^2 + x*e^2 - 1/2*x)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 20, normalized size = 0.67 \begin {gather*} 10 \, x - e^{\left (-2 \, x^{2} + x e^{2} - \frac {1}{2} \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(-2*exp(2)+8*x+1)*exp(exp(2)*x-2*x^2-1/2*x)+10,x, algorithm="fricas")

[Out]

10*x - e^(-2*x^2 + x*e^2 - 1/2*x)

________________________________________________________________________________________

Sympy [A]
time = 0.05, size = 17, normalized size = 0.57 \begin {gather*} 10 x - e^{- 2 x^{2} - \frac {x}{2} + x e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(-2*exp(2)+8*x+1)*exp(exp(2)*x-2*x**2-1/2*x)+10,x)

[Out]

10*x - exp(-2*x**2 - x/2 + x*exp(2))

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 20, normalized size = 0.67 \begin {gather*} 10 \, x - e^{\left (-2 \, x^{2} + x e^{2} - \frac {1}{2} \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(-2*exp(2)+8*x+1)*exp(exp(2)*x-2*x^2-1/2*x)+10,x, algorithm="giac")

[Out]

10*x - e^(-2*x^2 + x*e^2 - 1/2*x)

________________________________________________________________________________________

Mupad [B]
time = 1.16, size = 20, normalized size = 0.67 \begin {gather*} 10\,x-{\mathrm {e}}^{x\,{\mathrm {e}}^2-\frac {x}{2}-2\,x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(x*exp(2) - x/2 - 2*x^2)*(8*x - 2*exp(2) + 1))/2 + 10,x)

[Out]

10*x - exp(x*exp(2) - x/2 - 2*x^2)

________________________________________________________________________________________