I think I posted dupe post.
$$\begin{align} \color{red}{\tanh^{-1}(x)={1\over 2}\ln\left({1+x\over 1-x}\right)={1\over 2}\left(\ln(1+x)-\ln(1-x)\right)}~~\text{with}~~\left(\left|x\right|<1\right) \end{align}$$
$$\begin{align}\text{The above eqns can be used in path for soln of} \int{1\over e^x+e^{-x}}\mathrm{d}x \end{align}$$
I have 2 doubts about red-marked eqns.
- How$~\tanh^{-1}(x)={1\over 2}\ln\left(1+x\over{1-x}\right)~$be obtained?
- I think the condition$~\left|x\right|<1~$is too strict for the indefinte integral problem at 2nd row.
$$\begin{align} y&={e^{2x}-1\over e^{2x}+1} \\y\left(e^{2x}+1\right)&=\left(e^{2x}-1\right)\\ y e^{2x}+y&=e^{2x}-1\\ e^{2x}\left(y-1\right)&=-(y+1)\\ e^{2x}&={-(y+1)\over(y-1)}\\ \ln\left(\exp\left(2x\right)\right)&=\ln\left({(1+y)\over(1-y)}\right)\\ 2x&=\ln(1+y)-\ln(1-y)\\&=\ln\left({1+y\over 1-y}\right)\\ x&={1\over 2}\ln\left({1+y\over 1-y}\right)\\ \operatorname{tgh}^{-1}(y)&=x\\&={1\over 2}\ln\left({1+y\over 1-y}\right)\end{align}$$
Since$~y=\operatorname{tgh}(x)~$is held,$~-1<y<1~$is held for$~-\infty<x<\infty~$.
And from the initial condition of rightmost-red-marked-inequality, we can simply replace$~\operatorname{tgh}^{-1}(y)={1\over 2}\ln\left({1+y\over 1-y}\right)~$by$~\operatorname{tgh}^{-1}(x)={1\over 2}\ln\left({1+x\over 1-x}\right)~~\text{with}~~\left|x\right|<1~$