Let $(X,d)$ be a metric space and $f:X\to X$ a mapping.
$f$ is called $\textit{contractive}$ if there exists a $\lambda \in [0,1)$ s.t. $d(f(x),f(y))\leq \lambda d(x,y)$ for all $x,y\in X.$
$f$ is called $\textit{locally contractive}$ if for every $z\in X$ there exists a $\lambda _z \in [0,1)$ and $\varepsilon_z>0$ s.t. $d(f(x),f(y))\leq \lambda_z d(x,y)$ for all $x,y\in B(z,\varepsilon_z).$
If $U$ is an open dense subset of $X$ and $f$ is locally contractive on $U$, prove that there exists a nonempty open subset $W\subset U$ s.t. $f$ is contractive on $W$.
Since $U$ is dense, it is nonempty. Pick $z \in U$ and let $r > 0$ be such that $B(z,r) \subseteq U$. Now $f$ is contractive with the constant $\lambda_z$ on a nonempty open subset $B(z,\min\{r, \varepsilon_z\}) \subseteq U$.