3.1.2 \(\int \frac {1}{-5 e^{-m x}+2 e^{m x}} \, dx\) [2]

Optimal. Leaf size=24 \[ -\frac {\tanh ^{-1}\left (\sqrt {\frac {2}{5}} e^{m x}\right )}{\sqrt {10} m} \]

[Out]

-1/10*arctanh(1/5*exp(m*x)*10^(1/2))/m*10^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 24, 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, 213} \begin {gather*} -\frac {\tanh ^{-1}\left (\sqrt {\frac {2}{5}} e^{m x}\right )}{\sqrt {10} m} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-5/E^(m*x) + 2*E^(m*x))^(-1),x]

[Out]

-(ArcTanh[Sqrt[2/5]*E^(m*x)]/(Sqrt[10]*m))

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

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}{-5 e^{-m x}+2 e^{m x}} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{-5+2 x^2} \, dx,x,e^{m x}\right )}{m}\\ &=-\frac {\tanh ^{-1}\left (\sqrt {\frac {2}{5}} e^{m x}\right )}{\sqrt {10} m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 24, normalized size = 1.00 \begin {gather*} -\frac {\tanh ^{-1}\left (\sqrt {\frac {2}{5}} e^{m x}\right )}{\sqrt {10} m} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-5/E^(m*x) + 2*E^(m*x))^(-1),x]

[Out]

-(ArcTanh[Sqrt[2/5]*E^(m*x)]/(Sqrt[10]*m))

________________________________________________________________________________________

Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(53\) vs. \(2(24)=48\).
time = 1.95, size = 29, normalized size = 1.21 \begin {gather*} \frac {\text {RootSum}\left [-1+40 \text {\#1}^2\&,\text {Log}\left [E^{m x}-10 \text {\#1}\right ] \text {\#1}\&\right ]}{m} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[1/(-5/E^(m*x) + 2*E^(m*x)),x]')

[Out]

RootSum[-1 + 40 #1 ^ 2&, Log[E ^ (m x) - 10 #1] #1&] / m

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 19, normalized size = 0.79

method result size
derivativedivides \(-\frac {\arctanh \left (\frac {{\mathrm e}^{m x} \sqrt {10}}{5}\right ) \sqrt {10}}{10 m}\) \(19\)
default \(-\frac {\arctanh \left (\frac {{\mathrm e}^{m x} \sqrt {10}}{5}\right ) \sqrt {10}}{10 m}\) \(19\)
risch \(\frac {\sqrt {10}\, \ln \left ({\mathrm e}^{m x}-\frac {\sqrt {10}}{2}\right )}{20 m}-\frac {\sqrt {10}\, \ln \left ({\mathrm e}^{m x}+\frac {\sqrt {10}}{2}\right )}{20 m}\) \(40\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-5/exp(m*x)+2*exp(m*x)),x,method=_RETURNVERBOSE)

[Out]

-1/10*arctanh(1/5*exp(m*x)*10^(1/2))/m*10^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.35, size = 35, normalized size = 1.46 \begin {gather*} \frac {\sqrt {10} \log \left (-\frac {\sqrt {10} - 5 \, e^{\left (-m x\right )}}{\sqrt {10} + 5 \, e^{\left (-m x\right )}}\right )}{20 \, m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5/exp(m*x)+2*exp(m*x)),x, algorithm="maxima")

[Out]

1/20*sqrt(10)*log(-(sqrt(10) - 5*e^(-m*x))/(sqrt(10) + 5*e^(-m*x)))/m

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (18) = 36\).
time = 0.32, size = 40, normalized size = 1.67 \begin {gather*} \frac {\sqrt {10} \log \left (-\frac {2 \, \sqrt {10} e^{\left (m x\right )} - 2 \, e^{\left (2 \, m x\right )} - 5}{2 \, e^{\left (2 \, m x\right )} - 5}\right )}{20 \, m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5/exp(m*x)+2*exp(m*x)),x, algorithm="fricas")

[Out]

1/20*sqrt(10)*log(-(2*sqrt(10)*e^(m*x) - 2*e^(2*m*x) - 5)/(2*e^(2*m*x) - 5))/m

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 20, normalized size = 0.83 \begin {gather*} \frac {\operatorname {RootSum} {\left (40 z^{2} - 1, \left ( i \mapsto i \log {\left (- 4 i + e^{- m x} \right )} \right )\right )}}{m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5/exp(m*x)+2*exp(m*x)),x)

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 38 vs. \(2 (18) = 36\).
time = 0.00, size = 51, normalized size = 2.12 \begin {gather*} \frac {\frac {1}{20} \sqrt {10} \ln \left |\mathrm {e}^{m x}-\frac {\sqrt {10}}{2}\right |-\frac {1}{20} \sqrt {10} \ln \left (\mathrm {e}^{m x}+\frac {\sqrt {10}}{2}\right )}{m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5/exp(m*x)+2*exp(m*x)),x)

[Out]

-1/20*(sqrt(10)*log(1/2*sqrt(10) + e^(m*x)) - sqrt(10)*log(abs(-1/2*sqrt(10) + e^(m*x))))/m

________________________________________________________________________________________

Mupad [B]
time = 0.46, size = 18, normalized size = 0.75 \begin {gather*} -\frac {\sqrt {10}\,\mathrm {atanh}\left (\frac {\sqrt {10}\,{\mathrm {e}}^{m\,x}}{5}\right )}{10\,m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(2*exp(m*x) - 5*exp(-m*x)),x)

[Out]

-(10^(1/2)*atanh((10^(1/2)*exp(m*x))/5))/(10*m)

________________________________________________________________________________________