3.2.88 \(\int \frac {2 e^{-x} (2-x) \sqrt {e^{2+x} x^2}}{x} \, dx\) [188]

Optimal. Leaf size=20 \[ 4 e^{-x} \sqrt {e^{2+x} x^2} \]

[Out]

4*(x^2*exp(2+x))^(1/2)/exp(x)

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(52\) vs. \(2(20)=40\).
time = 0.22, antiderivative size = 52, normalized size of antiderivative = 2.60, number of steps used = 6, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {12, 6851, 2319, 2218, 2207, 2225} \begin {gather*} \frac {8 e^{-x} \sqrt {e^{x+2} x^2}}{x}-\frac {4 e^{-x} (2-x) \sqrt {e^{x+2} x^2}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2*(2 - x)*Sqrt[E^(2 + x)*x^2])/(E^x*x),x]

[Out]

(8*Sqrt[E^(2 + x)*x^2])/(E^x*x) - (4*(2 - x)*Sqrt[E^(2 + x)*x^2])/(E^x*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 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2218

Int[((a_.) + (b_.)*((F_)^((g_.)*(v_)))^(n_.))^(p_.)*(u_)^(m_.), x_Symbol] :> Int[NormalizePowerOfLinear[u, x]^
m*(a + b*(F^(g*ExpandToSum[v, x]))^n)^p, x] /; FreeQ[{F, a, b, g, n, p}, x] && LinearQ[v, x] && PowerOfLinearQ
[u, x] &&  !(LinearMatchQ[v, x] && PowerOfLinearMatchQ[u, x]) && IntegerQ[m]

Rule 2225

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 2319

Int[(u_.)*((a_.)*(F_)^(v_))^(n_), x_Symbol] :> Dist[(a*F^v)^n/F^(n*v), Int[u*F^(n*v), x], x] /; FreeQ[{F, a, n
}, x] &&  !IntegerQ[n]

Rule 6851

Int[(u_.)*((a_.)*(v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a*v^m*w^n)^FracPart[p]/(v^(m*Fr
acPart[p])*w^(n*FracPart[p]))), Int[u*v^(m*p)*w^(n*p), x], x] /; FreeQ[{a, m, n, p}, x] &&  !IntegerQ[p] &&  !
FreeQ[v, x] &&  !FreeQ[w, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 21, normalized size = 1.05 \begin {gather*} \frac {4 e^2 x^2}{\sqrt {e^{2+x} x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2*(2 - x)*Sqrt[E^(2 + x)*x^2])/(E^x*x),x]

[Out]

(4*E^2*x^2)/Sqrt[E^(2 + x)*x^2]

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 17, normalized size = 0.85

method result size
gosper \(4 \sqrt {x^{2} {\mathrm e}^{2+x}}\, {\mathrm e}^{-x}\) \(17\)
risch \(4 \sqrt {x^{2} {\mathrm e}^{2+x}}\, {\mathrm e}^{-x}\) \(17\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*(x^2*exp(2+x))^(1/2)/exp(x)

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 24, normalized size = 1.20 \begin {gather*} 4 \, {\left (x e + 2 \, e\right )} e^{\left (-\frac {1}{2} \, x\right )} - 8 \, e^{\left (-\frac {1}{2} \, x + 1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 46.40, size = 17, normalized size = 0.85 \begin {gather*} 4 e \sqrt {x^{2} e^{x}} e^{- x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*E*sqrt(x**2*exp(x))*exp(-x)

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 24, normalized size = 1.20 \begin {gather*} 4 \, {\left (x - 2\right )} e^{\left (-\frac {1}{2} \, x + 1\right )} \mathrm {sgn}\left (x\right ) + 8 \, e^{\left (-\frac {1}{2} \, x + 1\right )} \mathrm {sgn}\left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.34, size = 13, normalized size = 0.65 \begin {gather*} 4\,{\mathrm {e}}^{1-\frac {x}{2}}\,\sqrt {x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*exp(1 - x/2)*(x^2)^(1/2)

________________________________________________________________________________________