I am looking for examples of the the Brouwer degree of a smooth map $f:M \rightarrow N$, where $M$ and $N$ are subsets of the real line $\mathbb{R}$. In particular, there is a seemingly nice example on page 244 of this pdf: https://folk.ntnu.no/gereonq/TMA4190_Lecture_Notes.pdf
The Brouwer degree, as far as I can tell, and which is consistent with this document's definition on page 239 and 242, assumes that the domain must be compact and boundryless, in other words, a "closed manifold".
One thing that troubles me with this example, and hence any example when the domain of the function is some interval $M$ of the real line, is that either the domain $M\subseteq \mathbb{R}$ is compact, in which case it has boundary points, or boundryless, in which case it will be open.
Although the example linked above seems to neverthless "work" in the sense that at any regular point $y$, the degree of $f$ is the same, I constructed an example below on which a function $f$ is defined on the compact interval $[0,1]$ but has degree of $-1 + 1=0$ at regular point $y_{1}$ but degree of $-1$ at regular point $y_{2}$.
Thus, my question is two parts: 1. Can we even talk about the Brouwer degree for functions between subsets of the real line, and if so 2. Why does the one in the first example given above work but mine does not?
Thanks!
