Function defined on the tangent bundle Suppose $F$ is a smooth real-valued function defined on the tangent bundle $TM$ of a Riemannian manifold $M$, i.e. $F:TM\to\mathbb{R}$ given by $F(p, v)\in\mathbb{R}$. Consider the function $f:M\to\mathbb{R}$ given by
$$f(p)=\min\{F(p,v):|v|=1\}.$$
which is a continuous real-valued function on $M$. My question is: could we find a vector field $X$ in $M$ such that $f(p)=F(p,X)$?
More concretely, consider the Ricci tensor $Ric$ of a Riemannian manifold $M$. Then it can be considered as a function on the tangent bundle:
$F(p,v)=Ric_p(v,v)$. Then the function $f:M\to\mathbb{R}$ above is given by
$$f(p)=\min\{Ric_p(v,v):|v|=1\}.$$
The above question is: I am wondering if we could find a vector field $X$ in $M$ such that
$$Ric_p(X,X)=\min\{Ric_p(v,v):|v|=1\}.$$
 A: As Max's comment suggests, there are global obstructions to the existence of such vector fields (namely that some sphere bundles have no sections at all). There are also local obstructions, as the following example demonstrates:
Let $(x,v)=(x_1,x_2,v_1,v_2)$ denote global coordinates on $T\mathbb{R}^2\cong\mathbb{R}^4$ (with $\mathbb{R}^2$ equipped with the Euclidean metric). We may define a fiberwise quadratic function $f:T\mathbb{R}^2\to\mathbb{R}$ by
$$
f(x,v)=e^{x_1}v_1^2+e^{-x_1}v_2^2
$$
A unit vector field $V$ which minimizes $f$ must be parallel to $\frac{\partial}{\partial x_1}$ for $x_1<0$, and parallel to $\frac{\partial}{\partial x_2}$ for $x_1>0$. Clearly, then, $V$ cannot be smooth on any neighborhood of the origin.
There are, however, relatively loose conditions we can impose on a fiberwise quadratic function such as $v\mapsto\operatorname{Ric}(v,v)$ to ensure the local existence of such vector fields. By raising an index, we can associate any such function $f$ with a self-adjoint $(1,1)$ tensor field $A_f$, and a vector field $F$ is minimizing iff it is an eigenvector for the smallest eigenvalue of $A_f$. Thus, if the smallest eigenvalue of $A_f$ has locally constant multiplicity, one can find such a minimizing local vector field. This condition is in some sense generic, but as seen above it need not hold everywhere.
