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.
de Rham cohomology: since $B$ is contractible, $\chi(B)=\chi(\{pt\})=1$.
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?).
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 the Morse function, you want it to be constant and maximum on the boundary.
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$.
A similar condition (pointing outward along the boundary) is needed for the Poincaré-Hopf theorem on compact manifolds with boundary, but you were lucky and wrote down something that basically works.