3.30 \(\int \frac {e^{-n x}}{a+b e^{n x}} \, dx\)

Optimal. Leaf size=40 \[ \frac {b \log \left (a+b e^{n x}\right )}{a^2 n}-\frac {b x}{a^2}-\frac {e^{-n x}}{a n} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2248, 44} \[ \frac {b \log \left (a+b e^{n x}\right )}{a^2 n}-\frac {b x}{a^2}-\frac {e^{-n x}}{a n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 44

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}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

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]

Rubi steps

\begin {align*} \int \frac {e^{-n x}}{a+b e^{n x}} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{x^2 (a+b x)} \, dx,x,e^{n x}\right )}{n}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {1}{a x^2}-\frac {b}{a^2 x}+\frac {b^2}{a^2 (a+b x)}\right ) \, dx,x,e^{n x}\right )}{n}\\ &=-\frac {e^{-n x}}{a n}-\frac {b x}{a^2}+\frac {b \log \left (a+b e^{n x}\right )}{a^2 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 34, normalized size = 0.85 \[ -\frac {-b \log \left (a+b e^{n x}\right )+a e^{-n x}+b n x}{a^2 n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 39, normalized size = 0.98 \[ -\frac {{\left (b n x e^{\left (n x\right )} - b e^{\left (n x\right )} \log \left (b e^{\left (n x\right )} + a\right ) + a\right )} e^{\left (-n x\right )}}{a^{2} n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.32, size = 38, normalized size = 0.95 \[ -\frac {\frac {b n x}{a^{2}} + \frac {e^{\left (-n x\right )}}{a} - \frac {b \log \left ({\left | b e^{\left (n x\right )} + a \right |}\right )}{a^{2}}}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(b*n*x/a^2 + e^(-n*x)/a - b*log(abs(b*e^(n*x) + a))/a^2)/n

________________________________________________________________________________________

maple [A]  time = 0.01, size = 47, normalized size = 1.18 \[ -\frac {{\mathrm e}^{-n x}}{a n}+\frac {b \ln \left (b \,{\mathrm e}^{n x}+a \right )}{a^{2} n}-\frac {b \ln \left ({\mathrm e}^{n x}\right )}{a^{2} n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/exp(n*x)/(b*exp(n*x)+a),x)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 32, normalized size = 0.80 \[ -\frac {e^{\left (-n x\right )}}{a n} + \frac {b \log \left (a e^{\left (-n x\right )} + b\right )}{a^{2} n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.57, size = 38, normalized size = 0.95 \[ \frac {b\,\ln \left (a+b\,{\mathrm {e}}^{n\,x}\right )}{a^2\,n}-\frac {b\,x}{a^2}-\frac {{\mathrm {e}}^{-n\,x}}{a\,n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 34, normalized size = 0.85 \[ \begin {cases} - \frac {e^{- n x}}{a n} & \text {for}\: a n \neq 0 \\\frac {x}{a} & \text {otherwise} \end {cases} + \frac {b \log {\left (e^{- n x} + \frac {b}{a} \right )}}{a^{2} n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________