Prove closed disc $D^n$ is homeomorphic to the cone $CS^{n-1}$ 
I need to find a continuous surjective map from $D^n$ to $CS^{n-1}$.

For 2 dimensions, we can use $$f: S^1 \times I /S^{1} \times \{1\} \rightarrow D^2$$ with $f(\theta,t) = (1-t)e^{i \theta}$ which is continuous and surjective. 
But how can I generalise this to n dimensions.
 A: Let's fix some notations:
$$D^n = \{ (x_1, \dots, x_n) \in \mathbb{R}^n \mid x_1^2 + \dots + x_n^2 \le 1 \}$$
$$S^{n-1} = \partial D^n = \{ (x_1, \dots, x_n) \in \mathbb{R}^n \mid x_1^2 + \dots + x_n^2 = 1 \}$$
and the cone $CX$ of a space $X$ is given by $(X \times I) / (X \times \{1\})$.
So first let's define $f : S^{n-1} \times I \to D^n$; it will be exactly like your map $(1-t)e^{i\theta}$, except it will work for all dimensions. Let
\begin{align}
f : S^{n-1} \times I & \to D^n \\
(x_1, \dots, x_n, t) & \mapsto ((1-t)x_1, \dots, (1-t)x_n)
\end{align}
Now clearly if $\sum_i x_i^2 = 1$, then $\sum_i ((1-t)x_i)^2 = (1-t)^2 \sum_i x_i \le 1$ (because $0 \le (1-t)^2 \le 1$). Polynomials are continuous, so $f$ is continuous. And if $(y_1, \dots, y_n) \in D^n$, let $t = 1 - \sqrt{y_1^2 + \dots + y_n^2}$, and $x_i = y_i / \sqrt{(y_1^2 + \dots + y_n^2)}$. Then $f(x_1, \dots, x_n, t) = (y_1, \dots, y_n)$, so $f$ is surjective.
It is rather easy to check that
$$f(x_1, \dots, x_n, t) = f(y_1, \dots, y_n, s) \iff t = s = 1 \text{ or }(t = s \text{ and } (x_1, \dots, x_n) = (y_1, \dots, y_n))$$
So we have first that $f$ factors through the quotient $CS^{n-1} = (S^{n-1} \times I) / (S^{n-1} \times \{1\})$, because $f(x_1, \dots, x_n, 1) = f(y_1, \dots, y_n, 1)$ for all $x_i, y_i$. And secondly, the induced map $g : CS^{n-1} \to D^n$ is injective, because there were no other possibilities for two different elements of the domain to map to the same point in $D^n$.
So finally we get a bijective, continuous map $g : CS^{n-1} \to D^n$. Since $CS^{n-1}$ is compact and $D^n$ is Hausdorff, this is a homeomorphism.
A: If you use polar coordinates for $D^n$ you can define $f(r,\theta_1,\dotsc,\theta_{n-1})=((\theta_1,\dotsc,\theta_{n-1}),r)\subset S^{n-1}\times  I$, now this is surjective and continuous, if you compose with the projection map you get what you want.
