3.9.49 \(\int \frac {2-4 x+2 x^2+e^{\frac {1}{2} (-12+e^2 (-5+x)+4 x^2)} (-2+e^2 (-1+x)-8 x+8 x^2)}{2-4 x+2 x^2} \, dx\)

Optimal. Leaf size=27 \[ \frac {e^{-6+\frac {1}{2} e^2 (-5+x)+2 x^2}}{-1+x}+x \]

________________________________________________________________________________________

Rubi [B]  time = 0.44, antiderivative size = 65, normalized size of antiderivative = 2.41, number of steps used = 5, number of rules used = 4, integrand size = 61, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.066, Rules used = {27, 12, 6742, 2288} \begin {gather*} x-\frac {e^{2 x^2+\frac {e^2 x}{2}+\frac {1}{2} \left (-12-5 e^2\right )} \left (-8 x^2+\left (8-e^2\right ) x+e^2\right )}{(1-x)^2 \left (8 x+e^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - (E^((-12 - 5*E^2)/2 + (E^2*x)/2 + 2*x^2)*(E^2 + (8 - E^2)*x - 8*x^2))/((1 - x)^2*(E^2 + 8*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 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

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 \frac {2-4 x+2 x^2+e^{\frac {1}{2} \left (-12+e^2 (-5+x)+4 x^2\right )} \left (-2+e^2 (-1+x)-8 x+8 x^2\right )}{2 (-1+x)^2} \, dx\\ &=\frac {1}{2} \int \frac {2-4 x+2 x^2+e^{\frac {1}{2} \left (-12+e^2 (-5+x)+4 x^2\right )} \left (-2+e^2 (-1+x)-8 x+8 x^2\right )}{(-1+x)^2} \, dx\\ &=\frac {1}{2} \int \left (2+\frac {e^{\frac {1}{2} \left (-12-5 e^2\right )+\frac {e^2 x}{2}+2 x^2} \left (-2-e^2-\left (8-e^2\right ) x+8 x^2\right )}{(1-x)^2}\right ) \, dx\\ &=x+\frac {1}{2} \int \frac {e^{\frac {1}{2} \left (-12-5 e^2\right )+\frac {e^2 x}{2}+2 x^2} \left (-2-e^2-\left (8-e^2\right ) x+8 x^2\right )}{(1-x)^2} \, dx\\ &=x-\frac {e^{\frac {1}{2} \left (-12-5 e^2\right )+\frac {e^2 x}{2}+2 x^2} \left (e^2+\left (8-e^2\right ) x-8 x^2\right )}{(1-x)^2 \left (e^2+8 x\right )}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 27, normalized size = 1.00 \begin {gather*} \frac {e^{-6+\frac {1}{2} e^2 (-5+x)+2 x^2}}{-1+x}+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(-6 + (E^2*(-5 + x))/2 + 2*x^2)/(-1 + x) + x

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 28, normalized size = 1.04 \begin {gather*} \frac {x^{2} - x + e^{\left (2 \, x^{2} + \frac {1}{2} \, {\left (x - 5\right )} e^{2} - 6\right )}}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x-1)*exp(2)+8*x^2-8*x-2)*exp(1/4*(x-5)*exp(2)+x^2-3)^2+2*x^2-4*x+2)/(2*x^2-4*x+2),x, algorithm="f
ricas")

[Out]

(x^2 - x + e^(2*x^2 + 1/2*(x - 5)*e^2 - 6))/(x - 1)

________________________________________________________________________________________

giac [A]  time = 0.36, size = 41, normalized size = 1.52 \begin {gather*} \frac {x^{2} e^{2} - x e^{2} + e^{\left (2 \, x^{2} + \frac {1}{2} \, x e^{2} - \frac {5}{2} \, e^{2} - 4\right )}}{x e^{2} - e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x-1)*exp(2)+8*x^2-8*x-2)*exp(1/4*(x-5)*exp(2)+x^2-3)^2+2*x^2-4*x+2)/(2*x^2-4*x+2),x, algorithm="g
iac")

[Out]

(x^2*e^2 - x*e^2 + e^(2*x^2 + 1/2*x*e^2 - 5/2*e^2 - 4))/(x*e^2 - e^2)

________________________________________________________________________________________

maple [A]  time = 0.52, size = 26, normalized size = 0.96




method result size



risch \(\frac {{\mathrm e}^{2 x^{2}+\frac {{\mathrm e}^{2} x}{2}-\frac {5 \,{\mathrm e}^{2}}{2}-6}}{x -1}+x\) \(26\)
norman \(\frac {x^{2}+{\mathrm e}^{\frac {\left (x -5\right ) {\mathrm e}^{2}}{2}+2 x^{2}-6}-1}{x -1}\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((x-1)*exp(2)+8*x^2-8*x-2)*exp(1/4*(x-5)*exp(2)+x^2-3)^2+2*x^2-4*x+2)/(2*x^2-4*x+2),x,method=_RETURNVERBO
SE)

[Out]

exp(2*x^2+1/2*exp(2)*x-5/2*exp(2)-6)/(x-1)+x

________________________________________________________________________________________

maxima [A]  time = 0.57, size = 36, normalized size = 1.33 \begin {gather*} x + \frac {e^{\left (2 \, x^{2} + \frac {1}{2} \, x e^{2}\right )}}{x e^{\left (\frac {5}{2} \, e^{2} + 6\right )} - e^{\left (\frac {5}{2} \, e^{2} + 6\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x-1)*exp(2)+8*x^2-8*x-2)*exp(1/4*(x-5)*exp(2)+x^2-3)^2+2*x^2-4*x+2)/(2*x^2-4*x+2),x, algorithm="m
axima")

[Out]

x + e^(2*x^2 + 1/2*x*e^2)/(x*e^(5/2*e^2 + 6) - e^(5/2*e^2 + 6))

________________________________________________________________________________________

mupad [B]  time = 0.32, size = 25, normalized size = 0.93 \begin {gather*} x+\frac {{\mathrm {e}}^{2\,x^2+\frac {{\mathrm {e}}^2\,x}{2}-\frac {5\,{\mathrm {e}}^2}{2}-6}}{x-1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(4*x + exp((exp(2)*(x - 5))/2 + 2*x^2 - 6)*(8*x - exp(2)*(x - 1) - 8*x^2 + 2) - 2*x^2 - 2)/(2*x^2 - 4*x +
 2),x)

[Out]

x + exp((x*exp(2))/2 - (5*exp(2))/2 + 2*x^2 - 6)/(x - 1)

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 24, normalized size = 0.89 \begin {gather*} x + \frac {e^{2 x^{2} + 2 \left (\frac {x}{4} - \frac {5}{4}\right ) e^{2} - 6}}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((x-1)*exp(2)+8*x**2-8*x-2)*exp(1/4*(x-5)*exp(2)+x**2-3)**2+2*x**2-4*x+2)/(2*x**2-4*x+2),x)

[Out]

x + exp(2*x**2 + 2*(x/4 - 5/4)*exp(2) - 6)/(x - 1)

________________________________________________________________________________________