3.2.57 \(\int \frac {1}{b e^{-m x}+a e^{m x}} \, dx\) [157]

Optimal. Leaf size=31 \[ \frac {\tan ^{-1}\left (\frac {\sqrt {a} e^{m x}}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} m} \]

[Out]

arctan(exp(m*x)*a^(1/2)/b^(1/2))/m/a^(1/2)/b^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2320, 211} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {a} e^{m x}}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} m} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[(Sqrt[a]*E^(m*x))/Sqrt[b]]/(Sqrt[a]*Sqrt[b]*m)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps

\begin {align*} \int \frac {1}{b e^{-m x}+a e^{m x}} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,e^{m x}\right )}{m}\\ &=\frac {\tan ^{-1}\left (\frac {\sqrt {a} e^{m x}}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 31, normalized size = 1.00 \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {a} e^{m x}}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} m} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

ArcTan[(Sqrt[a]*E^(m*x))/Sqrt[b]]/(Sqrt[a]*Sqrt[b]*m)

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 22, normalized size = 0.71

method result size
derivativedivides \(\frac {\arctan \left (\frac {a \,{\mathrm e}^{m x}}{\sqrt {a b}}\right )}{m \sqrt {a b}}\) \(22\)
default \(\frac {\arctan \left (\frac {a \,{\mathrm e}^{m x}}{\sqrt {a b}}\right )}{m \sqrt {a b}}\) \(22\)
risch \(-\frac {\ln \left ({\mathrm e}^{m x}-\frac {b}{\sqrt {-a b}}\right )}{2 \sqrt {-a b}\, m}+\frac {\ln \left ({\mathrm e}^{m x}+\frac {b}{\sqrt {-a b}}\right )}{2 \sqrt {-a b}\, m}\) \(53\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/m/(a*b)^(1/2)*arctan(a*exp(m*x)/(a*b)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 6.53, size = 23, normalized size = 0.74 \begin {gather*} -\frac {\arctan \left (\frac {b e^{\left (-m x\right )}}{\sqrt {a b}}\right )}{\sqrt {a b} m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arctan(b*e^(-m*x)/sqrt(a*b))/(sqrt(a*b)*m)

________________________________________________________________________________________

Fricas [A]
time = 1.01, size = 85, normalized size = 2.74 \begin {gather*} \left [-\frac {\sqrt {-a b} \log \left (\frac {a e^{\left (2 \, m x\right )} - 2 \, \sqrt {-a b} e^{\left (m x\right )} - b}{a e^{\left (2 \, m x\right )} + b}\right )}{2 \, a b m}, -\frac {\sqrt {a b} \arctan \left (\frac {\sqrt {a b} e^{\left (-m x\right )}}{a}\right )}{a b m}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[-1/2*sqrt(-a*b)*log((a*e^(2*m*x) - 2*sqrt(-a*b)*e^(m*x) - b)/(a*e^(2*m*x) + b))/(a*b*m), -sqrt(a*b)*arctan(sq
rt(a*b)*e^(-m*x)/a)/(a*b*m)]

________________________________________________________________________________________

Sympy [A]
time = 0.07, size = 24, normalized size = 0.77 \begin {gather*} \frac {\operatorname {RootSum} {\left (4 z^{2} a b + 1, \left ( i \mapsto i \log {\left (2 i b + e^{m x} \right )} \right )\right )}}{m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

RootSum(4*_z**2*a*b + 1, Lambda(_i, _i*log(2*_i*b + exp(m*x))))/m

________________________________________________________________________________________

Giac [A]
time = 0.83, size = 21, normalized size = 0.68 \begin {gather*} \frac {\arctan \left (\frac {a e^{\left (m x\right )}}{\sqrt {a b}}\right )}{\sqrt {a b} m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

arctan(a*e^(m*x)/sqrt(a*b))/(sqrt(a*b)*m)

________________________________________________________________________________________

Mupad [B]
time = 0.23, size = 21, normalized size = 0.68 \begin {gather*} \frac {\mathrm {atan}\left (\frac {a\,{\mathrm {e}}^{m\,x}}{\sqrt {a\,b}}\right )}{m\,\sqrt {a\,b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

atan((a*exp(m*x))/(a*b)^(1/2))/(m*(a*b)^(1/2))

________________________________________________________________________________________