Let $f: U \to \mathbb R$ be a $C^{\infty}$ function where $U$ is an open connected subset of $\mathbb R^n$. $f$ is coercive, i.e., $f(x) \to +\infty$ as $\|x\| \to \partial U$. This is equivalent to the compactness of sublevel set $\{x \in U: f(x) \le \alpha\}$.
We would like to use gradient descent to optimize this function. Suppose we don't know how to estimate the global Lipschitz property of the gradient (it's also possible there is no such constant globally). Now choose some initial condition $x_0$. The set $K = \{x \in U: f(x) \le f(x_0)\}$ is compact. Suppose we have the ability to bound the norm of Hessian over $K$, i.e., \begin{align*} c = \max_{x \in K} \{\|\nabla^2f(x)\|\}, \end{align*} where $\|\nabla^2 f(x)\| = \sup_{\|y\|_2 =1} \langle \nabla^2 f(x) y, y \rangle$. I am wondering whether the gradient descent scheme with step size $1/c$ will converge. The iterates are generated by following rule \begin{align*} x_{k+1} = x_k - \frac 1 c \nabla f(x_k). \end{align*} If we let $h := f|_K: K \to \mathbb R$ be the restriction of $f$, then above scheme is gradient descent for a function with $c$-Lipschitz continuous gradient. But there is a problem for me in applying the standard analysis for this function class. In a standard analysis, we have \begin{align*} f(x_k - \frac 1 c \nabla f(x_k) ) = f(x_k) - \frac {1} {c} \|\nabla f(x_k)\|^2 - \frac{1} {c} \int_{0}^{1} \langle \nabla f(x_k - t \frac{1}{c} \nabla f(x_k) ) - \nabla f(x_k), \nabla f(x_k) \rangle dt. \end{align*} Ideally we would like then apply mean value theorem for $\nabla f(x_k - t \frac{1}{c} \nabla f(x_k) ) - \nabla f(x_k)$, but how do we know the "mean value" lies on the compact set $K$.
Since $K$ is compact and $f$ is $C^2$, then $\nabla f$ is Lipschitz in $K$, let's call such Lipschitz constant $L_K$. You can then start with some estimate $c$ for $L_K$, and increase it in case (i) your step falls out of $K$, that is if $f(x_{k+1}) > f(x_0)$, or (ii) $x_{k+1}$ and $x_k$ don't satisfy the quadratic upper bound
$$ f(x_{k+1}) \leq f(x_k) + \langle\nabla f(x_k), x_{k+1} - x_k \rangle + \frac{c}{2}\|x_{k+1} - x_k\|^2, $$
since if $c \geq L_K$ then the above bound holds between any pair of points in $K$.