Solving a simple PDE on a 2 dimensional manifold On a 2 dimensional surface X is a smooth vector field with isolated zeros. When is there a vector field Y such that the Lie bracket [x,Y] is equal to fY for some given function f on the surface minus the zeros? 
Is this problem always solvable locally? If so, what determines whether a local solution can be extended to the entire vector field?
 A: Away from the zeros of $X$, it's always locally solvable.  Just put $X$ in flowbox form, i.e., $X =\partial_x$.  Write $Y = u\ \partial_x + v\ \partial_y$, and the equation uncouples into the pair of equations
$$
u_x = f\ u\qquad v_x = f\ v.
$$
If you now write $f = g_x/g$ for some $g>0$, then the solutions are of the form $u = u_0(y)g$ and $v = v_0(y) g$ for some functions $u_0$ and $v_0$ of a single variable.  This is all in a local flowbox chart, of course.
Near zeros of $X$ you could run into trouble.  For example $X$ might be the vector field that represents rotation about a point, so that it has a center at that point.  Then there won't be a nontrivial solution near that point if you specify that $f>0$ near there. 
Globally, other obstructions could show up.  For example, $X$ might have closed flow lines and a nontrivial Poincaré return map, and so on.  Or it might have a dense flow line.  Lots of things could happen.  I'm not sure you want to try to come up with a general criterion, rather than be aware of what you have to consider in patching the local solutions in any given case.
A: Thanks again Robert
What is a good reference to read on this? It sounds interesting.
I am learning differential Geometry on my own and posed myself the question of when can a flow on a surface be a geodesic flow for some metric. This is where the Lie bracket equation came up. I may be wrong  but it seems that if one can solve the equation then X is a geodesic flow under the metric that sets X and Y to be an orthonormal frame - although I suppose the metric may not be extendable to the zeros of X. Your answer seems to say that locally any flow can be a geodesic flow but that globally there are topological obstructions. Is this right? Or have I totally confused myself?
BTW: on the standard 2 sphere I get f to be the +/-tangent of the distance away from the equator along a great circle.( X is the unit tangent to the great circles connecting the north and south poles. ) Interestingly the great circles are just long enough so that the tangent diverges in both directions. This led me to wonder about how curvature relates to the lengths of geodesics for instance when the Gauss curvature is positive and bounded away from zero. Also this diverging of f along the flow would exclude the possibility of a zero of index -1. Anyway this is the thought process that I am trying in order to learn a little geometry.   
