I am supposed to show that geodesics on a sphere are great circles.
I have used hamilton's principle.
I am working in spherical coordinates.
I have defined
$z = r cos \theta$
$x = r sin \theta cos \phi$
$y = r sin \theta sin \phi$
I got my $ds = r \sqrt{1 + sin^2 \theta (\frac{d\phi}{d\theta}})^2 d\theta$ by doing algebra
then let
$\dot{\phi} = \frac{d \phi}{d \theta}$
so
$ds(\phi, \dot{\phi}, \theta)$
$ds = r \sqrt{1 + sin^2 \theta \dot{\phi}^2} d\theta$
$\int ds = \int r \sqrt{1 + sin^2 \theta \dot{\phi}^2} d\theta$
Let $r = 1$
Let $f = \sqrt{1 + sin^2 \theta \dot{\phi}}$
$\frac{\partial{f}}{\partial{\phi}} = 0$
$\frac{\partial{f}}{\partial{\dot{\phi}}} = \frac{sin^2 \theta \dot{\phi}}{\sqrt{1 + sin^2 \theta \dot{\phi^2}}}$
$\frac{\partial{f}}{\partial{\phi}} = \frac{\partial{}{}}{\partial{\theta}}(\frac{sin^2 \theta \dot{\phi}}{\sqrt{1 + sin^2 \theta \dot{\phi}^2}}) = 0$
skipping some steps which can be inserted if requested, it can be shown that
$\frac{\partial{\phi}}{\partial{\theta}} = \frac{c}{sin \theta \sqrt{sin^2 \theta - c^2}}$
An integral from hell pops up when I attempt to solve for $\phi$
I want to press on but I don't see
$x^2 + y^2 = r^2$
getting anywhere close to appearing. What's going on here?
How do I proceed to try to find those pesky circles?
When we want to find curves $\theta\mapsto \phi(\theta)$ that minimize the distance $$\tag{1} \int_{\theta_0}^{\theta_1} f(\dot\phi(\theta),\theta)\,d\theta=\int_{\theta_0}^{\theta_1}\sqrt{1+\dot\phi^2(\theta)\,\sin^2\theta}\,d\theta $$ while keeping the end points $\phi(\theta_0)$ and $\phi(\theta_1)$ fixed we obtain by the usual calculus of variations the Euler-Lagrange equation: $$\tag{2} \frac{d}{d\theta}\frac{\partial f}{\partial\dot\phi}(\dot\phi,\theta)=\frac{d}{d\theta}\frac{\dot\phi\,\sin^2\theta}{\sqrt{1+\dot\phi^2\,\sin^2\theta}}=0\,\quad\forall \theta\in [0,\pi)\,. $$ This does in fact lead to a complicated integral that one would have to solve: (2) is equivalent to $$ \dot\phi\,\sin^2\theta=C\sqrt{1+\dot\phi^2\,\sin^2\theta} $$ for some constant $C$, resp., to $$ \dot\phi^2=\frac{C^2}{\sin^2\theta\,(\sin^2\theta-C^2)}\, $$ as you wrote.
It is much simpler to observe that a lower bound of (1) is $\theta_1-\theta_0$ which is achieved for constant $\phi$.
This means that
This is not a restriction: Since the choice of the north pole of the sphere is arbitrary we can always pretend that any curve that is not a great circle satisfies $\phi(\theta_0)=\phi(\theta_1)$ and otherwise just deviates from the great circle in between those points. Then however it does not minimize the distance. To do so it must be constant.