3.537 \(\int \frac{1}{a+b e^{-x}+c e^x} \, dx\)

Optimal. Leaf size=36 \[ -\frac{2 \tanh ^{-1}\left (\frac{a+2 c e^x}{\sqrt{a^2-4 b c}}\right )}{\sqrt{a^2-4 b c}} \]

[Out]

(-2*ArcTanh[(a + 2*c*E^x)/Sqrt[a^2 - 4*b*c]])/Sqrt[a^2 - 4*b*c]

_______________________________________________________________________________________

Rubi [A]  time = 0.109068, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25 \[ -\frac{2 \tanh ^{-1}\left (\frac{a+2 c e^x}{\sqrt{a^2-4 b c}}\right )}{\sqrt{a^2-4 b c}} \]

Antiderivative was successfully verified.

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

[Out]

(-2*ArcTanh[(a + 2*c*E^x)/Sqrt[a^2 - 4*b*c]])/Sqrt[a^2 - 4*b*c]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 9.86818, size = 36, normalized size = 1. \[ - \frac{2 \operatorname{atanh}{\left (\frac{a + 2 c e^{x}}{\sqrt{a^{2} - 4 b c}} \right )}}{\sqrt{a^{2} - 4 b c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(a+b/exp(x)+c*exp(x)),x)

[Out]

-2*atanh((a + 2*c*exp(x))/sqrt(a**2 - 4*b*c))/sqrt(a**2 - 4*b*c)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0347236, size = 40, normalized size = 1.11 \[ \frac{2 \tan ^{-1}\left (\frac{a+2 c e^x}{\sqrt{4 b c-a^2}}\right )}{\sqrt{4 b c-a^2}} \]

Antiderivative was successfully verified.

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

[Out]

(2*ArcTan[(a + 2*c*E^x)/Sqrt[-a^2 + 4*b*c]])/Sqrt[-a^2 + 4*b*c]

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 36, normalized size = 1. \[ 2\,{\frac{1}{\sqrt{-{a}^{2}+4\,cb}}\arctan \left ({\frac{a+2\,c{{\rm e}^{x}}}{\sqrt{-{a}^{2}+4\,cb}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(a+b/exp(x)+c*exp(x)),x)

[Out]

2/(-a^2+4*b*c)^(1/2)*arctan((a+2*c*exp(x))/(-a^2+4*b*c)^(1/2))

_______________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(b*e^(-x) + c*e^x + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.254213, size = 1, normalized size = 0.03 \[ \left [\frac{\log \left (-\frac{a^{3} - 4 \, a b c + 2 \,{\left (a^{2} c - 4 \, b c^{2}\right )} e^{x} -{\left (2 \, c^{2} e^{\left (2 \, x\right )} + 2 \, a c e^{x} + a^{2} - 2 \, b c\right )} \sqrt{a^{2} - 4 \, b c}}{c e^{\left (2 \, x\right )} + a e^{x} + b}\right )}{\sqrt{a^{2} - 4 \, b c}}, \frac{2 \, \arctan \left (-\frac{\sqrt{-a^{2} + 4 \, b c}{\left (2 \, c e^{x} + a\right )}}{a^{2} - 4 \, b c}\right )}{\sqrt{-a^{2} + 4 \, b c}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(b*e^(-x) + c*e^x + a),x, algorithm="fricas")

[Out]

[log(-(a^3 - 4*a*b*c + 2*(a^2*c - 4*b*c^2)*e^x - (2*c^2*e^(2*x) + 2*a*c*e^x + a^
2 - 2*b*c)*sqrt(a^2 - 4*b*c))/(c*e^(2*x) + a*e^x + b))/sqrt(a^2 - 4*b*c), 2*arct
an(-sqrt(-a^2 + 4*b*c)*(2*c*e^x + a)/(a^2 - 4*b*c))/sqrt(-a^2 + 4*b*c)]

_______________________________________________________________________________________

Sympy [A]  time = 0.317193, size = 36, normalized size = 1. \[ \operatorname{RootSum}{\left (z^{2} \left (a^{2} - 4 b c\right ) - 1, \left ( i \mapsto i \log{\left (e^{x} + \frac{- i a^{2} + 4 i b c + a}{2 c} \right )} \right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a+b/exp(x)+c*exp(x)),x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.230236, size = 47, normalized size = 1.31 \[ \frac{2 \, \arctan \left (\frac{2 \, c e^{x} + a}{\sqrt{-a^{2} + 4 \, b c}}\right )}{\sqrt{-a^{2} + 4 \, b c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(b*e^(-x) + c*e^x + a),x, algorithm="giac")

[Out]

2*arctan((2*c*e^x + a)/sqrt(-a^2 + 4*b*c))/sqrt(-a^2 + 4*b*c)