Finding distance in polar coordinates with metric tensor

  • I
  • Thread starter thusidie
  • Start date
  • #1
thusidie

Main Question or Discussion Point

Hi,

I'm getting into general relativity and am learning about tensors and coordinate transformations.

My question is, how do you use the metric tensor in polar coordinates to find the distance between two points? Example I want to try is:

Point A (1,1) or (sq root(2), 45)
Point B (1,0) or (1,90)

I know the distance is 1, but how do I get it using the metric tensor?

ds2 = dr2+r22

dr = sq root(2)-1
dθ = 45-90=-45

I'm not sure what r is in this case.
 

Answers and Replies

  • #2
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,817
6,625
Point A (1,1) or (sq root(2), 45)
Point B (1,0) or (1,90)
First of all, this type of notation can be very confusing if you are not using a Cartesian coordinate system, I suggest that you do not use it.

ds2 = dr2+r2dθ2
This is only true if your angle ##\theta## is given in radians. Otherwise you will need to multiply the second term by a conversion factor ##\pi^2/180^2##.

dr = sq root(2)-1
dθ = 45-90=-45
The line element ##ds^2 = dr^2 + r^2 d\theta^2## is an infinitesimal relation. You cannot just insert ##dr## to be the difference between the ##r##-coordinates of the points and so on. In order to get the length of a curve ##\Gamma##, you need to integrate the line element along the curve, in other words
$$
\ell = \int_\Gamma ds = \int \sqrt{\dot r^2 + r^2 \dot\theta^2} d\tau,
$$
where ##\tau## is some curve parameter that parametrises ##\Gamma## and the dot denotes a derivative with respect to ##\tau##. Note that this is also true in Cartesian coordinates as long as you do not have a straight line, you cannot just plug in the coordinate differences in the line element to find the distance (you will then find the length of a straight line between the points, not the length of the curve). Anyway, the first thing you need to do is to parametrise the curve that you want to compute the length of, in the case of the distance between two points, you want to parametrise the straight line between them.
 
  • #3
thusidie
Ok, so I peramerterized r and θ.

r=1+0.414*t
θ=pi/2-pi/4*t

I know the equation for r is wrong. But I don't know how to integrate the trig monster that r became. I'll just approximate the r as a straight line.

dr=0.414
dθ=-pi/4

0<t<1

I placed the values into the line integral and integrating from t=0 to t=1. The integrand came out to be

(0.788+0.511*t+0.617*t^2)-1/2

Using substitution,

u=0.788+0.511*t+0.617*t2
du=dt

u_upperlimit=1.92
u_lowerlimit=0.788

This gave me integrand of

u-1/2

After integrating, I got

2*u1/2

Evaluated at 1.92 to 0.788.

I got the answer of 0.996. It's pretty close to 1. Does this look right?
 
  • #4
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,817
6,625
u=0.788+0.511*t+0.617*t2
du=dt
This does not seem very consistent. Based on the first line, the second should be ##du = (0.511 + 2*0.617 t) dt##.

r=1+0.414*t
θ=pi/2-pi/4*t

I know the equation for r is wrong. But I don't know how to integrate the trig monster that r became. I'll just approximate the r as a straight line.
How do you justify this approximation?

By the way, the integral is rather easy to solve once you simplify the integrand. Please show what you got for the integrand.

Also, I suggest using ##\theta## itself as the parameter. It will save you a lot of writing.
 
  • #5
thusidie
r=[1+tan2(pi/2-θ)]1/2
dr/dθ=-[1+tan2(pi/2-θ)]-1/2*tan(pi/2-θ)*sec2(pi/2-θ)
θ=θ
dθ/dθ=1

θ_lower=pi/4
θ_upper=pi/2

∫{1+[1+tan2(pi/2-θ)]3/2*tan2(pi/2-θ)*sec4(pi/2-θ)+tan2(pi/2-θ)}1/2

This is where I got stuck. Simplifying trig equations was never my strong point. This was why I approximated r to be a straight line. I had no justification, only that when I graphed it, the straight line approximation is kind of close to the actual plot.

Actually, you helped me reach my goal of using the metric tensor. I ended up creating an example that I didn't know how to complete.
 
  • #6
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,817
6,625
r=[1+tan2(pi/2-θ)]1/2
Ok, I will stop you right here. This is already much more complicated than it needs to be. Use trigonometric identities to simplify it. (You should not need a square root.)
 
  • #7
thusidie
It's been a while since I had to work with trig that's any more complicated than cos and sin.

r=[1+tan2(pi/2-θ)]1/2
tan(pi/2-θ)=cotθ
cot2(θ)+1=csc2θ

r=cscθ

dr/dθ=-cscθcotθ
dθ/dθ=1

∫[csc2θcot2θ+csc2θ]1/2
∫csc2θ dθ

-cotθ eval from pi/4 to pi/2
-cot(pi/2)+cot(pi/4)=0+1

The length is 1. Thank you so much for helping me.
 
  • #8
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,817
6,625
It's been a while since I had to work with trig that's any more complicated than cos and sin.
You really do not need to as essentially all of the relations you have used can be derived from the relations for sine and cosine, in particular the trigonometric one. For example
$$
r^2 = 1 + \cot^2\theta = 1 + \frac{\cos^2\theta}{\sin^2\theta} = \frac{\sin^2\theta + \cos^2 \theta}{\sin^2\theta} = \frac{1}{\sin^2\theta}
$$
leading to
$$
\frac{dr}{d\theta} = \frac{d}{d\theta} \frac{1}{\sin\theta} = \frac{\cos\theta}{\sin^2 \theta}
$$
and so on.
 
  • #9
DrGreg
Science Advisor
Gold Member
2,285
880
By the way, if you draw a diagram, you should be able to get ##r \sin \theta = 1## directly from the diagram.
 
  • #10
pervect
Staff Emeritus
Science Advisor
Insights Author
9,747
965
The OP wants "the distance between two points", and they have a formula that gives them the length of a a curve. So, to apply the formula to answer the question, they need to decide what curve connects the two points, then the formula for the length of the curve which they have gives the distance. Without any restriction, there are an infinite number of possible curves connecting two points.. I would assume the OP wants the "straight line distance". Some thought about what this means is worthwhile. I would suggest that the connection defines what is meant by a straight line, and that the applicable connection is the Leva-Civita connection. But I'm not sure if this will make sense to the OP - if they're just starting GR< it will almost certainly not make sense. So, there may be a more elementary way of asking "what curve do I want to measure the length of to get the distance". A more traditional approach in this specific case might be to say that the distance is the shortest curve between two points, though this seemingly simple approach runs into some difficulties if one tries to generalize it to 4d space-times. However that starts to be a digression, so I won't get into that.
 

Related Threads on Finding distance in polar coordinates with metric tensor

Replies
9
Views
8K
  • Last Post
5
Replies
104
Views
17K
Replies
2
Views
6K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
10
Views
2K
Replies
3
Views
5K
Replies
12
Views
718
Replies
7
Views
1K
Top