3.21.81 \(\int \frac {e^{\frac {1}{2} (-2 x-x^2)} (3 x^2+3 x^3+45 e^{1+\frac {1}{2} (2 x+x^2)} \log (3))}{5 x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 1.11, antiderivative size = 26, normalized size of antiderivative = 0.87, number of steps used = 15, number of rules used = 10, integrand size = 52, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {12, 6741, 6742, 2235, 2234, 2205, 2244, 2240, 6688, 30} \begin {gather*} -\frac {3}{5} e^{-\frac {x^2}{2}-x}-\frac {9 e \log (3)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^((-2*x - x^2)/2)*(3*x^2 + 3*x^3 + 45*E^(1 + (2*x + x^2)/2)*Log[3]))/(5*x^2),x]

[Out]

(-3*E^(-x - x^2/2))/5 - (9*E*Log[3])/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 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

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 2235

Int[(F_)^(v_), x_Symbol] :> Int[F^ExpandToSum[v, x], x] /; FreeQ[F, x] && QuadraticQ[v, x] &&  !QuadraticMatch
Q[v, 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 2244

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])

Rule 6688

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

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} &=\frac {1}{5} \int \frac {e^{\frac {1}{2} \left (-2 x-x^2\right )} \left (3 x^2+3 x^3+45 e^{1+\frac {1}{2} \left (2 x+x^2\right )} \log (3)\right )}{x^2} \, dx\\ &=\frac {1}{5} \int \frac {3 e^{\frac {1}{2} (-2-x) x} \left (x^2+x^3+15 e^{1+x+\frac {x^2}{2}} \log (3)\right )}{x^2} \, dx\\ &=\frac {3}{5} \int \frac {e^{\frac {1}{2} (-2-x) x} \left (x^2+x^3+15 e^{1+x+\frac {x^2}{2}} \log (3)\right )}{x^2} \, dx\\ &=\frac {3}{5} \int \left (e^{\frac {1}{2} (-2-x) x}+e^{\frac {1}{2} (-2-x) x} x+\frac {15 e^{1+x+\frac {1}{2} (-2-x) x+\frac {x^2}{2}} \log (3)}{x^2}\right ) \, dx\\ &=\frac {3}{5} \int e^{\frac {1}{2} (-2-x) x} \, dx+\frac {3}{5} \int e^{\frac {1}{2} (-2-x) x} x \, dx+(9 \log (3)) \int \frac {e^{1+x+\frac {1}{2} (-2-x) x+\frac {x^2}{2}}}{x^2} \, dx\\ &=\frac {3}{5} \int e^{-x-\frac {x^2}{2}} \, dx+\frac {3}{5} \int e^{-x-\frac {x^2}{2}} x \, dx+(9 \log (3)) \int \frac {e}{x^2} \, dx\\ &=-\frac {3}{5} e^{-x-\frac {x^2}{2}}-\frac {3}{5} \int e^{-x-\frac {x^2}{2}} \, dx+\frac {1}{5} \left (3 \sqrt {e}\right ) \int e^{-\frac {1}{2} (-1-x)^2} \, dx+(9 e \log (3)) \int \frac {1}{x^2} \, dx\\ &=-\frac {3}{5} e^{-x-\frac {x^2}{2}}+\frac {3}{5} \sqrt {\frac {e \pi }{2}} \text {erf}\left (\frac {1+x}{\sqrt {2}}\right )-\frac {9 e \log (3)}{x}-\frac {1}{5} \left (3 \sqrt {e}\right ) \int e^{-\frac {1}{2} (-1-x)^2} \, dx\\ &=-\frac {3}{5} e^{-x-\frac {x^2}{2}}-\frac {9 e \log (3)}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 25, normalized size = 0.83 \begin {gather*} \frac {3}{5} \left (-e^{-\frac {1}{2} x (2+x)}-\frac {15 e \log (3)}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^((-2*x - x^2)/2)*(3*x^2 + 3*x^3 + 45*E^(1 + (2*x + x^2)/2)*Log[3]))/(5*x^2),x]

[Out]

(3*(-E^(-1/2*(x*(2 + x))) - (15*E*Log[3])/x))/5

________________________________________________________________________________________

fricas [A]  time = 0.86, size = 34, normalized size = 1.13 \begin {gather*} -\frac {3 \, {\left (x e + 15 \, e^{\left (\frac {1}{2} \, x^{2} + x + 2\right )} \log \relax (3)\right )} e^{\left (-\frac {1}{2} \, x^{2} - x - 1\right )}}{5 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/5*(45*exp(1)*log(3)*exp(1/2*x^2+x)+3*x^3+3*x^2)/x^2/exp(1/2*x^2+x),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.25, size = 24, normalized size = 0.80 \begin {gather*} -\frac {3 \, {\left (x e^{\left (-\frac {1}{2} \, x^{2} - x\right )} + 15 \, e \log \relax (3)\right )}}{5 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/5*(45*exp(1)*log(3)*exp(1/2*x^2+x)+3*x^3+3*x^2)/x^2/exp(1/2*x^2+x),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 20, normalized size = 0.67




method result size



risch \(-\frac {9 \,{\mathrm e} \ln \relax (3)}{x}-\frac {3 \,{\mathrm e}^{-\frac {x \left (2+x \right )}{2}}}{5}\) \(20\)
default \(-\frac {3 \,{\mathrm e}^{-\frac {1}{2} x^{2}-x}}{5}-\frac {9 \,{\mathrm e} \ln \relax (3)}{x}\) \(23\)
norman \(\frac {\left (-\frac {3 x}{5}-9 \,{\mathrm e} \ln \relax (3) {\mathrm e}^{\frac {1}{2} x^{2}+x}\right ) {\mathrm e}^{-\frac {1}{2} x^{2}-x}}{x}\) \(33\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/5*(45*exp(1)*ln(3)*exp(1/2*x^2+x)+3*x^3+3*x^2)/x^2/exp(1/2*x^2+x),x,method=_RETURNVERBOSE)

[Out]

-9*exp(1)*ln(3)/x-3/5*exp(-1/2*x*(2+x))

________________________________________________________________________________________

maxima [C]  time = 0.78, size = 83, normalized size = 2.77 \begin {gather*} \frac {3}{10} \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\frac {1}{2} \, \sqrt {2} x + \frac {1}{2} \, \sqrt {2}\right ) e^{\frac {1}{2}} + \frac {3}{10} i \, \sqrt {2} {\left (\frac {i \, \sqrt {\pi } {\left (x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {{\left (x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {{\left (x + 1\right )}^{2}}} + i \, \sqrt {2} e^{\left (-\frac {1}{2} \, {\left (x + 1\right )}^{2}\right )}\right )} e^{\frac {1}{2}} - \frac {9 \, e \log \relax (3)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/5*(45*exp(1)*log(3)*exp(1/2*x^2+x)+3*x^3+3*x^2)/x^2/exp(1/2*x^2+x),x, algorithm="maxima")

[Out]

3/10*sqrt(2)*sqrt(pi)*erf(1/2*sqrt(2)*x + 1/2*sqrt(2))*e^(1/2) + 3/10*I*sqrt(2)*(I*sqrt(pi)*(x + 1)*(erf(sqrt(
1/2)*sqrt((x + 1)^2)) - 1)/sqrt((x + 1)^2) + I*sqrt(2)*e^(-1/2*(x + 1)^2))*e^(1/2) - 9*e*log(3)/x

________________________________________________________________________________________

mupad [B]  time = 1.20, size = 22, normalized size = 0.73 \begin {gather*} -\frac {3\,{\mathrm {e}}^{-\frac {x^2}{2}-x}}{5}-\frac {9\,\mathrm {e}\,\ln \relax (3)}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(- x - x^2/2)*((3*x^2)/5 + (3*x^3)/5 + 9*exp(1)*exp(x + x^2/2)*log(3)))/x^2,x)

[Out]

- (3*exp(- x - x^2/2))/5 - (9*exp(1)*log(3))/x

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 24, normalized size = 0.80 \begin {gather*} - \frac {3 e^{- \frac {x^{2}}{2} - x}}{5} - \frac {9 e \log {\relax (3 )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/5*(45*exp(1)*ln(3)*exp(1/2*x**2+x)+3*x**3+3*x**2)/x**2/exp(1/2*x**2+x),x)

[Out]

-3*exp(-x**2/2 - x)/5 - 9*E*log(3)/x

________________________________________________________________________________________