# Least distance on Riemannian Manifold

I've been doing some calculations of geodesics in different Riemannian Manifolds. More precisely I'm trying to compute, given two points on a Riemannian Manifold, the smallest distance between those points.

I started by trying to compute the distance of two points on a 2-sphere. That was easy. Then I thought to consider not a 2-sphere but a 2-sphere with some kind of a wormhole in it, something like a doughnut...

I thought of using the following metric: $$ds^2=(1-b(r)/r)^{-1}dr^2+r^2 d\theta^2 + r^2\sin^2\theta d\varphi^2,$$ where $b(r)$ is some function that should describe the throat of the wormhole - as it can be seen here. First question: Is this correct for what I'm looking for?

Then, given this metric, the distance is given by: $$l=\int{ds}=\int_{\theta_1}^{\theta_2}[(1-b(r)/r)^{-1}\dot{r}^2+r^2+ r^2\sin^2\theta \dot{\varphi}^2]^{1/2}d\theta,$$ right? And then, I should make use of the Euler-Lagrange equations...Am I correct?

-
It's not clear to me why $\sin\theta$ is not squared. Anyway, you should not expect to get any manageable explicit formulas by continuing your computations. But it is easy to calculate distances on the torus explicitly by endowing it with the flat metric: the one that comes from the quotient map $\mathbb R^2\to \mathbb R^2/\mathbb Z^2$. Indeed, the geodesics in this metric are images of straight lines under the quotient map. – user53153 Feb 2 '13 at 7:09
Ups, it was a typo. Yeh I get really ugly formulas. But I just wasn't sure I was doing things the right way. Thank you – PML Feb 2 '13 at 11:16