3.43 \(\int e^{-x/2} (-1+e^{x/2})^3 \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0246283, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2248, 43} \[ 3 x+2 e^{-x/2}-6 e^{x/2}+e^x \]

Antiderivative was successfully verified.

[In]

Int[(-1 + E^(x/2))^3/E^(x/2),x]

[Out]

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

Rule 2248

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_.)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Wit
h[{m = FullSimplify[(g*h*Log[G])/(d*e*Log[F])]}, Dist[(Denominator[m]*G^(f*h - (c*g*h)/d))/(d*e*Log[F]), Subst
[Int[x^(Numerator[m] - 1)*(a + b*x^Denominator[m])^p, x], x, F^((e*(c + d*x))/Denominator[m])], x] /; LeQ[m, -
1] || GeQ[m, 1]] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int e^{-x/2} \left (-1+e^{x/2}\right )^3 \, dx &=2 \operatorname{Subst}\left (\int \frac{(-1+x)^3}{x^2} \, dx,x,e^{x/2}\right )\\ &=2 \operatorname{Subst}\left (\int \left (-3-\frac{1}{x^2}+\frac{3}{x}+x\right ) \, dx,x,e^{x/2}\right )\\ &=2 e^{-x/2}-6 e^{x/2}+e^x+3 x\\ \end{align*}

Mathematica [A]  time = 0.0130611, size = 25, normalized size = 1. \[ 3 x+2 e^{-x/2}-6 e^{x/2}+e^x \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 29, normalized size = 1.2 \begin{align*} \left ({{\rm e}^{{\frac{x}{2}}}} \right ) ^{2}-6\,{{\rm e}^{x/2}}+6\,\ln \left ({{\rm e}^{x/2}} \right ) +2\, \left ({{\rm e}^{x/2}} \right ) ^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.955786, size = 24, normalized size = 0.96 \begin{align*} 3 \, x - 6 \, e^{\left (\frac{1}{2} \, x\right )} + 2 \, e^{\left (-\frac{1}{2} \, x\right )} + e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.91503, size = 70, normalized size = 2.8 \begin{align*}{\left (3 \, x e^{\left (\frac{1}{2} \, x\right )} + e^{\left (\frac{3}{2} \, x\right )} - 6 \, e^{x} + 2\right )} e^{\left (-\frac{1}{2} \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.098204, size = 19, normalized size = 0.76 \begin{align*} 3 x - 6 e^{\frac{x}{2}} + e^{x} + 2 e^{- \frac{x}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.05295, size = 24, normalized size = 0.96 \begin{align*} 3 \, x - 6 \, e^{\left (\frac{1}{2} \, x\right )} + 2 \, e^{\left (-\frac{1}{2} \, x\right )} + e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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