Is this piecewise function continuous? 
Is the above function continuous? Intuitively, I think the answer is no because at points where the norm is equal to 1 and points where the norm is slightly larger than 1, it feels like there is a "jump discontinuity" but I'm not sure how to show that.
 A: Yes, it is continuous. It is the product of two continuous functions: the identity function and the function$$\begin{array}{rccc}a\colon&\Bbb R^n&\longrightarrow&\Bbb R\\&x&\mapsto&\begin{cases}1&\text{ if }\|x\|<1\\\frac1{\|x\|}&\text{ otherwise.}\end{cases}&\end{array}$$The function $a$ is continuous because, for each $x\in\Bbb R^n\setminus\{0\}$,$$a(x)=\min\left\{1,\frac1{\|x\|}\right\}=\frac{1+\frac1{\|x\|}-\left|1-\frac1{\|x\|}\right|}2.$$
A: You can use the pasting lemma for the two closed sets $A=\{x\mid \|x\| \le 1\}$ and $B = \{x\mid \|x\|\ge 1\}$ where $f$ is the identity on $A \cap B$. $f\restriction_A$ is just the identity, hence continous and $f\restriction_B$ is just $\frac{x}{\|x\|}$ which is continuous as the quotient of two continuous functions, the second of which vanishes nowhere on $B$.
A: Let $A_1=\{x: \|x\| \leq 1\}$ and $A_2=\{x: \|x\| \geq 1\}$, then $A_1,A_2$ are closed in $\mathbb{R}^n$ and $\mathbb{R}^n=A_1 \cup A_2$. Define $f_1: A_1 \rightarrow \mathbb{R}^n$ and $f_2: A_2 \rightarrow \mathbb{R}^n$ by $f_1(x)=x$ and $f_2(x)=\frac{x}{\|x\|}$. Then $f(x)=f_1(x)$ for $x \in A_1$ and $f(x)=f_2(x)$ for $x \in A_2$. We will show that for any closed set $C$ in $\mathbb{R}^n$, $f^{-1}(C)$ is closed in $\mathbb{R}^n$.
$x \in f^{-1}(C) \cap A_i \Leftrightarrow f(x) \in C~~\textit{and}~~x \in A_i \Leftrightarrow f_i(x) \in C~~\textit{and}~~x \in A_i \Leftrightarrow x \in f_i^{-1}(C) \cap A_i$. Thus $f^{-1}(C) \cap A_i=f_i^{-1}(C) \cap A_i$. Since $f_i$'s are continuous,  $f_i^{-1}(C) \cap A_i$ is closed in $A_i$ hence in $\mathbb{R}^n$. So  $f^{-1}(C)=f^{-1}(C) \cap \mathbb{R}^n=f^{-1}(C) \cap (\cup_i A_i)=\cup_i(f^{-1}(C) \cap A_i)$ is closed in $\mathbb{R}^n$.
