The question:

Given $\displaystyle f(x,y)=\cos(\frac{1}{1-x^2-y^2})$, prove:

a) $\displaystyle f(x,y)$ isn't uniformly continuous functions on $\displaystyle D=\{(x,y)|x^2+y^2<1\}$

b) $\displaystyle f(x,y)$ is uniformly continuous functions on $\displaystyle D=\{(x,y)| 3 \leqslant x^2+y^2\leqslant 4\}$

My solution(check me please):

a) First I say,

$\displaystyle x^2+y^2=t$, $\displaystyle 0 \leqslant t<1 $

now,

$\displaystyle f(x,y)$ becomes to be function with one variable-$\displaystyle t$:

$\displaystyle f(t)=\cos(\frac{1}{1-t}$.

Now I pick two points $\displaystyle t_0,t_1 \in [0,1)$:

$\displaystyle t_0=1-\frac{1}{2\pi n}$,

$\displaystyle t_1=1-\frac{1}{(2n+1)\pi}$

We can see that:

$\displaystyle \lim_{n\to\infty}|t_0-t_1|=\lim_{n\to\infty}|\frac{1}{(2n+1)\pi}-\frac{1}{2\pi n}|=\lim_{n\to\infty}|...|=0$

But:

$\displaystyle |f(t_0)-f(t_1)|=|\cos(t_0)-\cos(t_1)|=|\cos(2\pi n)-\cos((2n+1)\pi)|=2$

Therefor for every $\displaystyle 0<\varepsilon<2 $ $\displaystyle \nexists \delta $, so that for all $\displaystyle |t-t'|<\delta $ will be held: $\displaystyle |f(t)-f(t')|<\varepsilon $

b)

$\displaystyle D=\{(x,y)| 3 \leqslant x^2+y^2\leqslant 4\}$ is closed and bounded, the function $\displaystyle f(x,y)$ is continuous function in $\displaystyle D$, hence from Cantor's theorem we can deduce that $\displaystyle f(x,y)$ is uniformly continuous function.