Let $X\subset\mathbb{R}^n$ be a compact manifold with a boundary. Let $f:X\to\mathbb{R}$ be a smooth function constant on each component of the boundary of $X$ (not sure if thats important). Assume that $f$ has no critical points on $X$.
- Can I deduce from Morse inequites that Euler's characteristics of $X$ is 0 ($\chi(X)=0$)? I'm not sure if Morse inequites are working if $X$ is a manifold with a boundary.
- Can I extract any other topological information of $X$ (other betti numbers)?
I'll assume $X$ is connected.
Under your assumption that $f$ is constant on each component of $\partial X$, it follows that $X$ has a product structure of the form $X \approx Y \times [a,b]$ such that $f$ is projection onto the second factor. To be precise, there is a compact manifold $Y$ with empty boundary of dimension $n-1$, an interval $[a,b] \subset \mathbb R$, and a homeomorphism $h : Y \times [a,b] \to X$, such that the composition $f \circ h : Y \times [a,b] \to X$ is simply the projection onto the second factor.
Here's an intuitive outline of the proof, which should be regarded as a simple exercise using the methods of Morse theory. Let $C_0$ be a component of $\partial X$ on which the minimal value of $f$ is achieved, and suppose that $f(C_0)=a$. Since $f$ has no critical point on $C_0$, there is a product structure $C_0 \times [a,a+\epsilon)$ on some neighborhood of $C_0$. One can now keep extending the product structure over more and more of $X$, constructing product structures $C_0 \times [a,a+s)$. There are only two things that can stop this growth. First, one can run into a critical value $s$. But there are no critical values. Second, one can run into another component $C_1$ of $\partial X$, with $f(x)=s$ for some $x \in C_1$. But then $f(C_1)=s$ and the proof is complete with $b=s$.