### 3.241 $$\int \frac{1}{\sqrt{1+e^x}} \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0080599, antiderivative size = 12, normalized size of antiderivative = 1., 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 = {2282, 63, 207} $-2 \tanh ^{-1}\left (\sqrt{e^x+1}\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 2282

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]]]

Rule 63

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 207

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

Rubi steps

\begin{align*} \int \frac{1}{\sqrt{1+e^x}} \, dx &=\operatorname{Subst}\left (\int \frac{1}{x \sqrt{1+x}} \, dx,x,e^x\right )\\ &=2 \operatorname{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.0032689, size = 12, normalized size = 1. $-2 \tanh ^{-1}\left (\sqrt{e^x+1}\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 10, normalized size = 0.8 \begin{align*} -2\,{\it Artanh} \left ( \sqrt{1+{{\rm e}^{x}}} \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 0.935081, size = 28, normalized size = 2.33 \begin{align*} -\log \left (\sqrt{e^{x} + 1} + 1\right ) + \log \left (\sqrt{e^{x} + 1} - 1\right ) \end{align*}

Veriﬁcation 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]  time = 2.06284, size = 68, normalized size = 5.67 \begin{align*} -\log \left (\sqrt{e^{x} + 1} + 1\right ) + \log \left (\sqrt{e^{x} + 1} - 1\right ) \end{align*}

Veriﬁcation 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]  time = 1.04146, size = 26, normalized size = 2.17 \begin{align*} \log{\left (-1 + \frac{1}{\sqrt{e^{x} + 1}} \right )} - \log{\left (1 + \frac{1}{\sqrt{e^{x} + 1}} \right )} \end{align*}

Veriﬁcation 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]  time = 1.05047, size = 28, normalized size = 2.33 \begin{align*} -\log \left (\sqrt{e^{x} + 1} + 1\right ) + \log \left (\sqrt{e^{x} + 1} - 1\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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