One of the standard problems of calculus of variations is showing that geodesics on the surface of the sphere are great circles.
But I don't understand the equation. The equation for great circle path is derived to be:
$$ a\cos(\phi-\phi_0) = \cot(\theta)$$ Where $\phi_0$ and $a$ are constants of integration, and everything else has a standard meaning of spherical geometry.
This equation should describe a great circle path, so lets choose one in equatorial plane $\theta=\pi/2$, gives gives: $$a\cos(\phi-\phi_0)=0$$
But this is no equation of the circle, this is just set of 2 points where $\phi-\phi_0=\pi/2, 3\pi/2$.