TITLE: Extension of a vector field to an orthonormal frame for a flat metric
QUESTION [8 upvotes]: Assume that $U$ is an open set in the plane and $X$ is a non vanishing vector field on $U$.
Is there a non vanishing vector field $Y$ on $U$ such that the pair $\{X,Y \}$  plays the role of an orthonormal frame for a flat Riemannian metric on $U$?

REPLY [2 votes]: This is by no means a complete proof, but I will try at least to describe an approach. The main idea is to look at integral curves, as suggested by Tom Goodwillie in the comments. We will construct the desired metric by perturbing $U$ together with $X$ in such a way that the $X$-trajectories will have constant velocity $1$. This will guarantee that $X$ has norm $1$. Then $Y$ can be defined simply by rotating $X$ by $90$ degrees. I will assume that the vector field is bounded from above, by rescaling let us assume that $|X|<\varepsilon$.  Also I assume that $U$ can be covered by small 'eyes' that look like 
 
$X$ flows upwards.
For a point $x\in U$ denote by $\Phi_t(x)$ the trajectory of $x$ flowing along $X$ so that $\Phi_0(x)=x$. Assume a point $a$ on the lower side of the eye ends up in time $t(a)$ on another side of the eye. Then the whole eye is parametrized by pairs $(a,s)$ such that $a$ is a point on the lower side of the eye and $0\leq s\leq t(a)$. Suppose I construct a different flow inside the eye, call it $\Psi_t(x)$ such that $\Psi_{t(a)}(a)=\Phi_{t(a)}(a)$ and such that velocity of a point flowing along $\Psi$ is $1$. Then we can define an isomorphism from the eye to itself by $\alpha \Phi_s(a) = \Psi_s(a)$. Then we define a metric inside the eye by pulling back the standard metric via $\alpha$. The pullbacks of the trajectories of $\Psi$ will be the trajectories of $X$, so $X$ will have unit length. How do we construct such a flow? Note that 
$$
|\Phi_{t(a)}(a)-a|\leq \varepsilon t(a).
$$
We can assume that the projection of $X$ on the vertical direction is at least $\varepsilon'$ so we have 
$$
t(a)\leq \frac{1}{\varepsilon'} |\Phi_{t(a)}(a)-a|.
$$
So we can move from $a$ to $\Phi_{t(a)}(a)$ by following a zig-zag line as shown on the picture, so that the length of the zig-zag line is $t(a)$. I think it is possible to organize the zig-zags for different points $a$ into a smooth flow. Also we may assume that each zig zag follows $X$ for a little while in its beginning and in the end. Then close to the boundary of the eye $\alpha$ is just stretching in the $X$ direction, so that the maps $\alpha$ for different eyes glue together nicely. Also there can be a problem to make $\alpha$ smooth.