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

   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 = 16, antiderivative size = 16 \[ \int e^{-n x} \left (a+b e^{n x}\right ) \, dx=-\frac {a e^{-n x}}{n}+b x \]

[Out]

-a/exp(n*x)/n+b*x

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, 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.125, Rules used = {2280, 45} \[ \int e^{-n x} \left (a+b e^{n x}\right ) \, dx=b x-\frac {a e^{-n x}}{n} \]

[In]

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

[Out]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int e^{-n x} \left (a+b e^{n x}\right ) \, dx=-\frac {a e^{-n x}}{n}+b x \]

[In]

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

[Out]

-(a/(E^(n*x)*n)) + b*x

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00

method result size
risch \(-\frac {a \,{\mathrm e}^{-n x}}{n}+b x\) \(16\)
parts \(-\frac {a \,{\mathrm e}^{-n x}}{n}+b x\) \(17\)
derivativedivides \(\frac {-a \,{\mathrm e}^{-n x}+b \ln \left ({\mathrm e}^{n x}\right )}{n}\) \(22\)
default \(\frac {-a \,{\mathrm e}^{-n x}+b \ln \left ({\mathrm e}^{n x}\right )}{n}\) \(22\)
norman \(\left (b x \,{\mathrm e}^{n x}-\frac {a}{n}\right ) {\mathrm e}^{-n x}\) \(22\)
parallelrisch \(\frac {\left (x \,{\mathrm e}^{n x} b n -a \right ) {\mathrm e}^{-n x}}{n}\) \(23\)

[In]

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

[Out]

-a*exp(-n*x)/n+b*x

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31 \[ \int e^{-n x} \left (a+b e^{n x}\right ) \, dx=\frac {{\left (b n x e^{\left (n x\right )} - a\right )} e^{\left (-n x\right )}}{n} \]

[In]

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

[Out]

(b*n*x*e^(n*x) - a)*e^(-n*x)/n

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

b*x - a*e^(-n*x)/n

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int e^{-n x} \left (a+b e^{n x}\right ) \, dx=b x - \frac {a e^{\left (-n x\right )}}{n} \]

[In]

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

[Out]

b*x - a*e^(-n*x)/n

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int e^{-n x} \left (a+b e^{n x}\right ) \, dx=b\,x-\frac {a\,{\mathrm {e}}^{-n\,x}}{n} \]

[In]

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

[Out]

b*x - (a*exp(-n*x))/n