evaluation of $\int\sqrt{\frac{e^{nx}}{e^{nx}+1}}dx:n\in \mathbb{Z^*}$ Compute the indefinite integral
$$\displaystyle \int\sqrt{\frac{e^{nx}}{e^{nx}+1}}dx:n\in \mathbb{Z^*}$$
My Attempt:(The steps are shortened)
$$\displaystyle e^{nx}=\sinh^{2}(y)\Rightarrow dx=\frac{2}{n}\frac{\ \cosh(y)dy}{\sinh(y)}$$
$$\displaystyle \sqrt{\frac{e^{nx}}{e^{nx}+1}}dx=\frac{2}{n}dy$$
$$\displaystyle \int\sqrt{\frac{e^{nx}}{e^{nx}+1}}dx=\frac{2}{n}y+c=\frac{2}{n}\text{arcsinh}(\sqrt{e^{nx}})+c=\frac{2}{n}\ln(\sqrt{e^{nx}}+\sqrt{e^{nx}+1})+c$$
I am a new beginner so you should encourage me and not demoralize me. Thank you
 A: Set $y=e^{\frac{nx}{2}}$. Then the integral becomes
$$\int{\dfrac{y}{\sqrt{y^{2}+1}}}\dfrac{2}{n}\dfrac{dy}{y}
=\dfrac{2}{n} \ln(y+\sqrt{y^{2}+1}).$$ Setting $y=e^{\frac{nx}{2}}$ we obtain
$$I=\dfrac{2}{n}\ln(\sqrt{e^{nx}+1}+e^{\frac{nx}{2}}).$$
A: Let $u=\sqrt{\frac{e^{nx}}{e^{nx}+1}}, $
$$I=\int u\cdot\frac{2}{n}\left( \frac{1}{u}+\frac{u}{1-u^2}\right)du=\frac{2}{n}\int \frac{1}{1-u^2}du=\frac{1}{n}\ln\left|\frac{1+u}{1-u}\right|+C$$
Put substitution back and simplify,
$$I=\frac{1}{n}\ln\left|\frac{\sqrt{e^{nx}+1}+\sqrt{e^{nx}}}{\sqrt{e^{nx}+1}-\sqrt{e^{nx}}}\right|+C=\frac{2}{n}\ln\left(\sqrt{e^{nx}+1}+\sqrt{e^{nx}}\right)+C$$
A: This argument looks good to me. There doesn't appear to be any reason to restrict to integers here; the works just as well for any real value $n \neq 0$. Note that we can rewrite the antiderivative as
$$x + \frac{2}{n} \log\left(1 + \sqrt{1 + e^{-n x}}\right) + C ,$$ which makes the asymptotic behavior as $x \to \infty$ clearer (for $n > 0$, anyway).
Alternatively,

*

*the substitution $$u = e^{nx / 2}, \qquad \,du = \frac{n}{2} e^{nx / 2}$$ transforms the integral to $$\frac{2}{n} \int \frac{du}{\sqrt{1 + u^2}} = \frac{2}{n} \operatorname{arsinh} u + C,$$ or

*the substitution $$e^{nx / 2} = \tan \theta, \qquad \frac{n}{2} e^{nx / 2} \,dx = \sec^2 \theta \,d\theta$$ transforms the integral to $$\frac{2}{n} \int \sec \theta \,d\theta = \frac{2}{n} \log \left\vert\sec\theta + \tan\theta\right\vert +C.$$
A: $$
\begin{aligned}
I &=\int \frac{\sqrt{e^{n x}}}{\sqrt{e^{n x}+1}} d x \\
&=2 \int \frac{\sqrt{e^{n x}}}{n e^{n x}} d \left(\sqrt{e^{n x}+1}\right) \\
&=\frac{2}{n} \int \frac{d\left(\sqrt{e^{n x}+1}\right)}{\sqrt{\left(\sqrt{e^{n x}+1}\right)^2-1}} \\
&=\frac{2}{n} \cosh ^{-1}\left(\sqrt{e^{n x}+1}\right)+C \quad \textrm{ via } \sqrt{e^{n x}+1}=\cosh \theta
\end{aligned}
$$
