Continuous functions on unit discs can be extended to whole plane Say $B$ and $D$ be closed and open unit discs in 2 dimensional euclidean plane.  I have two doubts.


*

*Given continuous function $g : B \to \mathbb{R}$, there is a continuous function $f : \mathbb{R} ^2 \to \mathbb{R}$ such that $f=g$ on $B$.

*Given continuous function $u : D \to \mathbb{R}$, there is a continuous function $v : \mathbb{R} ^2 \to \mathbb{R}$ such that $ v=u $ on $D$.


I think the first one is doable. What I think is if we define $f$ as $ f(re^{iz}) = r*f(e^{iz})$ outside $B$ and $f=g$ inside $B$, we are done. The same can not be done with the second part. Am I on the right track?
 A: *

*Is indeed true.

*Is false. Consider $u : (x,y) \mapsto \frac{1}{1-\sqrt{x^2+y^2}}$. $u$ cannot be extended to a continuous function on $\mathbb R^2$ as it is unbounded on $D$.
A: Your approach is good. A concrete example for the second part is $f(z)=\frac{1}{|z|-1}$ which tends to $\infty$ as $z$ tends to 1 and thus cannot be extended to the unit disk, let alone the whole plane
A: As for the first one, you are correct. If $B$ is closed, then $f:B\to \mathbb{R}$ being continuous determines the boundary behavior of $f|_{\partial D}$. Indeed, radially extending as you propose should work fine. 
As for the second part, your doubts are well-founded. While the  function may be  tame on the interior of the domain, it may not extend continuously to the boundary. Take for instance 
$$ f(x)=\sin\left(\frac{1}{x-1}\right)$$
defined on $[0,1)$. It is quite tame, away from $x=1$, but has  an oscillating discontinuity at $1$. Now, define 
$$g(x,y)=\sin\left(\frac{1}{\sqrt{x^2+y^2}-1}\right)$$
on $D$. This function cannot be extended continuously to any point in $\partial D$, let alone to $\mathbb{R}^2$.
A: Though it may be a bit advanced, the Tietze extension theorem covers the case of $B$. Your method works just as well, but this would sort of be an assurance that it's possible.
For the open disc, it's easy to find an unbounded continuous function which obviously can't be extended.
