Let's take a constant function for example f(x)=2 , x$\in$R. In every point of domain of f we have local minimum and maximum becouse : Let a $ \in $ R. Then exist $\alpha$ >0 that for every $x\in$B(a,$\alpha$) we have f(x) $\ge$f(a) and f(x) $\le$ f(a). Am i thinking correcly ?
Yes, you are. Note that you wrote that there is a $\alpha>0$ such that…, but one can say more here: every $\alpha>0$ will do. Of course, all that is needed is that there is some $\alpha>0$.
Yes, that is correct. For a function $f:D\to\mathbb R$ where $D\subseteq\mathbb R$, a point $x\in D$ is a local maximum if $f(x)$ is at least as large as each point in the image of the local neighborhood of $x$; i.e. there exists an $\epsilon>0$ s.t. $f(x)\geq f(y)$ for each $|x-y|<\epsilon$. The definition is similar for a local minimum. So just choose $\epsilon=1$ and your conclusion will of course follow.