3.3.41 \(\int \frac {1}{\sqrt {1+e^x}} \, dx\) [241]

Optimal. Leaf size=12 \[ -2 \tanh ^{-1}\left (\sqrt {1+e^x}\right ) \]

[Out]

-2*arctanh((1+exp(x))^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2320, 65, 213} \begin {gather*} -2 \tanh ^{-1}\left (\sqrt {e^x+1}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[1 + E^x],x]

[Out]

-2*ArcTanh[Sqrt[1 + E^x]]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[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] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

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

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 12, normalized size = 1.00 \begin {gather*} -2 \tanh ^{-1}\left (\sqrt {1+e^x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[1 + E^x],x]

[Out]

-2*ArcTanh[Sqrt[1 + E^x]]

________________________________________________________________________________________

Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(27\) vs. \(2(12)=24\).
time = 2.91, size = 23, normalized size = 1.92 \begin {gather*} \text {Log}\left [-1+\frac {1}{\sqrt {1+E^x}}\right ]-\text {Log}\left [1+\frac {1}{\sqrt {1+E^x}}\right ] \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[1/Sqrt[1 + E^x],x]')

[Out]

Log[-1 + 1 / Sqrt[1 + E ^ x]] - Log[1 + 1 / Sqrt[1 + E ^ x]]

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 10, normalized size = 0.83

method result size
derivativedivides \(-2 \arctanh \left (\sqrt {1+{\mathrm e}^{x}}\right )\) \(10\)
default \(-2 \arctanh \left (\sqrt {1+{\mathrm e}^{x}}\right )\) \(10\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+exp(x))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2*arctanh((1+exp(x))^(1/2))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 21 vs. \(2 (9) = 18\).
time = 0.25, size = 21, normalized size = 1.75 \begin {gather*} -\log \left (\sqrt {e^{x} + 1} + 1\right ) + \log \left (\sqrt {e^{x} + 1} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+exp(x))^(1/2),x, algorithm="maxima")

[Out]

-log(sqrt(e^x + 1) + 1) + log(sqrt(e^x + 1) - 1)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 21 vs. \(2 (9) = 18\).
time = 0.34, size = 21, normalized size = 1.75 \begin {gather*} -\log \left (\sqrt {e^{x} + 1} + 1\right ) + \log \left (\sqrt {e^{x} + 1} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+exp(x))^(1/2),x, algorithm="fricas")

[Out]

-log(sqrt(e^x + 1) + 1) + log(sqrt(e^x + 1) - 1)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 26 vs. \(2 (12) = 24\)
time = 0.68, size = 26, normalized size = 2.17 \begin {gather*} \log {\left (-1 + \frac {1}{\sqrt {e^{x} + 1}} \right )} - \log {\left (1 + \frac {1}{\sqrt {e^{x} + 1}} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+exp(x))**(1/2),x)

[Out]

log(-1 + 1/sqrt(exp(x) + 1)) - log(1 + 1/sqrt(exp(x) + 1))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 23 vs. \(2 (9) = 18\).
time = 0.00, size = 32, normalized size = 2.67 \begin {gather*} 2 \left (\frac {\ln \left (\sqrt {\mathrm {e}^{x}+1}-1\right )}{2}-\frac {\ln \left (\sqrt {\mathrm {e}^{x}+1}+1\right )}{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+exp(x))^(1/2),x)

[Out]

-log(sqrt(e^x + 1) + 1) + log(sqrt(e^x + 1) - 1)

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 9, normalized size = 0.75 \begin {gather*} -2\,\mathrm {atanh}\left (\sqrt {{\mathrm {e}}^x+1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(exp(x) + 1)^(1/2),x)

[Out]

-2*atanh((exp(x) + 1)^(1/2))

________________________________________________________________________________________