Calculating distance using polar coordinate metric

727 Views Asked by At

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?

2

There are 2 best solutions below

5
On BEST ANSWER

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} $$

0
On

The problem is that the definition that you are using is valid for infinitesimally small distances. When you apply it directly to larger distances, you move along different trajectories. In the first case you moved straight from $p$ to $Q$, while in the second case you moved along a circle. If you want to get the same result, you must move along the same trajectory. In both cases you need to write $$d_{PQ}=\int_{P\to Q}ds$$ For a straight line, you can write in Cartesian coordinates $dy=dx\frac{y_P-y_Q}{x_P-x_Q}$. I assumed that the two points don't have the same $x$ coordinate. If they do, just write $dx$ in terms of $dy$. Now $$d_{PQ}=\int_{x_P}^{x_Q}\sqrt{ds^2}=\int_{x_P}^{x_Q}dx\sqrt{1+\left(\frac{y_P-y_Q}{x_P-x_Q}\right)^2}=\sqrt{(y_P-y_Q)^2+(x_P-x_Q)^2}$$ You can write the same equation in terms of polar coordinates. We don't want to do the integral in terms of $dr$ for this particular case, since $r_P=r_Q$. $dr$ points along $r$, $rd\theta$ points perpendicular to $r$. If you move along your particular $PQ$ line, the components of $dr$ and $rd\theta$ along the direction perpendicular to the line must cancel. $$dr\sin(\theta+\pi/4)+r d\theta\sin(\pi/4-\theta)=0$$Otherwise you will move away from the line. You can also prove that in this case $r\cos\theta+r\sin\theta=1$ for every point on the $PQ$ line. You can now write $r$ and $dr$ in terms of $\theta$, and do the integral from $0$ to $\pi/2$. It's a little work, but one can prove that calculating the distance in polar coordinates yields the same result.