I'm relatively green in the differential geometry area, so my apologies if what I'm asking is ill-posed and/or not research-level.


I have a situation where I know the shortest path between any two points in the plane. Is there a way to reconstruct a corresponding 2D-manifold such that the shortest path between points on the manifold with respect to the Euclidean metric projects to the given shortest path on the plane? I'm only interested (for the moment) in the nicest cases (i.e. dense, locally compact, analytic, etc.).


I can only think of the answer in the trivial example: if the shortest path is always a straight line, then the corresponding manifold is just the plane. But what is the calculation that shows this must be true?


And what if the shortest path between two points is given by the unique exponential curve $y=C\_1+C\_2e^x$ through those points? What if it's the unique monic parabola through the points?



From Shortest Paths to Manifold Structure
**NB:** I'm assuming from the way you worded the question that your '2D manifold' is supposed to be a surface in $xyz$-space and that the 'projection' is the projection to the $xy$-plane. You may have had a more general situation in mind, such as a surface in $\mathbb{R}^n$ for $n>2$ or a more general projection than the obvious one. In that case, the answer would change, but there is still a way of finding the answer. Let me know if you want to know about these more general situations.


You are asking a special case of an inverse problem in the calculus of variations, and there is a standard method for solving this problem. Note that, it is *not* true that every 2-parameter family $\mathscr{F}$ of curves in the plane (or an open domain in the plane) that has the property that there is a unique curve in the family passing through any given point in any given direction is the set of geodesics of some Riemannian metric, so it could easily be that most of the curve families $\mathscr{F}$ you might consider aren't the projections of geodesics of a metric of the form that you describe, i.e., a metric of the form
$$
g = \sqrt{dx^2+dy^2 + df^2}
$$ 
where $f = f(x,y)$ is a function on the given domain in the plane.


The reconstruction method involves computing the Euler-Lagrange equation for the above $g$ as a Lagrangian for curves in the plane and writing it in the form 
$$
y'' = F(x,y,y')
$$
for a certain function $F$. Then you set this $F$ equal to the equation that defines your curve family. For example, for the family $y = c\_1 + c\_2 e^x$, you'd have $y'' = y'= F(x,y,y')$. This will give you an overdetermined equation for $f$ and then you apply the usual theory of overdetermined systems to determine whether or not there is a solution. 


Here, more explicitly, is what this amounts to: If your curve family is described by a second order equation of the form $y'' = G(x,y,y')$, then any function $f(x,y)$ on a domain such that the above metric has the curve family as geodesics must satisfy the nonlinear equation
$$
\begin{align}
(1{+}f\_x(x,y)^2{+}f\_y(x,y)^2)G(x,y,y') 
&= - f\_y(x,y)f\_{xx}(x,y) \\
&\ \ \ \ - \bigl(2f\_y(x,y)f\_{xy}(x,y){-}f\_x(x,y)f\_{xx}(x,y)\bigr)y'\\
&\ \ \ \ +\bigl(2f\_x(x,y)f\_{xy}(x,y){-}f\_y(x,y)f\_{yy}(x,y)\bigr)(y')^2\\
&\ \ \ \ +f\_x(x,y)f\_{yy}(x,y)(y')^3.
\end{align}
$$
Note that, one thing you'd know right off the bat is that if your defining equation for the curve family isn't of the form $y'' = G(x,y,y')$ where $G$ is at most cubic in $y'$, then there will be no solution. This is only a first necessary condition, though, it is not sufficient. To see more conditions, suppose that the curve family is the set of solutions of
$$
y''=G(x,y,y')=a\_0(x,y)+a\_1(x,y)\ y'+a\_2(x,y)\ (y')^2+a\_3(x,y)\ (y')^3.\tag{1}
$$
Substituting this into the above equation and equating like powers of $y'$ will yield $4$ second order equations for $f$ in terms of the functions $a\_i$, namely
$$
\begin{align}
- f\_y\ f\_{xx} &= a\_0\ (1{+}{f\_x}^2{+}{f\_y}^2)\\
-2f\_y\ f\_{xy}{+}f\_x\ f\_{xx} &= a\_1\ (1{+}{f\_x}^2{+}{f\_y}^2)\\
 2f\_x\ f\_{xy}{-}f\_y\ f\_{yy} &= a\_2\ (1{+}{f\_x}^2{+}{f\_y}^2)\\
f\_x\ f\_{yy} &= a\_3\ (1{+}{f\_x}^2{+}{f\_y}^2).
\end{align}\tag{2}
$$
For most choices of $a\_i$ these equations are incompatible. 


Thus, for example, if $G\equiv0$, $f$ must satisfy the four second order equations
$$
f\_y\ f\_{xx} = f\_x\ f\_{xx}-2f\_y\ f\_{xy} = f\_y\ f\_{yy}-2f\_x\ f\_{xy} = f\_x\ f\_{yy} = 0.
$$
Of course, this implies that, at any point where $(f\_x,f\_y)$ is nonzero, one must have $f\_{xx}=f\_{xy}=f\_{yy}=0$, so the only solutions to these equations are to have $f$ be a linear function of $x$ and $y$ (and all linear functions are solutions). In the case in which $G\equiv 2$ (the monic quadratic polynomials), the equations become
$$
f\_y\ f\_{xx} + 2(1{+}{f\_x}^2{+}{f\_y}^2) = f\_x\ f\_{xx}-2f\_y\ f\_{xy} 
= f\_y\ f\_{yy}-2f\_x\ f\_{xy} = f\_x\ f\_{yy} = 0,
$$
and it is not difficult to see that there are no solutions to this overdetermined system.
In the case in which $G\equiv y'$ (your other case), the equations become
$$
f\_y\ f\_{xx} = f\_x\ f\_{xx}-2f\_y\ f\_{xy} + 2(1{+}{f\_x}^2{+}{f\_y}^2) 
= f\_y\ f\_{yy}-2f\_x\ f\_{xy} = f\_x\ f\_{yy} = 0,
$$
and it is easy to see that there are no solutions to this system either.


One useful observation for solving system (2) is that it implies the first order equation
$$
a\_0\ {f\_x}^3 + a\_1\ {f\_x}^2f\_y + a\_2\ f\_x{f\_y}^2 + a\_3\ {f\_y}^3=0,\tag{3}
$$
which shows that, when the functions $a\_i$ are not all zero, the gradient of $f$ must point in one of three possible directions. Differentiating (3) and plugging this back into the system (2) and doing a bit more work, one can derive the necessary and sufficient conditions on the $a\_i$ that there exist a solution $f$.


