Integration by parts wrt. a Morse function on its basin of attraction Let $f:\mathbb R^n\to\mathbb R$ be a Morse function with uniform nondegenerate Hessian at critical points, i.e. for some $\delta>0$
$$
\forall x \in \{\nabla f=0\}\;\forall \xi\in\mathbb R^n: \quad  |\langle \xi, \nabla^2 H(x)\xi \rangle | \geq \delta |\xi|^2 .
$$
Edit: Liviu Nicolaescu pointed out a condition to ensure the sublevel sets of $\{f\leq c\}$ to be diffeomorphic to the sphere  for $c$ large enough. Therefore, we impose $f$ to have at least linear radial growth at infinity
$$
   \langle x , \nabla f(x) \rangle \geq A |x| - B > 0 ,\quad A,B>0 .
$$
Especially, the above two conditions ensure that $f$ has only finitely many critical points.
Let w.l.o.g. $0$ be a local minima of $f$ and let $\Phi_s(x)$ be the negative gradient flow wrt. $f$, i.e.
$$
   \dot \Phi_s(x) = -\nabla f(\Phi_s(x)) \quad\text{and}\quad  \Phi_0(x)= x .
$$
In addtion $\Omega$ denotes the basin of attraction for $0$ or in other words just the stable manifold of $0$, i.e.
$$ 
\Omega = \{ x : \Phi_s(x) \to 0 \text{ for } s\to \infty \}
$$
Does $f$ satisfy Neumann boundary condition on $\partial\Omega$ in the sense that the following integration by parts hold
$$
  \int_\Omega (-\Delta f)\; g \; dx = \int_\Omega \nabla f \cdot \nabla g \; dx \quad\text{for all $g$ such that} \quad \int_\Omega |\nabla f| \;  |\nabla g| \; dx < \infty\quad ?
$$
Strategy so far:


*

*If $f$ is Morse-Smale, then $\partial \Omega$ is the union of stable manifolds heteroclinic connected to $0$

*for the integration by parts only the (n-1)-dimensional stable manifolds of saddles of index 1 are relevant.

*hence $\mathit{H}^{n-1}$ almost all $x\in \partial \Omega$ lie on a stable manifold of a 1-saddle and there the proof follows by contradiction and the definition of $\Omega$. Hereby $H^{n-1}$ denotes the (n-1)-dimensional Hausdorff measure.


Is it necessary for $f$ to be Morse-Smale?
Is there some soft argument?
What are relevant references?
 A: What troubles me is the noncompactness of  $\newcommand{\bR}{\mathbb{R}}$ $\bR^n$. The boundary $\partial \Omega$ could be noncompact in a rather unpleasant way, difficult to control.   For example, there might exists a sequence of critical points $p_\nu$ of index $1$ going to $\infty$ as $\nu\to \infty$  such that there exists a gradient flow trajectory from $p_\nu$ to $0$ for any $\nu$.  In this case  $\partial\Omega$ will have an $(n-1)$-dimensional stratum for each $p_\nu$ making it hard to predict.
On the other hand, in the compact case, i.e., gradient   flows on  compact manifolds there is a beautiful paper of Harvey and Lawson that describes  one instance when an integration by parts holds.  
Edit   Another issue you might neet to confront on a noncompact manifold is that of the multiplicities of the top strata of $\partial \Omega$. If $p$ is a critical point of  index $1$ and there are infinitely many  gradient trajectories from $p$ to $0$ they you would be hard-pressed to give a mening of the multiplicity of the stratum of $\partial \Omega$ corresponding to $p$. 
In the compact case this multiplicity is   defined  by assigning  in a certain canonical fashion a sign $\pm 1$   to each such connecting trajectory and then adding up all these signs.  Clearly, if there are infinitely many connecting trajectory  this procedure does not make sense.   
This is a serious problem that appears in  symplectic Floer homology. As far as I know, this is dealt with by taking advantage of  the peculiarities of each concrete situation.
