# Convert line integral between different metrics?

If I have

$$\int\limits_0^T \frac{\sqrt{\dot{x}(t)^2+\dot{y}(t)^2}}{\sqrt{2 y(t)}}dt$$

I can convert this problem of finding the solution to the brachistochrone problem to a geometric problem by looking for a geodesic in the metric:

$$ds^2=\frac{dx^2+dy^2}{y}$$

But how do i come from this equation to the right distance between two points, e.g. given by: enter link description here

-
That Google Books page isn't being shown for me; please inline the required content. – joriki Mar 16 '13 at 1:15

The formula for $d$ given in the book has a typo: $\sqrt{x_2}$ should be $\sqrt{y_1}$ (note that $\sqrt{x_2}$ is not really meaningful because $x_2$ may be negative). I do not want to reproduce the formula here verbatim because I find the notation confusing: the problem is two-dimensional and involves $x$, $y$ - which, however, are names for points and not coordinates (this is probably where their typo came from). Besides, the notation in your question is different already.
So, we have the line element $ds^2=\dfrac{dx^2+dy^2}{y}$ in upper half-plane $y>0$. The claim to which you refer is that the geodesic distance $d((x_1,y_2),(x_2,y_2))$ is equivalent to the quantity $$\rho((x_1,y_2),(x_2,y_2))=\frac{|x_1-x_2|+|y_1-y_2|}{\sqrt{y_1}+\sqrt{y_2}+\sqrt{|x_1-x_2|}}\tag1$$ in the sense that $$C^{-1}\rho\le d\le C\rho\tag2$$ for some constant $C$. I emphasize that $\rho$ is not "the right distance" between two points. It's some quantity that is comparable to the distance. Looking at your other questions on the brachistochrone problem, I think that $\rho$ is not what you are after.
But I will indicate the proof of (2) anyway. To prove $\rho\le Cd$, consider any curve $\gamma(t)=(x(t),y(t))$ with aforementioned endpoints and let $Y=\max_t y(t)$. Then $$\int_\gamma \frac{\sqrt{\dot x^2+\dot y^2}}{\sqrt{y}}\ge \int_\gamma \frac{|\dot x|}{\sqrt{Y}}\ge \frac{|x_1-x_2|}{\sqrt{Y}}\tag3$$ and $$\int_\gamma \frac{\sqrt{\dot x^2+\dot y^2}}{\sqrt{y}}\ge \int_\gamma \frac{|\dot y|}{\sqrt{y}}\ge (2\sqrt{Y}-2\sqrt{y_1})+ (2\sqrt{Y}-2\sqrt{y_2})\tag4$$ because $y$ has to reach the value $Y$ after starting from $y_1$, and then come down to $y_2$. Add (3) and (4) to get $$2\int_\gamma \frac{\sqrt{\dot x^2+\dot y^2}}{\sqrt{y}}\ge \frac{|x_1-x_2|}{\sqrt{Y}} + (2\sqrt{Y}-2\sqrt{y_1})+ (2\sqrt{Y}-2\sqrt{y_2})\tag5$$ The right hand side of (5) is minimal at $$Y=\max(y_1,y_2,|x_1-x_2|/4)\tag6$$ (recall that $Y\ge \max(y_1,y_2)$ by definition). Observe that the quantity (6) is comparable to the square root of the denominator in (1). Now it's a matter of routine inequalities to show that the right hand sides of (5) and (1) are comparable. (Multiply by $\sqrt{Y}$, etc.)
Conversely, to prove $d\le C\rho$, introduce $Y$ as in (6) and consider the piecewise linear curve that goes from $(x_1,y_1)$ to $(x_1,Y )$, then to $(x_2,Y )$, and then to $(x_2,y_2)$. The length of this curve is exactly the right hand side of (5).