# Calculus of variation help

1. Nov 10, 2004

### matpo39

hi, we have just got to the point in my physics course where Newtons laws are now longer that easy to work with anymore and we are now begining to reformulate those using variational methods, and im a little confused on one of the problems.
The shortest path between two points on a curved surface, such as the surface of a sphere is called a geodesic. To find a geodestic, one has first to set up an integral that gives the length of a path on the surface in question. Use sperical polar coordinates (r,theat,phi) to show that the length of a path joining two points on a shere of radius R is L=R*integral(from theta_1 to theta_2)sqrt(1+sin^2(theta)*(phi_prime(theta))^2)*d(theta)

if (theta_1,phi_1) and (theta_2,phi_2) specify two points and we assume that the path is expressed as phi=phi(theta).

I know how to do this problem if it were just (x,y) it would be L=integral(from x_1 to x_2) ds, where ds= sqrt(dx^2+dy^2)= sqrt(1+y_prime(x)^2) dx
but im getting confused on how to impliment the spherical polar cords. For example x=r*sin(phi)*cos(theta), but then i dont know what dx would be because im not sure what to differantiat?

thanks for the help.

2. Nov 10, 2004

### ReyChiquito

use chain rule...

$$dx=\frac{\partial x}{\partial r}dr+\frac{\partial x}{\partial \phi}d\phi+\frac{\partial x}{\partial \theta}d\theta$$

same with $dy$

3. Nov 10, 2004

### matpo39

ok i used the chain rule and came up with these values for my dx and dy

dx= cos(theta)sin(phi)*dr+r*cos(theta)cos(phi)*d(phi) - r*sin(theta)sin(phi)*d(theta)

dy= sin(theta)cos(phi)*dr-r*sin(theta)sin(phi)*d(phi)+r*cos(theta)cos(phi)*d(phi)

I then put those dy,dx values into the equation

ds=Sqrt(dx^2+dy^2) but i still cant get it to look like

L= R integral(from theta_1 to theta_2) (sqrt(1+sin^2(theta)*phi_prime(theta)^2)*d(theta)

also how would the dr,d(phi) work themselves out so all that would be left is the d(theta)?

4. Nov 11, 2004

### ReyChiquito

Ok.. first of all, you are in 3 dimentions so the lenght of a curve is given by

$$L=\int_{t_{1}}^{t_{2}}{\sqrt{{dx}^2+{dy}^2+{dz}^2}}$$

now, given the spherical coordinates

$$x=r\cos\phi\sin\theta$$
$$y=r\sin\phi\sin\theta$$
$$z=r\cos\theta$$

you have that

$${dx}^2+{dy}^2+{dz}^2={dr}^2+r^2\sin^2\theta{d\phi}^2+r^2{d\theta}^2$$

but you are over a sphere right? so $dr=0$ and $r=R$

using all this we have

$$L=R\int_{\theta_{1}}^{\theta_{2}}{\sqrt{\sin^2\theta{d\phi}^2+{d\theta}^2}}=R\int_{\theta_{1}}^{\theta_{2}}{\sqrt{\sin^2\theta{\left(\frac{d\phi}{d\theta}\right)}^2{d\theta}^2+{d\theta}^2}}$$

so

$$L=R\int_{\theta_{1}}^{\theta_{2}}{\sqrt{1+\sin^2\theta{\left(\frac{d\phi}{d\theta}\right)}^2}d\theta}$$

Last edited: Nov 11, 2004