In the particular case of a cylinder, there is a simple way to calculate the index.Take any compact subcylinder delimited by two circles. Map the cylinder to the planeminus the origin. Around each of the curves, the vector field has a turning number:as you go around the curve counterclockwise, the vector field turns by some numberof rotations (counting counterclockwise as positive. The index of thevector field in the compact subannulus is the difference: the number of turns onthe outer boundary minus the number of turns on the inner boundary.
One formulation way to describe a general formula is this:is nonvanishing in a neighborhood of $\partial M$. Suppose that the set of tangencies
Choose an outward normal vector field $X$ to U$ along $\partial M$consists of a codimension one submanifold ; now arrange $T$ of X$ sothat its direction coincides with $\partial M$U$ only in isolated points, so if we can write$\partial M$ as the union of two submanifolds X$ to $N$ along $U$, it is a vector field with boundary, isolated singularities. Let $\partial M = B_+ \cup B_-$be the flow sum of the Poincaré-Hopf indices over all singularities where $X$ is orientedoutwardon $B_+$ and inward on $B_-$.. Then the Poincaré-Hopf index for $i(X)$ of $X$ in $M$ is equals the Euler characteristicof $\chi(M) - \chi(B_+)$M$ minus $i_+(X)$.However, along the boundary, some of the numbers on $B_+$ (which includes $T$) are blown away and lost.Near any zero of $X$ there is a mismatch,which can only depend on To regularize the local behavior of situation, modify $X$.From X$ by pushing in the specialcase that negative normal direction.Now $N$ is X$ points inward everywhere except in a closed manifold and $M = N$, neighborhood of points wherethat is coincides with the Poincaré-Hopf indexoutward normal. Thus everything cancels out except forlocal contributions given by $i(X)$ and $i_+(X)$.