How to derive Lobachevsky's formula for the angle of parallelism I'm lightly studying some non-Euclidean Geometry and in the book I am reading there is no proof or derivation from where the Lobachevsky formula for angle of parallelism comes from:

$$\Pi(x)=2\tan^{-1}\left(e^{-x}\right)$$

Any help? Thanks

P.S. I couldn't find anything by google search either.
Hint An interesting relation between arcus tangent and exponential function are made clear in one complex variable

$$\arctan(z) = \frac{1}{2}i\left[\ln(1-iz) -\ln(1+iz)\right]$$

Maybe it can help you somehow.
Lemma 1: Small scale Lobachevsky is Euclidean.
Lemma 2: The area of a polygon is $$\rho^2\times defect$$
First, let us derive a helpful small scale formula. [Picture 1][1]
This is small scale so $d\approx\tan\alpha \Delta x$.
The trapezoid's area is $$-\rho^2\Delta\alpha\approx xd\approx x\tan\alpha \Delta x $$
Let's solve this differential equation:$$\int\cot\alpha\ d\alpha=-\int\frac{x}{\rho^2}dx+C\Rightarrow\ln\sin\alpha=-\frac{x^2}{2\rho^2}\Rightarrow\sin\alpha=e^{-\frac{x^2}{2\rho^2}}\Rightarrow\underline{\alpha\approx\frac{\pi}{2}-\frac{x}{\rho}} $$
Now we can find the general formula. [Picture 2][2]
The smallest triangle's area is $\rho^2(\phi-\frac\pi2-\Delta\alpha)$. It is negligible compared to $\Delta x$ and $\Delta\alpha$ so we can write that it is zero. Using our first, small-scale formula we get the following differential equation:$$0=\phi-\frac\pi2-\Delta\alpha\approx-\frac{\Delta x\sin\alpha}{\rho}-\Delta\alpha$$ It only remains to solve it:$$\int{d\alpha\over\sin\alpha}=-\int{dx\over\rho}+C\Rightarrow\ln\tan\frac{\alpha}{2}=-{x\over\rho}+C\Rightarrow\underline{\alpha=2\arctan(\cot{\beta\over 2}e^{-{x\over\rho}})}$$
This can be used to derive everything in Lobachevskian Geometry. It's the first and the most important formula and it can be written in many ways:$$\cot{\alpha\over 2}\cot{\beta\over 2}=e^\frac{x}{\rho}$$ $$\tanh{x\over\rho}=\frac{\cos\alpha+\cos\beta}{1+\cos\alpha\cos\beta}$$ $$\tanh{x\over 2\rho}=\frac{\cos\alpha+\cos\beta}{1+\cos(\alpha-\beta)}=\frac{1+\cos(\alpha+\beta)}{\cos\alpha+\cos\beta}$$ $$\sinh{x\over\rho}=\frac{\cos\alpha+\cos\beta}{\sin\alpha\sin\beta}$$ $$\cosh{x\over\rho}=\frac{1+\cos\alpha\cos\beta}{\sin\alpha\sin\beta}$$
[1]: https://i.stack.imgur.com/SkWSa.jpg
[2]: https://i.stack.imgur.com/szDHH.jpg