Existence of geodesic on a compact Riemannian manifold
Solution 1:
Let be $[\gamma]$ nontrivial free homotopy class of loops and $l=\inf_{\beta; \beta\in[\gamma]}l(\beta)$ where $l(\beta)$ is a lenght of the curve $\beta.$ We will show that there is a geodesic $\beta$ in $[\gamma]$ such that $l(\beta)=l.$ Let be $\beta_n$ a sequence of loops in $[\gamma]$ such that $l(\beta_n)\to l.$
The first intuition is that the sequence $\beta_n$ converges to the desired curve, but this is not quite true.
We can assume without loss of generality that each $\beta_n$ is a geodesic by parts and are parameterized by arc length.
Let us show that beta has a subsequence that converges uniformly to a continuous loop $\beta.$ In fact, as the curves $ \beta_n $ are parameterized by arc length, we have $$ d(\beta_j(t_1),\beta_j(t_2))=|t_1-t_2| $$
Therefore the set $\{\beta_n\}$ is a uniformly limited and equicontínuos set, how $M$ is compact follows from the Arzelá-Ascoli theorem that there exists a subsequence $\beta_{n_j}$ that converges uniformly for a continuous loop $\beta_0:[0,1]\to M$
Now let $t_0<t_1\cdots<t_n $ be a finite partition of $[0,1]$ such that each $\beta_0([t_i,t_{i+1}])$ is contained in a totally normal neighborhood.
Now consider the geodesic by parts $\beta:[0,1]\to M$ such that in each $[t_i,t_{i+1}]$ the curve $\beta$ is equal to geodesic segment connecting the points $\beta_0(t_i)$ e $\beta_0(t_{i+1})$
A contradiction argument shows that $l(\beta)=l$
An argument of shortcuts shows that $\beta$ is a geodesic and minimizing