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

Optimal. Leaf size=25 \[ -4+e^x-x+\frac {e^{\frac {x^2}{6}}}{e+2 x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.26, antiderivative size = 36, normalized size of antiderivative = 1.44, number of steps used = 7, number of rules used = 5, integrand size = 72, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {27, 12, 6742, 2194, 2288} \begin {gather*} \frac {e^{\frac {x^2}{6}} \left (2 x^2+e x\right )}{(2 x+e)^2 x}-x+e^x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, 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 \frac {-3 e^2-12 e x-12 x^2+e^{\frac {x^2}{6}} \left (-6+e x+2 x^2\right )+e^x \left (3 e^2+12 e x+12 x^2\right )}{3 (e+2 x)^2} \, dx\\ &=\frac {1}{3} \int \frac {-3 e^2-12 e x-12 x^2+e^{\frac {x^2}{6}} \left (-6+e x+2 x^2\right )+e^x \left (3 e^2+12 e x+12 x^2\right )}{(e+2 x)^2} \, dx\\ &=\frac {1}{3} \int \left (3 \left (-1+e^x\right )+\frac {e^{\frac {x^2}{6}} \left (-6+e x+2 x^2\right )}{(e+2 x)^2}\right ) \, dx\\ &=\frac {1}{3} \int \frac {e^{\frac {x^2}{6}} \left (-6+e x+2 x^2\right )}{(e+2 x)^2} \, dx+\int \left (-1+e^x\right ) \, dx\\ &=-x+\frac {e^{\frac {x^2}{6}} \left (e x+2 x^2\right )}{x (e+2 x)^2}+\int e^x \, dx\\ &=e^x-x+\frac {e^{\frac {x^2}{6}} \left (e x+2 x^2\right )}{x (e+2 x)^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 24, normalized size = 0.96 \begin {gather*} e^x-x+\frac {e^{\frac {x^2}{6}}}{e+2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.20, size = 39, normalized size = 1.56 \begin {gather*} -\frac {2 \, x^{2} + x e - 2 \, x e^{x} - e^{\left (\frac {1}{6} \, x^{2}\right )} - e^{\left (x + 1\right )}}{2 \, x + e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.24, size = 22, normalized size = 0.88




method result size



risch \(-x +{\mathrm e}^{x}+\frac {{\mathrm e}^{\frac {x^{2}}{6}}}{{\mathrm e}+2 x}\) \(22\)
norman \(\frac {{\mathrm e} \,{\mathrm e}^{x}-2 x^{2}+2 \,{\mathrm e}^{x} x +\frac {{\mathrm e}^{2}}{2}+{\mathrm e}^{\frac {x^{2}}{6}}}{{\mathrm e}+2 x}\) \(38\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 73, normalized size = 2.92 \begin {gather*} -{\left (\frac {e}{2 \, x + e} + \log \left (2 \, x + e\right )\right )} e + e \log \left (2 \, x + e\right ) - x + \frac {{\left (2 \, x + e\right )} e^{x} + e^{\left (\frac {1}{6} \, x^{2}\right )}}{2 \, x + e} + \frac {e^{2}}{2 \, x + e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.71, size = 21, normalized size = 0.84 \begin {gather*} {\mathrm {e}}^x-x+\frac {{\mathrm {e}}^{\frac {x^2}{6}}}{2\,\left (x+\frac {\mathrm {e}}{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x + exp(x) + exp(x**2/6)/(2*x + E)

________________________________________________________________________________________