TITLE: Hessian of a function on Riemannian manifolds
QUESTION [7 upvotes]: Let $(M,g,\nabla)$ be a Riemannian manifold with metric $g$ and Riemannian connection $\nabla$. The hessian of a function $f:M\to R$ is defined by:
$$H^f(X,Y)=g(\nabla_X\ \ \operatorname{grad} f,Y)$$where $X,Y\in \frak{X}$$ ( M )$.
My Question is 

Given a positive function $f$ defined on $M$, is there a function $h:M\to R$ such that
$$H^h(X,Y)=\frac 1fH^f(X,Y)$$Edit: One can use any additional assumption on $f$ to guarantee the existence of $h$.
Given 
$$H^h(X,Y)=H^f(X,Y)$$
is there a relation between both functions $f,h$.

REPLY [7 votes]: Regarding question (1): When $M$ is compact and $f$ is a positive $C^2$ function, such an $h$ exists if and only if $f$ is constant on each component of $M$.
Proof: Suppose $M$ is compact and $f\colon M\to \mathbb R$ is a positive $C^2$ function. If $f$ is constant on each component, clearly $h\equiv 0$ works. Conversely, suppose $h\colon M\to \mathbb R$ is a $C^2$ function such that 
$$H^h(X,Y)=\frac 1fH^f(X,Y).$$
Taking the trace of both sides, we conclude that $\Delta h = \Delta f/f$. Now compute
$$
\Delta ( h - \log f)= \frac{\Delta f}{f} - \left(\frac{\Delta f}{f} - \frac{|\text{grad}\, f|^2}{f^2}\right) = \frac{|\text{grad}\, f|^2}{f^2}.
$$
Integrating both sides over $M$, we conclude that $|\text{grad}\, f|^2/f^2\equiv 0$ (because the integral of a Laplacian on a compact manifold is zero). This implies that $f$ is constant on each component of $M$. $\square$
When $M$ is noncompact, it might be possible to find such an $h$. For example, if $M=\mathbb R$ (with the Euclidean metric) and $f(x)=e^x$, we can take $h(x) = \tfrac12 x^2$. At the moment, I can't think of any necessary or sufficient conditions on $M$ or $f$ in that case.