I am self-studying the book Differential Geometry and Topology of Keith Burns & Marian Gidea and I got stuck on Exercise 4.8.12 (p.169):
Suppose that for every smooth Riemannian metric on a manifold $M,$ $M$ is complete. Show that $M$ is compact.
I believe that I should use the following statement:
A geodesic $\gamma:[0,+\infty)\to M$ is called a ray if it minimizes the distance between $\gamma(0)$ and $\gamma(s)$ for all $s \in [0,+\infty).$ Show that if $M$ is complete and non-compact, then there is a ray leaving from every point in $M$.
I thought of using a proof by absurd. If $M$ was not compact then for every Riemannian metric $g$ on $M$ there would be a geodesic ray at every point. From this point on I got stuck; I only have a vague idea on how to proceed: given a metric $g$ on $M$ I could modify $g$ into a metric $\tilde{g}$ so that $(M,\tilde{g})$ has a point $p$ without a geodesic ray. Furthermore, I believe the lack of compactness of $M$ has to play a role in the definition of $\tilde{g}.$