3.1.19 \(\int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx\) [19]

3.1.19.1 Optimal result
3.1.19.2 Mathematica [B] (verified)
3.1.19.3 Rubi [A] (verified)
3.1.19.4 Maple [B] (verified)
3.1.19.5 Fricas [A] (verification not implemented)
3.1.19.6 Sympy [F]
3.1.19.7 Maxima [A] (verification not implemented)
3.1.19.8 Giac [B] (verification not implemented)
3.1.19.9 Mupad [F(-1)]

3.1.19.1 Optimal result

Integrand size = 25, antiderivative size = 25 \[ \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx=-\sqrt {2} \text {arctanh}\left (\frac {\sqrt {1+e^{-x}}}{\sqrt {2}}\right ) \]

output
-arctanh(1/2*(1+exp(-x))^(1/2)*2^(1/2))*2^(1/2)
 
3.1.19.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(65\) vs. \(2(25)=50\).

Time = 0.11 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.60 \[ \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx=-\frac {\sqrt {2} e^{x/2} \sqrt {1+e^{-x}} \text {arctanh}\left (\frac {1-e^x+e^{x/2} \sqrt {1+e^x}}{\sqrt {2}}\right )}{\sqrt {1+e^x}} \]

input
Integrate[Sqrt[1 + E^(-x)]/(-E^(-x) + E^x),x]
 
output
-((Sqrt[2]*E^(x/2)*Sqrt[1 + E^(-x)]*ArcTanh[(1 - E^x + E^(x/2)*Sqrt[1 + E^ 
x])/Sqrt[2]])/Sqrt[1 + E^x])
 
3.1.19.3 Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {2720, 25, 1776, 1388, 946, 25, 73, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sqrt {e^{-x}+1}}{e^x-e^{-x}} \, dx\)

\(\Big \downarrow \) 2720

\(\displaystyle \int -\frac {\sqrt {e^{-x}+1}}{1-e^{2 x}}de^x\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {\sqrt {1+e^{-x}}}{1-e^{2 x}}de^x\)

\(\Big \downarrow \) 1776

\(\displaystyle -\int \frac {e^{-2 x} \sqrt {1+e^{-x}}}{-1+e^{-2 x}}de^x\)

\(\Big \downarrow \) 1388

\(\displaystyle -\int \frac {e^{-2 x}}{\left (-1+e^{-x}\right ) \sqrt {1+e^{-x}}}de^x\)

\(\Big \downarrow \) 946

\(\displaystyle \int -\frac {1}{\left (1-e^{-x}\right ) \sqrt {e^{-x}+1}}de^{-x}\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {1}{\left (1-e^{-x}\right ) \sqrt {1+e^{-x}}}de^{-x}\)

\(\Big \downarrow \) 73

\(\displaystyle -2 \int \frac {1}{2-e^{2 x}}d\sqrt {1+e^{-x}}\)

\(\Big \downarrow \) 219

\(\displaystyle -\sqrt {2} \text {arctanh}\left (\frac {\sqrt {e^{-x}+1}}{\sqrt {2}}\right )\)

input
Int[Sqrt[1 + E^(-x)]/(-E^(-x) + E^x),x]
 
output
-(Sqrt[2]*ArcTanh[Sqrt[1 + E^(-x)]/Sqrt[2]])
 

3.1.19.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

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

rule 946
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_. 
), x_Symbol] :> Simp[1/n   Subst[Int[(a + b*x)^p*(c + d*x)^q, x], x, x^n], 
x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[m - n 
+ 1, 0]
 

rule 1388
Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_))^(q_.), 
x_Symbol] :> Int[u*(d + e*x^n)^(p + q)*(a/d + (c/e)*x^n)^p, x] /; FreeQ[{a, 
 c, d, e, n, p, q}, x] && EqQ[n2, 2*n] && EqQ[c*d^2 + a*e^2, 0] && (Integer 
Q[p] || (GtQ[a, 0] && GtQ[d, 0]))
 

rule 1776
Int[((a_.) + (c_.)*(x_)^(mn2_.))^(p_.)*((d_) + (e_.)*(x_)^(n_.))^(q_.), x_S 
ymbol] :> Int[((d + e*x^n)^q*(c + a*x^(2*n))^p)/x^(2*n*p), x] /; FreeQ[{a, 
c, d, e, n, q}, x] && EqQ[mn2, -2*n] && IntegerQ[p]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 
3.1.19.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(48\) vs. \(2(19)=38\).

Time = 0.10 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.96

method result size
default \(-\frac {\sqrt {\left (1+{\mathrm e}^{x}\right ) {\mathrm e}^{-x}}\, {\mathrm e}^{x} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\left (1+3 \,{\mathrm e}^{x}\right ) \sqrt {2}}{4 \sqrt {{\mathrm e}^{x}+{\mathrm e}^{2 x}}}\right )}{2 \sqrt {\left (1+{\mathrm e}^{x}\right ) {\mathrm e}^{x}}}\) \(49\)

input
int((1+exp(-x))^(1/2)/(-exp(-x)+exp(x)),x,method=_RETURNVERBOSE)
 
output
-1/2*((1+exp(x))/exp(x))^(1/2)*exp(x)/((1+exp(x))*exp(x))^(1/2)*2^(1/2)*ar 
ctanh(1/4*(1+3*exp(x))*2^(1/2)/(exp(x)^2+exp(x))^(1/2))
 
3.1.19.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.36 \[ \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx=\frac {1}{2} \, \sqrt {2} \log \left (\frac {2 \, \sqrt {2} \sqrt {e^{x} + 1} e^{\left (\frac {1}{2} \, x\right )} - 3 \, e^{x} - 1}{e^{x} - 1}\right ) \]

input
integrate((1+exp(-x))^(1/2)/(-exp(-x)+exp(x)),x, algorithm="fricas")
 
output
1/2*sqrt(2)*log((2*sqrt(2)*sqrt(e^x + 1)*e^(1/2*x) - 3*e^x - 1)/(e^x - 1))
 
3.1.19.6 Sympy [F]

\[ \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx=\int \frac {\sqrt {1 + e^{- x}} e^{x}}{\left (e^{x} - 1\right ) \left (e^{x} + 1\right )}\, dx \]

input
integrate((1+exp(-x))**(1/2)/(-exp(-x)+exp(x)),x)
 
output
Integral(sqrt(1 + exp(-x))*exp(x)/((exp(x) - 1)*(exp(x) + 1)), x)
 
3.1.19.7 Maxima [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.44 \[ \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx=\frac {1}{2} \, \sqrt {2} \log \left (-\frac {\sqrt {2} - \sqrt {e^{\left (-x\right )} + 1}}{\sqrt {2} + \sqrt {e^{\left (-x\right )} + 1}}\right ) \]

input
integrate((1+exp(-x))^(1/2)/(-exp(-x)+exp(x)),x, algorithm="maxima")
 
output
1/2*sqrt(2)*log(-(sqrt(2) - sqrt(e^(-x) + 1))/(sqrt(2) + sqrt(e^(-x) + 1)) 
)
 
3.1.19.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (19) = 38\).

Time = 0.29 (sec) , antiderivative size = 55, normalized size of antiderivative = 2.20 \[ \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx=\frac {1}{2} \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 2 \, \sqrt {e^{\left (2 \, x\right )} + e^{x}} - 2 \, e^{x} + 2 \right |}}{{\left | 2 \, \sqrt {2} + 2 \, \sqrt {e^{\left (2 \, x\right )} + e^{x}} - 2 \, e^{x} + 2 \right |}}\right ) \]

input
integrate((1+exp(-x))^(1/2)/(-exp(-x)+exp(x)),x, algorithm="giac")
 
output
1/2*sqrt(2)*log(abs(-2*sqrt(2) + 2*sqrt(e^(2*x) + e^x) - 2*e^x + 2)/abs(2* 
sqrt(2) + 2*sqrt(e^(2*x) + e^x) - 2*e^x + 2))
 
3.1.19.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {1+e^{-x}}}{-e^{-x}+e^x} \, dx=-\int \frac {\sqrt {{\mathrm {e}}^{-x}+1}}{{\mathrm {e}}^{-x}-{\mathrm {e}}^x} \,d x \]

input
int(-(exp(-x) + 1)^(1/2)/(exp(-x) - exp(x)),x)
 
output
-int((exp(-x) + 1)^(1/2)/(exp(-x) - exp(x)), x)