I've just come across metrics that give you the distance between two points in an orthogonal curvilinear system.
I have a couple of questions I was hoping someone could answer.
Does distance, or $\sqrt {ds^2}$, in $ds^2=dx^2+dy^2$ and $ds^2=dr^2+r^2d\theta^2$, have the same meaning?
I tried applying these to an example and I know I've gone wrong somewhere along the way so I was also hoping someone could tell me what I've done wrong.
Example: Find the distance between points $P(1,0)$ and $Q(0,1)$.
In Cartesian coordinates I think $dx$ and $dy$ is the difference between the $x$ and $y$ components respectively, of $P$ and $Q$. (Is that right?) So $ds^2=(1-0)^2+(0-1)^2=2 \Rightarrow ds=\sqrt2$
Converting the Cartesian coordinates into polar coordinates $(r,\theta)$ we get $P(1,0)$ and $Q(1,\frac{\pi}{2})$.
I was thinking maybe $dr$ was the difference in radii and since $P$ and $Q$ are the same distance from the origin the difference is zero so $dr=0$. As for $d\theta$ I thought it was the difference in angles. I'm not sure what $r$ in $r^2$ is in the polar coordinate metric just before $d\theta^2$. I just took it as $1$ because $P$ and $Q$ are both on the unit circle. I wonder though what would happen if $P$ was on the unit circle and $Q$ was on the circle of radius $2$ for example...then I wouldn't know what value to give $r$.
Anyway using my terrible logic above I get $ds^2=dr^2 +r^2d\theta^2=(1-1)^2+1^2(\frac{\pi}{2}-0)^2=\frac{\pi^2}{4} \Rightarrow ds=\frac{\pi}{2} \neq \sqrt2$
Can someone please explain what I'm doing wrong?
The path $P(1,0)$ to $Q(0,1)$ can be represent as the line $y = -x +1$ with $P$ and $Q$ as the endpoint.
For cartesian coordinates, $$ PQ = \int ds = \int_0^1 \sqrt{1+\Big(\frac{dy}{dx}\Big)^2} dx = \int_{0}^{1} \sqrt{2} dx = \sqrt{2} $$ A little work needed for calculating the distance in polar coordinates. By substitute $y = r \sin \theta$ and $x = r \cos \theta$ to line eq $y = -x +1$ we have $$ r = \frac{1}{\sin \theta + \cos \theta} \implies \frac{dr}{d\theta} = - \frac{\cos \theta - \sin \theta}{(\sin \theta + \cos \theta)^2 } $$ The distance using polar coordinates is $$ PQ = \int ds = \int \sqrt{dr^2 + r^2 d\theta^2} = \int_0^{\pi/2} \sqrt{\Big(\frac{dr}{d\theta}\Big)^2 + r^2} d\theta =\sqrt{2} \int_0^{\pi/2} \frac{d\theta}{(\sin \theta + \cos \theta)^2 } = \sqrt{2} $$