Say I have a manifold, $M$, equipped with a nowhere vanishing vector field $X$. I wish to find an $f$ such that $X(f)=g\in C^{\infty}(M)$ vanishes on the "smallest" possible set of $M$. If the zeros of $g$ are transverse to $0 \in \mathbb{R}$ then $\{x\in M| X(f)(x)=0\}$ should be an $n-1$ dimensional manifold of $M$. I guess this is the best that I can do? Can I always do this?
Edit: I should note that I am interested in the case that $M$ is compact.
When $X = \nabla f$, then $X(f) = 0$ precisely at the critical pointe of $f$, ie where $df$ is zero. This will generically happen at a discrete set (in the generic case f is called a Morse function). More generally you might look at the definition of gradient-like vector fields.