3.1.43 \(\int e^{-x/2} (-1+e^{x/2})^3 \, dx\) [43]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 25, normalized size of antiderivative = 1.00, 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 = {2280, 45} \begin {gather*} 3 x+2 e^{-x/2}-6 e^{x/2}+e^x \end {gather*}

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 45

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

Rule 2280

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]

Rubi steps

\begin {align*} \int e^{-x/2} \left (-1+e^{x/2}\right )^3 \, dx &=2 \text {Subst}\left (\int \frac {(-1+x)^3}{x^2} \, dx,x,e^{x/2}\right )\\ &=2 \text {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.02, size = 33, normalized size = 1.32 \begin {gather*} e^{-x/2} \left (2-6 e^x+e^{3 x/2}\right )+6 \log \left (e^{x/2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 29, normalized size = 1.16

method result size
risch \({\mathrm e}^{x}+3 x -6 \,{\mathrm e}^{\frac {x}{2}}+2 \,{\mathrm e}^{-\frac {x}{2}}\) \(19\)
derivativedivides \({\mathrm e}^{x}-6 \,{\mathrm e}^{\frac {x}{2}}+2 \,{\mathrm e}^{-\frac {x}{2}}+6 \ln \left ({\mathrm e}^{\frac {x}{2}}\right )\) \(29\)
default \({\mathrm e}^{x}-6 \,{\mathrm e}^{\frac {x}{2}}+2 \,{\mathrm e}^{-\frac {x}{2}}+6 \ln \left ({\mathrm e}^{\frac {x}{2}}\right )\) \(29\)
norman \(\left (2+{\mathrm e}^{\frac {3 x}{2}}-6 \,{\mathrm e}^{x}+3 x \,{\mathrm e}^{\frac {x}{2}}\right ) {\mathrm e}^{-\frac {x}{2}}\) \(31\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 3.13, size = 18, normalized size = 0.72 \begin {gather*} 3 \, x - 6 \, e^{\left (\frac {1}{2} \, x\right )} + 2 \, e^{\left (-\frac {1}{2} \, x\right )} + e^{x} \end {gather*}

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 = 0.66, size = 22, normalized size = 0.88 \begin {gather*} {\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 {gather*}

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.03, size = 19, normalized size = 0.76 \begin {gather*} 3 x - 6 e^{\frac {x}{2}} + e^{x} + 2 e^{- \frac {x}{2}} \end {gather*}

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.24, size = 18, normalized size = 0.72 \begin {gather*} 3 \, x - 6 \, e^{\left (\frac {1}{2} \, x\right )} + 2 \, e^{\left (-\frac {1}{2} \, x\right )} + e^{x} \end {gather*}

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

________________________________________________________________________________________

Mupad [B]
time = 0.22, size = 18, normalized size = 0.72 \begin {gather*} 3\,x+2\,{\mathrm {e}}^{-\frac {x}{2}}-6\,{\mathrm {e}}^{x/2}+{\mathrm {e}}^x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________