Hessian of restriction of a map to the boundary of a domain Let $(M^n,g)$ be a Riemannian manifold and let $\Omega \subset M$ be a smooth and bounded domain of $M$. Suppose $u : \overline{\Omega} \to \mathbb{R}$ is a smooth function satisfying both $u = 0$ and $\Vert \nabla u \Vert = 1$ on $\partial \Omega$.
Now let $F : \overline{\Omega} \to \mathbb{R}$ be a smooth function and suppose it attains its maximum at a point $x_0 \in \partial \Omega$. How can I relate the Hessian of $F$ at $x_0$ and the Hessian of the restriction $F \vert_{\partial \Omega}$ at $x_0$?
 A: If by the Hessian of the restriction $\text{Hess}(F|_{\partial\Omega})$ you mean the Hessian w.r.t. the induced Levy-Civita connection on $\partial\Omega$, then it can be realated to the Hessian in $\Omega$ via the second fundamental form which essentilly keeps track of the contribution to second order effects from the extrinsic curvature of the boundary.
Let $n$ be a unit normal vector field on $\partial\Omega$ (such as the gradient of $u$). The scalar second fundamental form w.r.t. $n$, $II:T\partial\Omega\times T\partial\Omega\to\mathbb{R}$ is defined by
$$\tag{1}
\widetilde{\nabla}_\widetilde{X}\widetilde{Y}=\nabla_XY+II(X,Y)n
$$
Where $\widetilde{\nabla}$ is the Levy-Civita connection in $\Omega$, $\nabla$ is the induced LC connection in $\partial\Omega$, and $\widetilde X,\widetilde{Y}$ are arbitrary extensions of vector fields $X,Y\in\Gamma(T\partial\Omega)$.
One can derive a simple formula for the relation between the Hessians of the two connections in terms of the second fundamental form.
$$
\widetilde{\text{Hess}}(F)(\widetilde{X},\widetilde{Y})=\text{Hess}(F|_{\partial\Omega})(X,Y)-n(F)II(X,Y)
$$

Derivation
We may start by using the product rule for connections
$$
\nabla_U\langle\alpha,V\rangle=\langle\nabla_U\alpha,V\rangle+\langle\alpha,\nabla_U V\rangle
$$
where $\alpha$ is a covector field, $U,V$ are vector fields and $\langle\ ,\ \rangle$ is the natural pairing. Applying this to $\omega\in\Gamma(T^*\Omega)$, with $X,Y$ as before,
$$\begin{align}
\langle\widetilde{\nabla}_\widetilde{X}\omega,\widetilde{Y}\rangle &= \widetilde{\nabla}_{\widetilde{X}}\langle\omega,\widetilde{Y}\rangle-\langle\omega,\widetilde{\nabla}_{\widetilde{X}}\widetilde{Y}\rangle \\
&=\nabla_X\langle\omega|_{T\partial\Omega},Y\rangle-\langle\omega|_{T\partial\Omega},\nabla_X Y\rangle-II(X,Y)\langle\omega,n\rangle \\
&=\langle\nabla_X(\omega|_{T\partial\Omega}),Y\rangle-II(X,Y)\langle\omega,n\rangle
\end{align}$$
Removing the dummy argument, this gives an analogous rule to $(1)$ for covectors
$$
\left.\left(\widetilde{\nabla}_{\widetilde{X}}\omega\right)\right|_{T\partial M}=\nabla_X(\omega|_{T\partial\Omega})-\langle\omega,n\rangle II(X,\_)
$$
Now, then using $\text{Hess}(F)=\nabla(dF)$, and that $(dF)|_{T\partial\Omega}=d(F|_{\partial\Omega})$,
$$
\widetilde{\nabla}_{\widetilde{X}}(dF)=\nabla_X(dF|_{\partial\Omega})-\langle dF,n\rangle II(X,\_)
$$
Which can be rewritten as the given formula

The second fundamental form can in turn be readily related to other quantities. For instance, with a local defining function $u$, the second fundamental form w.r.t. $\text{grad}(u)$ is given by
$$
II=\frac{-1}{\|\text{grad}(u)\|^2}\widetilde{\text{Hess}}(u)|_{T\partial\Omega}
$$
