I have derived it using basic knowledge of calculus as the following:
$$K = \int \frac{2}{e^{x}-e^{-x}} \,\mathrm dx = \int \frac{2e^{-x}}{1- e^{-2x}} \, \mathrm dx $$
using $u$-substitution for $ u = e^{-x } $ then
$$ K = \int \frac{-2}{1- u^{2}} \, \mathrm du $$
I don't know if this is valid but I saw that it looked like the derivative of: $ \tanh ^{-1}(x) $ so I made the simplification of taking a factor of $-2$ outside the integeral and proceeded to make $$ K = -2 \tanh^{-1} (u) + c $$
Is that valid and if so, how is it equivelant to the form : $ \ln \left|\tanh \frac{x}{2}\right| + c $?
$ K = \int \frac{-2}{1- u^{2}} \, \mathrm du $=$ \int \frac{2}{u^{2}-1} \, \mathrm du=ln|\frac{1-u}{1+u}| $, backsubbing gives $ln|\frac{1-e^{-x}}{1+e^{-x}}|$ which is $ln|\frac{e^{x}-1}{e^{x}+1}|$. Now $tanhx=\frac{sinhx}{coshx}=\frac{e^x-e^{-x}}{e^x+e^{-x}}=\frac{e^{2x}-1}{e^{2x}+1}$. Now replace $x$ by $x/2$ and put the $ln$ upfront. Can you know reconcile the two?