The line element on the Poincaré disk is given by
$$ds^2 = \frac{4\|dy\|^2}{(1-\|y\|^2)^2}.$$
I don't understand how to go from this line element to the equation
$$d(p, q) = \cosh\left(1 + 2\frac{\|p - q\|^2}{(1- \|p\|^2)(1-\|q\|^2)}\right)$$
where $p, q$ are two points in the Poincaré disk and $\|\cdot\|$ denotes the Euclidean norm.
I just can't seem to make the integral $\int ds$ work out algebraically.
EDIT:
So currently I have that $y_1 = (1-t)p_1 + tq_1$ and, assuming $p, q$ are on the x-axis, $y_2 = 0$. Then $dy = (q_1 - p_1) dt$, and so
$$\int ds = \int_{0}^{1} \sqrt{\frac{4 (q_1 - p_1)^2}{(1 - ((1-t)p_1 + tq_1)^2)^2}} dt = 2 |q_1 - p_1| \int_{0}^{1} \sqrt{\frac{1}{(1 - ((1-t)p_1 + tq_1)^2)^2}} dt$$
For the last integral Mathematica spits out
$$\int \sqrt{\frac{1}{(1 - ((1-t)p_1 + tq_1)^2)^2}} dt = \frac{\log \left((t-1) p_1-t q_1+1\right)-\log \left(-(t-1) p_1+t q_1+1\right)}{2 \left(p_1-q_1\right)}$$