This question arose while I was reading Helgason's book on symmetric spaces. In chapter IV section 5, one can read the following:
Let $M$ be a Riemannian manifold, $p$ a point in $M$. In general it is impossible to find any neighborhood $N$ of $p$ which can be extended to a complete Riemannian manifold $\tilde{M}$.
To me this is very surprising. This means that there are local "obstructions" to the existence of a complete extension, so the completeness of a manifold $M$ impacts its local geometry.
My first thought was that locally, say in a chart $B(0,\varepsilon)\subset \mathbf{R}^n\to M$, the metric doesn't vary to much from its value at $p$. So maybe we can extend it to a metric on $\mathbf{R}^n$ using partitions of unity and we should be able to ask that the metric is the standard metric outside a ball $B(0,\varepsilon+r)$. If this is possible I guess it would give a complete metric on $\mathbf{R}^n$ (here I'm probably wrong).
But apparently this is not going to work. Hence my question is:
What are some examples of manifolds $M$ and point $p$ of $M$ such that no neighborhood of $p$ can extend to a complete manifold ?
From Helgason's book I know that locally symmetric spaces have these neighborhoods that extend to a complete manifold.
Any kind of help will be greatly appreciated.
EDIT : In fact the argument of partition of unity works in the $C^\infty$ category. However it doesn't work if everything is assumed to be real-analytic, which seems to be the what Helgason does implicitly. So I am still interested in a detailed example in the case where everything is real analytic.
One can take any real-analytic Riemannian manifold $(M,g)$ such that for each point $p\in M$ there is a geodesic path $c: [0, 1)\to M$ (of finite length), satisfying
$c(0)=p$.
The absolute value of scalar curvature $|S(c(t))|$ of $(M,g)$ diverges to infinity as $t\to 1-$.
For instance, one can take the surface of revolution in ${\mathbb R}^3$ obtained by rotating the graph $$ y= x^{1/2}, 0<x<\infty $$ around the $y$-axis. Then for a point $p=(x,y,z)$ in this surface $S$ the curve $c$ is obtained by intersecting $S$ with a half-plane passing through $p$ and the $y$-axis; the curve $c$ is chosen so that $\lim_{t\to 1} c(t)=(0,0,0)$. (One uses, of course a suitable constant speed parameterization to ensure that the curve is indeed geodesic.)
To check both (1) and (2) it suffices to consider points $p$ in the $xy$-plane. The finiteness of the length of $c$ is, hopefully clear.
Then the lines of curvature of $S$ through the point $c(t)$ are:
(a) the curve $y= x^{1/2}$ itself.
(b) the circle obtained by rotating $c(t)$ around the $y$-axis.
The curvature of the circle, of course, diverges to $\infty$ as $x\to 0$, while the curvature of the curve $x=y^2$ converges (as $x\to 0$) to the curvature of this parabola at $(0,0)$, which equals $2$.
Hence, the product of principal curvatures, which is the value of the Gaussian curvature of $S$, diverges (in absolute value) to infinity as $x\to 0$.
I claim that properties (1) and (2) imply that $(M,g)$ does not locally isometrically embed in a complete real-analytic Riemannian manifold $(N,h)$ of the same dimension.
Indeed, suppose there is such an isometric embedding $\iota: U\to N$, $U$ is an open disk in $M$ centered at a point $q$. Let $p=\iota(q)$, $c$ is a geodesic as above through $q$, $c(0)=q$, $c([0,T])\subset U$, $T>0$, $b=\iota\circ c$. By the completeness of $(N,h)$, the geodesic $b$ extends to $[0,\infty)$.
Since $g, h$ are real-analytic, the scalar curvatures of $g, h$ along $c, b$ are real-analytic functions of the parameter $t$. They agree on the interval $[0,T)$, hence, agree on the interval $[0,1)$. Thus, the scalar curvature of $(N,h)$ blows-up at $b(t)$ as $t\to 1$. A contradiction.
Edit. Geodesics in real-analytic Riemannian manifolds are real-analytic curves. Indeed, the Levi-Civita connection $\nabla$ of a real-analytic Riemannian metric is also real analytic (since Christoffel symbols are expressed in terms of partial derivatives of the tensor metric). Geodesics themselves are then solutions of the ODE $\nabla_{c'}c'=0$ with real-analytic coefficients. Therefore, by the Cauchy–Kovalevskaya theorem, geodesics are also real-analytic.
Lastly, the example given by Ryan does not work since it embeds isometrically in the real line (just the isometric embedding is not given by the identity map). It is the fact that we do not know what an isometric embedding might look like forces one to consider the behavior of some intrinsic invariants such as the scalar curvature.