I have two problems, I think I got one but I'm not sure and I'm stuck in the other one, could you help me? here they are:
1.- Let a function $f:\mathbb{R}^2\longrightarrow\mathbb{R}$ be defined by:
$ f(x,y)=\begin{cases}[x]y - 1 &\mbox{if }y \in \mathbb{Q} , \\ 0 &\mbox{if }y \in \mathbb{R} \backslash \mathbb{Q},\end{cases} $
([x] denotes the nearest integer function)
Find the set where the function is continuous.
My solution for this one:
Let's find out the continuity of the function at an arbitrary rational point $y$ and then do the same for an irrational one.
Consider $y \in \mathbb{Q}$ and one sequence of irrational numbers $\{y_n\}$ which converges to $y$ and another sequence $\{x_n\}$ which converges to $x$. Now $\{ f(x_n,y_n) \}$ converges to $0$ and $f(x,y) = [x]y-1$. Similarly for the case when $y$ is irrational we have that $\{ f(x_n,y_n) \}$ converges to $[x]y-1$ and $f(x,y) = 0$.
Thus $f$ is continuous if $[x]y-1 = 0$ therefore we have that $f$ is continuous at $\{ (1,1) , (-1,-1) \}$.
2.- Let $D=\{x \in \mathbb{R}^n : \|x\| < 1\}$ and $D_1=\{x \in \mathbb{R}^n : \|x\| \le 1\}$. Prove that a function $f:D \longrightarrow \mathbb{R}^m$ can be extended to a continuous function on $D_1$ if and only if $f$ is uniformly continuous.
My solution:
Assume that $f$ can be extended to a continuous function on $D_1$, since $D_1$ is compact and $f$ is continuous then $f$ is uniformly continuous on $D_1$, in particular it's continuous on $D$.
And I can find where to start to prove the converse, could you give me some hints?