Compute distance induced by riemannian metric On $\mathbb{R}^4$ with coordinates $x_1,x_2,x_3,x_4$ consider the riemannian metric $g:=\displaystyle{\frac{dx_1^2+dx_2^2+dx_3^2+dx_4^2}{x_1^2+x_2^2}}$ defined on $X:=\{x_1^2+x_2^2\neq 0\}$ and call $d$ the  intrinsic induced metric.
How can I compute explicitly $d(p_1,p_2)$ for any $p_1,p_2\in X$?
Suppose for example $p_1=(1,0,1,0)$ and $p_2=(1,1,2,2)$.
I computed the geodesic equations
$$\ddot \gamma_1=\frac{2\gamma_2\dot\gamma_1\dot\gamma_2+\dot\gamma_1(\dot\gamma_1^2-\dot\gamma_2^2-\dot\gamma_3^2-\dot\gamma_4^2)}{\gamma_1^2+\gamma_2^2}$$
$$\ddot \gamma_2=\frac{2\gamma_1\dot\gamma_1\dot\gamma_2-\dot\gamma_2(\dot\gamma_1^2-\dot\gamma_2^2+\dot\gamma_3^2+\dot\gamma_4^2)}{\gamma_1^2+\gamma_2^2}$$
$$\ddot \gamma_3=\frac{2(\gamma_1\dot\gamma_1+\gamma_2\dot\gamma_2)\dot\gamma_3}{\gamma_1^2+\gamma_2^2}$$
$$\ddot \gamma_4=\frac{2(\gamma_1\dot\gamma_1+\gamma_2\dot\gamma_2)\dot\gamma_4}{\gamma_1^2+\gamma_2^2}$$
which have the following solutions:
$$\gamma_1=\frac{k\operatorname{sech}(kt+d)\cos(at+b)}{\sqrt{A^2+B^2}}$$
$$\gamma_2=\frac{k\operatorname{sech}(kt+d)\sin(at+b)}{\sqrt{A^2+B^2}}$$
$$\gamma_3=\frac{Ak\operatorname{tanh}(kt+d)}{A^2+B^2}+c_1$$
$$\gamma_4=\frac{Bk\operatorname{tanh}(kt+d)}{A^2+B^2}+c_1$$
where $k,d,a,b,A,B,c_1,c_2$ are constants, $\operatorname{sech}$ is the hyperbolic secant and $\operatorname{tanh}$ is the hyperbolic tangent.
The distance $d(p_1,p_2)$ is such that there exists a geodesic $\gamma=(\gamma_1,\gamma_2,\gamma_3,\gamma_4):[0,d(p_1,p_2)]\rightarrow X$ of the previous form with $\gamma(0)=p_1,\gamma(d(p_1,p_2))=p_2$.
It's still not clear to me what is the easiest way to compute $d(p_1,p_2)$: should I find constants $k,d,a,b,A,B,c_1,c_2$ such that there exists a geodesic $\gamma$ and a constant $d(p_1,p_2)$ with $\gamma(0)=(1,0,1,0)$ and $\gamma((d(p_1,p_2))=(1,1,1,2)$? This seems extremely complicated and not directly solvable. Can you suggest me another way to proceed?
 A: Not that you are doing anything wrong, it is just that this is way too complicated and it is unclear if you will ever arrive to an answer within a reasonable timeframe if you follow that direction. Here are the steps to solve this efficiently:


*

*Suppose that $M=M_1\times M_2$ is the direct product of two Riemannian manifolds with the product metric, where $M_1$ is uniquely geodesic: Any two points are connected by a unique (up to an affine reparameterization) geodesic. Show that the distance function on $M$ is given by the Pythagorean formula (maybe you already proved this in your class/textbook you are using):
$$
d^2((x_1,x_2), (y_1, y_2))= d^2(x_1, y_1) + d^2(x_2, y_2).
$$
(Use the fact that the LC connection on $M$ is the sum of two connections on the factors to show that geodesics in $M$ are given by $c(t)= (c_1(t), c_2(t))$, where $c_1, c_2$ are geodesics in $M_1, M_2$.) 

*Compute (or copy from somewhere, say, wikipedia) a formula for the distance function in the upper half space model of the hyperbolic 3-space; the best one I know uses cross-ratios.

*Show that your space is isometric to the Riemannian direct product 
$$
{\mathbb H}^3 \times S^1. 
$$
Hint: Consider first the subspace of your space given by $x_2=0, x_1>0$; then rotate this half-space around the 2-plane $x_1=x_2=0$. The circle $S^1$ will be parameterized by the angle of rotation. Equivalently, write your metric in cylindrical coordinates on $X$. 
