\(\int e^{-n x} (a+b e^{n x})^3 \, dx\) [29]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 52 \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=-\frac {a^3 e^{-n x}}{n}+\frac {3 a b^2 e^{n x}}{n}+\frac {b^3 e^{2 n x}}{2 n}+3 a^2 b x \]

[Out]

-a^3/exp(n*x)/n+3*a*b^2*exp(n*x)/n+1/2*b^3*exp(2*n*x)/n+3*a^2*b*x

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2280, 45} \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=-\frac {a^3 e^{-n x}}{n}+3 a^2 b x+\frac {3 a b^2 e^{n x}}{n}+\frac {b^3 e^{2 n x}}{2 n} \]

[In]

Int[(a + b*E^(n*x))^3/E^(n*x),x]

[Out]

-(a^3/(E^(n*x)*n)) + (3*a*b^2*E^(n*x))/n + (b^3*E^(2*n*x))/(2*n) + 3*a^2*b*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*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {(a+b x)^3}{x^2} \, dx,x,e^{n x}\right )}{n} \\ & = \frac {\text {Subst}\left (\int \left (3 a b^2+\frac {a^3}{x^2}+\frac {3 a^2 b}{x}+b^3 x\right ) \, dx,x,e^{n x}\right )}{n} \\ & = -\frac {a^3 e^{-n x}}{n}+\frac {3 a b^2 e^{n x}}{n}+\frac {b^3 e^{2 n x}}{2 n}+3 a^2 b x \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.02 \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=\frac {-2 a^3 e^{-n x}+6 a b^2 e^{n x}+b^3 e^{2 n x}-6 a^2 b \log \left (e^{-n x}\right )}{2 n} \]

[In]

Integrate[(a + b*E^(n*x))^3/E^(n*x),x]

[Out]

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

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.94

method result size
derivativedivides \(\frac {\frac {b^{3} {\mathrm e}^{2 n x}}{2}+3 \,{\mathrm e}^{n x} a \,b^{2}-a^{3} {\mathrm e}^{-n x}+3 a^{2} b \ln \left ({\mathrm e}^{n x}\right )}{n}\) \(49\)
default \(\frac {\frac {b^{3} {\mathrm e}^{2 n x}}{2}+3 \,{\mathrm e}^{n x} a \,b^{2}-a^{3} {\mathrm e}^{-n x}+3 a^{2} b \ln \left ({\mathrm e}^{n x}\right )}{n}\) \(49\)
risch \(3 a^{2} b x +\frac {b^{3} {\mathrm e}^{2 n x}}{2 n}+\frac {3 a \,b^{2} {\mathrm e}^{n x}}{n}-\frac {a^{3} {\mathrm e}^{-n x}}{n}\) \(50\)
parts \(3 a^{2} b x +\frac {b^{3} {\mathrm e}^{2 n x}}{2 n}+\frac {3 a \,b^{2} {\mathrm e}^{n x}}{n}-\frac {a^{3} {\mathrm e}^{-n x}}{n}\) \(50\)
parallelrisch \(\frac {\left (6 x \,{\mathrm e}^{n x} a^{2} b n +{\mathrm e}^{3 n x} b^{3}+6 \,{\mathrm e}^{2 n x} a \,b^{2}-2 a^{3}\right ) {\mathrm e}^{-n x}}{2 n}\) \(52\)
norman \(\left (-\frac {a^{3}}{n}+\frac {b^{3} {\mathrm e}^{3 n x}}{2 n}+\frac {3 a \,b^{2} {\mathrm e}^{2 n x}}{n}+3 a^{2} b x \,{\mathrm e}^{n x}\right ) {\mathrm e}^{-n x}\) \(57\)

[In]

int((a+b*exp(n*x))^3/exp(n*x),x,method=_RETURNVERBOSE)

[Out]

1/n*(1/2*b^3*exp(n*x)^2+3*exp(n*x)*a*b^2-a^3/exp(n*x)+3*a^2*b*ln(exp(n*x)))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.92 \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=\frac {{\left (6 \, a^{2} b n x e^{\left (n x\right )} + b^{3} e^{\left (3 \, n x\right )} + 6 \, a b^{2} e^{\left (2 \, n x\right )} - 2 \, a^{3}\right )} e^{\left (-n x\right )}}{2 \, n} \]

[In]

integrate((a+b*exp(n*x))^3/exp(n*x),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.37 \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=3 a^{2} b x + \begin {cases} \frac {- 2 a^{3} n^{2} e^{- n x} + 6 a b^{2} n^{2} e^{n x} + b^{3} n^{2} e^{2 n x}}{2 n^{3}} & \text {for}\: n^{3} \neq 0 \\x \left (a^{3} + 3 a b^{2} + b^{3}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((a+b*exp(n*x))**3/exp(n*x),x)

[Out]

3*a**2*b*x + Piecewise(((-2*a**3*n**2*exp(-n*x) + 6*a*b**2*n**2*exp(n*x) + b**3*n**2*exp(2*n*x))/(2*n**3), Ne(
n**3, 0)), (x*(a**3 + 3*a*b**2 + b**3), True))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.90 \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=3 \, a^{2} b x + \frac {b^{3} e^{\left (2 \, n x\right )}}{2 \, n} + \frac {3 \, a b^{2} e^{\left (n x\right )}}{n} - \frac {a^{3} e^{\left (-n x\right )}}{n} \]

[In]

integrate((a+b*exp(n*x))^3/exp(n*x),x, algorithm="maxima")

[Out]

3*a^2*b*x + 1/2*b^3*e^(2*n*x)/n + 3*a*b^2*e^(n*x)/n - a^3*e^(-n*x)/n

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.90 \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=3 \, a^{2} b x + \frac {b^{3} e^{\left (2 \, n x\right )}}{2 \, n} + \frac {3 \, a b^{2} e^{\left (n x\right )}}{n} - \frac {a^{3} e^{\left (-n x\right )}}{n} \]

[In]

integrate((a+b*exp(n*x))^3/exp(n*x),x, algorithm="giac")

[Out]

3*a^2*b*x + 1/2*b^3*e^(2*n*x)/n + 3*a*b^2*e^(n*x)/n - a^3*e^(-n*x)/n

Mupad [B] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.85 \[ \int e^{-n x} \left (a+b e^{n x}\right )^3 \, dx=\frac {{\mathrm {e}}^{-n\,x}\,\left (-2\,a^3+6\,{\mathrm {e}}^{2\,n\,x}\,a\,b^2+{\mathrm {e}}^{3\,n\,x}\,b^3\right )}{2\,n}+3\,a^2\,b\,x \]

[In]

int(exp(-n*x)*(a + b*exp(n*x))^3,x)

[Out]

(exp(-n*x)*(b^3*exp(3*n*x) - 2*a^3 + 6*a*b^2*exp(2*n*x)))/(2*n) + 3*a^2*b*x