# Euler characteristic of the closed unit ball

I would like to calculate the Euler-Poincaré characteristic of the closed unit ball $B$ by the de Rham cohomology, the Poincaré-Hopf theorem and Morse theory.

1. de Rham cohomology: since $B$ is contractible, $\chi(B)=\chi(\{pt\})=1$.

2. Poincaré-Hopf theorem: the vector field on $B$, $X=y\partial_x-x\partial_y$ has only one critical point (the origin) of index $1$ and so $\chi(B)=1$. (Is the Poincaré-Hopf theorem true for a compact manifold with boundary?).

3. Morse theory: I do not know how to determine the critical points of the height function on the ball $f: B \to\mathbb{R}$, $(x,y)\to y$ ($f$ reaches its minimum and maximum on the boundary, but these points are not necessarily critical points because they are not interior points). In the interior of $B$, the function $f$ has no critical points ... I do not know where I was wrong. Thank you for any hints!

For example $\sum_i x_i^2$ (or rather $x^2+y^2$ in your notation) works. This has one critical point of even index, so this also gives Euler characteristic $1$.