3.26.35 \(\int \frac {2-e^x+e^{\frac {x^2}{2}} (-3-3 x^2)}{e^{2 x}-4 e^x x+4 x^2+9 e^{x^2} x^2+e^{\frac {x^2}{2}} (6 e^x x-12 x^2)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.18, antiderivative size = 21, normalized size of antiderivative = 0.75, number of steps used = 2, number of rules used = 2, integrand size = 76, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.026, Rules used = {6688, 6686} \begin {gather*} \frac {1}{3 e^{\frac {x^2}{2}} x-2 x+e^x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2 - E^x + E^(x^2/2)*(-3 - 3*x^2))/(E^(2*x) - 4*E^x*x + 4*x^2 + 9*E^x^2*x^2 + E^(x^2/2)*(6*E^x*x - 12*x^2)
),x]

[Out]

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

Rule 6686

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[(q*y^(m + 1))/(m + 1), x] /;  !F
alseQ[q]] /; FreeQ[m, x] && NeQ[m, -1]

Rule 6688

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 21, normalized size = 0.75 \begin {gather*} \frac {1}{e^x-2 x+3 e^{\frac {x^2}{2}} x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.85, size = 17, normalized size = 0.61 \begin {gather*} \frac {1}{3 \, x e^{\left (\frac {1}{2} \, x^{2}\right )} - 2 \, x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 1.09, size = 396, normalized size = 14.14 \begin {gather*} \frac {9 \, x^{3} e^{\left (\frac {3}{2} \, x^{2}\right )} - 6 \, x^{3} e^{\left (x^{2}\right )} - 9 \, x^{2} e^{\left (\frac {3}{2} \, x^{2}\right )} - 4 \, x^{2} e^{\left (\frac {1}{2} \, x^{2}\right )} + 3 \, x^{2} e^{\left (x^{2} + x\right )} + 12 \, x^{2} e^{\left (x^{2}\right )} + 9 \, x e^{\left (\frac {3}{2} \, x^{2}\right )} + 4 \, x e^{\left (\frac {1}{2} \, x^{2}\right )} - 3 \, x e^{\left (x^{2} + x\right )} - 12 \, x e^{\left (x^{2}\right )} + 2 \, x e^{\left (\frac {1}{2} \, x^{2} + x\right )} + 3 \, e^{\left (x^{2} + x\right )} - 2 \, e^{\left (\frac {1}{2} \, x^{2} + x\right )}}{27 \, x^{4} e^{\left (2 \, x^{2}\right )} - 36 \, x^{4} e^{\left (\frac {3}{2} \, x^{2}\right )} + 12 \, x^{4} e^{\left (x^{2}\right )} - 27 \, x^{3} e^{\left (2 \, x^{2}\right )} + 54 \, x^{3} e^{\left (\frac {3}{2} \, x^{2}\right )} + 8 \, x^{3} e^{\left (\frac {1}{2} \, x^{2}\right )} + 18 \, x^{3} e^{\left (\frac {3}{2} \, x^{2} + x\right )} - 12 \, x^{3} e^{\left (x^{2} + x\right )} - 36 \, x^{3} e^{\left (x^{2}\right )} + 27 \, x^{2} e^{\left (2 \, x^{2}\right )} - 54 \, x^{2} e^{\left (\frac {3}{2} \, x^{2}\right )} - 8 \, x^{2} e^{\left (\frac {1}{2} \, x^{2}\right )} - 18 \, x^{2} e^{\left (\frac {3}{2} \, x^{2} + x\right )} + 3 \, x^{2} e^{\left (x^{2} + 2 \, x\right )} + 24 \, x^{2} e^{\left (x^{2} + x\right )} + 36 \, x^{2} e^{\left (x^{2}\right )} - 8 \, x^{2} e^{\left (\frac {1}{2} \, x^{2} + x\right )} + 18 \, x e^{\left (\frac {3}{2} \, x^{2} + x\right )} - 3 \, x e^{\left (x^{2} + 2 \, x\right )} - 24 \, x e^{\left (x^{2} + x\right )} + 2 \, x e^{\left (\frac {1}{2} \, x^{2} + 2 \, x\right )} + 8 \, x e^{\left (\frac {1}{2} \, x^{2} + x\right )} + 3 \, e^{\left (x^{2} + 2 \, x\right )} - 2 \, e^{\left (\frac {1}{2} \, x^{2} + 2 \, x\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(9*x^3*e^(3/2*x^2) - 6*x^3*e^(x^2) - 9*x^2*e^(3/2*x^2) - 4*x^2*e^(1/2*x^2) + 3*x^2*e^(x^2 + x) + 12*x^2*e^(x^2
) + 9*x*e^(3/2*x^2) + 4*x*e^(1/2*x^2) - 3*x*e^(x^2 + x) - 12*x*e^(x^2) + 2*x*e^(1/2*x^2 + x) + 3*e^(x^2 + x) -
 2*e^(1/2*x^2 + x))/(27*x^4*e^(2*x^2) - 36*x^4*e^(3/2*x^2) + 12*x^4*e^(x^2) - 27*x^3*e^(2*x^2) + 54*x^3*e^(3/2
*x^2) + 8*x^3*e^(1/2*x^2) + 18*x^3*e^(3/2*x^2 + x) - 12*x^3*e^(x^2 + x) - 36*x^3*e^(x^2) + 27*x^2*e^(2*x^2) -
54*x^2*e^(3/2*x^2) - 8*x^2*e^(1/2*x^2) - 18*x^2*e^(3/2*x^2 + x) + 3*x^2*e^(x^2 + 2*x) + 24*x^2*e^(x^2 + x) + 3
6*x^2*e^(x^2) - 8*x^2*e^(1/2*x^2 + x) + 18*x*e^(3/2*x^2 + x) - 3*x*e^(x^2 + 2*x) - 24*x*e^(x^2 + x) + 2*x*e^(1
/2*x^2 + 2*x) + 8*x*e^(1/2*x^2 + x) + 3*e^(x^2 + 2*x) - 2*e^(1/2*x^2 + 2*x))

________________________________________________________________________________________

maple [A]  time = 0.04, size = 18, normalized size = 0.64




method result size



risch \(\frac {1}{3 x \,{\mathrm e}^{\frac {x^{2}}{2}}+{\mathrm e}^{x}-2 x}\) \(18\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/(3*x*exp(1/2*x^2)+exp(x)-2*x)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 17, normalized size = 0.61 \begin {gather*} \frac {1}{3 \, x e^{\left (\frac {1}{2} \, x^{2}\right )} - 2 \, x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.60, size = 17, normalized size = 0.61 \begin {gather*} \frac {1}{{\mathrm {e}}^x-2\,x+3\,x\,{\mathrm {e}}^{\frac {x^2}{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(x) + exp(x^2/2)*(3*x^2 + 3) - 2)/(exp(2*x) + exp(x^2/2)*(6*x*exp(x) - 12*x^2) + 9*x^2*exp(x^2) - 4*x
*exp(x) + 4*x^2),x)

[Out]

1/(exp(x) - 2*x + 3*x*exp(x^2/2))

________________________________________________________________________________________

sympy [A]  time = 0.18, size = 17, normalized size = 0.61 \begin {gather*} \frac {1}{3 x e^{\frac {x^{2}}{2}} - 2 x + e^{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/(3*x*exp(x**2/2) - 2*x + exp(x))

________________________________________________________________________________________