Construct a bump function for upper hemisphere When reading section 13.1 of Loring Tu book, I came across this problem on  constructing a bump function.

Write down an explicit function $f : S^2 \to \mathbb{R}$ such that $f(p) = 1$
  for all $p$ in some open set $U$ containing the ‘North Pole’ $(0, 0, 1)$ and $f(p) = 0$ for all $p$ in the lower hemisphere $\{(x, y, z)|z \le  0\}$.

I know the bump function $f(x)=\exp(-1/(1-x^2))$; is it useful here?
 A: Let $s = \{0,0,-1\}$ (the South pole), $P$ be the equatorial plane and let $\pi : S^2 \setminus \{ s \} \to P$ defined by $\pi (p) = P \cap \overline {ps}$ (the intersection of $P$ with the line determined by $p$ and $s$). Notice that the image of the Northern hemisphere $N$ (including the Equator) through $\pi$ is precisely the disk $D$ of radius $1$ and centerpoint $(0,0,0)$, contained in $P$. The Equator of $S^2$ is mapped precisely on the boundary $\partial D$.
Define $g : P \to [0, \infty)$ by $g (x,y,0) = f(\sqrt {x^2 + y^2})$ with $f$ being the bump function
$$f(x)= \begin{cases} \textrm e ^{-\frac 1 {1-x^2}}, & x \in (-1, 1) \\ 0, & x \in (-\infty, -1] \cup [1, \infty) \end{cases} .$$
Then $F : S^2 \to [0, \infty)$ given by
$$F(p) = \begin{cases} g \circ \pi (p), & p \in N \\ 0, & p \in S^2 \setminus N \end{cases}$$
is your desired bump function. It has $f(0,0,1) = \frac 1 {\textrm e}$ (the maximum) and it decreases until it becomes $0$ on the Equator, staying $0$ on the whole Southern hemisphere.
