Proof about existence of smooth function on two concentric closed balls in Functional Analysis by Rudin I am reading Functional Analysis by Rudin and have some trouble understanding a proof in section 1.46, page 36.
If $B_{1}$ and $B_{2}$ are concentric closed balls in $R^{n}$, with $B_{1}$ in the interior of $B_{2}$, then there exists $\phi \in C^{\infty}(R^{n})$ such that $\phi(x)=1$ for every $x \in B_{1}$, $\phi(x)=0$ for every $x$ outside $B_{2}$, and $0\le\phi\le1$ on $R^{n}$
I need some help to figure out the formulas $(9), (10)$ and $(11)$ in page 36.:-(
The proof summary is as follows,
Suppose $0\lt a\lt b \lt\infty$. Here $a$ is radius of $B_{1}$ and $b$ is that of $B_{2}$. Choose positive numbers $\delta_{0},\delta_{1},\delta_{2},\dots,$ with $\sum\delta_{i}=b-a$; put $m_{n}=\frac{2^{n}}{\delta_{1}\dots\delta{n}}$ $(n=1,2,3,...)$.
Let $f_{0}$ be a continuous monotonic function such that $f_{0}(x)=0$ when $x\lt a$, $f_{0}(x)=1$ when $x\gt a+\delta_{0}$; and define 
$$(8)  \quad\quad\quad\quad f_{n}(x)=\frac{1}{\delta_{n}}\int_{x-\delta_{n}}^{x}f_{n-1}(t)dt \quad\quad (n=1,2,3,\dots)$$
If $n\ge r$, then
$$(9)  \quad\quad\quad\quad D^{r}f_{n}(x)=\frac{1}{\delta_{n}}\int_{x-\delta_{n}}^{x}(D^{r}f_{n-1})(x-t)dt \quad\quad (n=1,2,3,\dots)$$
so that 
$$(10) \quad\quad\quad\quad |D^{r}f_{n}|\le m_{r} \quad\quad (n\ge r)$$
The mean value theorem, applied to (9), shows that 
$$(11)\quad\quad\quad\quad |D^{r}f_{n}-D^{r}f_{n-1}|\le m_{r+1}\delta_{n} \quad\quad (n\gt r+2)$$
SInce $\sum\delta_{i}\lt\infty$, each $\{D^{r}f_{n}\}$ converges uniformly as $n$ goes to infinity. Hence $\{f_{n}\}$ converges to a function a $g$ with $|D^{r}g|\le m_{r}$ for $r=1,2,3,...$, such $g(x)=0$ for $x\lt a$ and $g(x)=1$ for $x\gt b$. Then $\phi(x_{1},x_{2},\dots,x_{n})=1-g(|x_{1}^2|+|x_{2}^2|+\dots+|x_{n}^2|)$.
 A: In formula $(8)$, Rudin defines
$$f_n(x) = \frac{1}{\delta_n}\int_{x-\delta_n}^x f_{n-1}(t)\,dt.$$
Now we can make the substitution $u = x-t$ and obtain
$$f_n(x) = \frac{1}{\delta_n}\int_0^{\delta_n} f_{n-1}(x-u)\,du. \tag{$8'$}$$
In this form, it is clear that differentiation under the integral is legitimate up to $n-1$ times, so
$$D^rf_n(x) = \frac{1}{\delta_n} \int_0^{\delta_n} (D^r f_{n-1})(x-t)\,dt \tag{9}$$
for $r < n$ follows by differentiating $(8')$ $r$ times under the integral (and renaming $u$ to $t$).
Then the inequality
$$\lvert D^r f_n\rvert \leqslant m_r\tag{10}$$
for $r \leqslant n$ follows by induction. For $r < n$, the induction hypothesis says $\lvert D^r f_{n-1}\rvert \leqslant m_r$, and inserting that bound in the integral in $(9)$ gives $\lvert D^r f_n\rvert \leqslant m_r$:
$$\lvert D^r f_n(x)\rvert = \frac{1}{\delta_n} \Biggl\lvert \int_0^{\delta_n} (D^r f_{n-1})(x-t)\,dt\Biggr\rvert \leqslant \frac{1}{\delta_n}\int_0^{\delta_n} \lvert (D^r f_{n-1})(x-t)\rvert\,dt \leqslant \frac{1}{\delta_n}\int_0^{\delta_n} m_r\,dt = m_r.$$
For $r = n$ we again substitute $u = x-t$ in
$$D^{n-1} f_n(x) = \frac{1}{\delta_n} \int_0^{\delta_n} (D^{n-1} f_{n-1})(x-t)\,dt = \frac{1}{\delta_n} \int_{x-\delta_n}^x (D^{n-1} f_{n-1})(t)\,dt,$$
and the fundamental theorem of calculus yields
$$D^n f_n(x) = \frac{(D^{n-1} f_{n-1})(x) - (D^{n-1} f_{n-1})(x-\delta_n)}{\delta_n},$$
which, together with $\lvert D^{n-1} f_{n-1}\rvert \leqslant m_{n-1}$ gives
$$\lvert D^n f_n(x)\rvert \leqslant \frac{2m_{n-1}}{\delta_n} = m_n.$$
Finally, for $n \geqslant r+2$ we have
\begin{align}
\lvert D^r f_n(x) - D^r f_{n-1}(x)\rvert &= \frac{1}{\delta_n}\Biggl\lvert \int_0^{\delta_n} (D^r f_{n-1})(x-t) - (D^r f_{n-1})(x)\,dt\Biggr\rvert\\
&= \frac{1}{\delta_n}\Biggl\lvert \int_0^{\delta_n} \int_{x-t}^x -(D^{r+1} f_{n-1})(u)\,du\,dt\Biggr\rvert\\
&\leqslant \frac{1}{\delta_n}\int_0^{\delta_n} \int_{x-t}^x \lvert (D^{r+1} f_{n-1})(u)\rvert\,du \,dt\\
&\leqslant \frac{1}{\delta_n} \int_0^{\delta_n} m_{r+1}\cdot t\,dt\\
&= \frac{m_{r+1}\delta_n^2}{2\delta_n}\\
&= \frac{m_{r+1}\delta_n}{2}.
\end{align}
This inequality is stronger by a factor of $2$ than Rudin's inequality $(11)$, probably Rudin used the coarser estimate $\lvert (D^r f_{n-1})(x) - (D^rf_{n-1})(x-t)\rvert \leqslant m_{r+1}\cdot \delta_n$ rather than $\leqslant m_{r+1}\cdot t$.
A: I don't have that book with me but you can write down such a function explicitly. Say the center of the circles is zero and the have radii $r_1$ and $r_2$, then the function
$$
\phi(x):=1-h\left(\frac{|x|^2-r_1^2}{r_2^2-r_1^2}\right)
$$
with $\displaystyle h(t):=\frac{e(t)}{e(t)+e(1-t)}$ and $\displaystyle e(t):=\begin{cases}\mathrm e^{-1/t}&t>0 \\\hfill 0& t\leqslant 0\end{cases}$ has all the properties you want.
(I guess you mean $\phi(x)=0$ outside $B_2$...)
EDIT: Here's a picture of the graph of $\phi$, when $B_1$ and $B_2$ are the balls of radius $1$ and $2$ respectively:

