# Continuous map from $D^{n}$ to $S^{n}$

For some $x \in N$, let $f: D^{n} \to S^{n}$ be defined by

$$f(x) = ( 2 \vert \vert x \vert \vert^{2}-1, 2x_{1}\sqrt{1-\vert \vert x\vert \vert^2},2x_{2}\sqrt{1-\vert \vert x\vert \vert^2}, \ldots, 2x_{n}\sqrt{1-\vert \vert x\vert \vert^2}),$$ where $D^{n} = \{ x \in \mathbb{R}^{n}:\vert \vert x \vert \vert \leq 1 \}$, and $S^{n}$ is the boundary of $D^{n+1}$.

I found this map online and I am trying to derive it. I can derive maps from $D^{n}$ to $S^{n}$ in 2 and 3 dimensions using trig functions, but anything higher and I am lost, and that's why I searched and found this formula. From this formula, it looks like I have to replace trig functions with norms.

First, I considered the simplest case, that is $n=1$. So for any element $a \in [-1,1]$, I set the $x$ in $(x,y) \in S^{1}$ as $x = 2a^2-1$. I came up with this by fitting a shifted parabola such that it takes the value 0 at -1 and 1, and takes the value -1 at 0. Next, I picked $y$ in $(x,y) \in S^{1}$ so that it satisfies the equation of a circle, that is

$$(2a^2-1)^2 + y^2 = 1,$$

from which we obtain $y = 2a \sqrt{1-a^2}$. So for $n=1$, I get $(x,y) = (a, 2a \sqrt{1-a^2})$, which looks familiar to the formula I ultimately want to get.

Now I need to do it for $n=2$. Unfortunately, I am stuck here. I would really appreciate some hint on how this formula is derived.

EDIT: After thinking about this some more, I came up with the following for $n=3$. Let $x \in D^{2}$, and let $y \in S^{2}$. First, I kind of guessed (after plotting and getting some intuition) that $y_{1} = 2 \vert \vert x \vert \vert^{2}-1$. What I have done is give the vector in $D^{2}$ some height when mapped to $S^{2}$. Now, I want to normalize the rest of the coordinates so that they satisfy the equation of a circle. In other words, I want to set $y_{2} = x_{1}A$ and $y_{3}=x_{2}A$, where $A$ is obtained from $$x_{1}^{2}A^{2} + x_{2}^{2}A^{2} + (2 \vert \vert x \vert \vert ^2 -1)^2 = 1.$$ I have to solve for $A$. After some manipulation, $A=2 \sqrt{1-\vert \vert x \vert \vert ^2}$. So I get $f(x)$ as desired. I still do not know how to justify setting one of the coordinates to $2 \vert \vert x \vert \vert^{2}-1$ though.

-

If we think of the first coordinate as the "north-south" axis, then we can justify setting the first coordinate of $f(x)$ to $2\|x\|^2 - 1$ by trying to come up with a mapping that will take the center of the disc to the south pole, and $\partial D^{n}$ to the north pole. When $n=2$ we can visualize this by imagining that we have a drawstring running around the outside of a disc. When we tighten the drawstring, the boundary is pulled up towards the north pole while the center sinks to the south.
To achieve this map we need to find a way to make the first coordinate of $f(x)$ range from $-1$ to $1$ as the point in our disc moves from the center outwards, i.e., $\|x\|$ ranges from $0$ to $1$. A nice continuous function that does this is $2\|x\|^{2}-1$. From there we only need to find a way to scale the rest of the coordinates so that they lie on the sphere, as you seem to have figured out.