= Solution
A <geodesic> is an affinely parametrized <curve> satisfying $\nabla_{\dot\gamma}\dot\gamma=0$ for the <Levi-Civita connection> of the <Riemannian metric>. In coordinates, write $\nabla_{\partial_i}\partial_j=\Gamma^k_{ij}\partial_k$. For a <vector field> $V(t)=V^k(t)\partial_k$ along the <curve>,
$$
\left(\nabla_{\dot\gamma}V\right)^k=\frac{dV^k}{dt}+\Gamma^k_{ij}(\gamma(t))\dot\gamma^iV^j.
$$
Putting $V=\dot\gamma$ gives the <geodesic equation>
$$
\boxed{\ddot\gamma^k+\Gamma^k_{ij}(\gamma)\dot\gamma^i\dot\gamma^j=0.}
$$
This is a smooth second-order ordinary differential system, so the <Picard-Lindelöf theorem> gives local existence and uniqueness for prescribed position and velocity.
To prove <local extension of geodesic velocity>, first suppose $\dot\gamma(0)=0$. The constant <curve> through $\gamma(0)$ solves this initial value problem, so uniqueness makes $\gamma$ constant locally. The zero <vector field> is the desired extension.
Otherwise choose a chart about $\gamma(0)$ in which the first component of the coordinate velocity is nonzero. Write the coordinate <curve> as $c(t)\in\mathbb R^n$ and define
$$
\Psi(t,z_2,\ldots,z_n)=c(t)+\sum_{j=2}^nz_je_j.
$$
At $(0,0)$ its derivative has columns $c'(0),e_2,\ldots,e_n$ and is invertible, because the first component of $c'(0)$ is nonzero. The <inverse function theorem> therefore supplies coordinates $(t,z_2,\ldots,z_n)$ on an open neighbourhood after shrinking the parameter interval to $|t|<\delta$. Along the <curve> these coordinates are $(t,0,\ldots,0)$. The smooth coordinate field $\partial/\partial t$, pushed back through $\Psi$ and the original chart, agrees with $\dot\gamma(t)$. This proves the extension without assuming that a long <geodesic> has no self-intersections.
By <metric compatibility>, differentiation along the <curve> gives
$$
\frac d{dt}g(\dot\gamma,\dot\gamma)
=2g(\nabla_{\dot\gamma}\dot\gamma,\dot\gamma)=0.
$$
The local extension above permits the ordinary vector-field version of the metric identity to be used along the arc, or the same identity follows directly from the coordinate derivative. Hence \b[an affinely parametrized <geodesic> has constant speed], including the zero-speed case.
Now let $S^n$ be the unit <sphere> in $\mathbb R^{n+1}$. Its induced Levi-Civita derivative is the tangential projection of the ordinary ambient derivative: projection preserves the metric identity, and the commuting ambient coordinate derivatives give zero torsion. By uniqueness of the <Levi-Civita connection>, proved in Question 5, this is the induced connection.
Thus a <curve> on the <sphere> is a <geodesic> exactly when its ambient acceleration has no tangential component. The normal space is spanned by $\gamma$, so $\gamma''=a(t)\gamma$. Differentiating $\gamma\cdot\gamma=1$ twice gives $\gamma\cdot\gamma'=0$ and
$$
a(t)=\gamma\cdot\gamma''=-|\gamma'|^2=-c^2,
$$
where $c\geq0$ is the constant speed. Therefore $\gamma''+c^2\gamma=0$. With initial data $\gamma(0)=p$ and $\gamma'(0)=v$, all solutions are
$$
\boxed{\gamma(t)=p\cos(ct)+\frac vc\sin(ct),\quad
|p|=1,\quad p\cdot v=0,\quad |v|=c>0,}
$$
and, when $v=0$, $\boxed{\gamma(t)=p}$. The <orthogonality> and length conditions show directly that the displayed <curve> remains on the <sphere>, and its acceleration is $-c^2\gamma$, so it is indeed a <geodesic>. The nonconstant <geodesics> are the <great circles> traversed at any constant speed; arbitrary parameter intervals give their restrictions, and shifting the initial parameter simply shifts the formula. There are no other <geodesics>.
Back to article page